This repository was archived by the owner on Jul 6, 2026. It is now read-only.
Description Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
VS 2022 17.3.3
Description
In .NET 6 Android the consts are missing SupportedOSPlatformAttribute.
Examples:
Manifest.Permission.PostNotifications:
Vibrator.VibrationEffectSupportNo
TelecomManager.ActionPostCall
APILevel is already present in RegisterAttribute.ApiSince.
[ Register ( "ACTION_POST_CALL" , ApiSince = 30 ) ]
public const string ActionPostCall = "android. telecom. action. POST_CALL";
I would also expect that the new enum VibrationEffectSupport also has the SupportedOSPlatformAttribute as the values are only available since API 30.
public enum VibrationEffectSupport
{
[ IntDefinition ( "Android.OS.Vibrator.VibrationEffectSupportUnknown" , JniField = "android/os/Vibrator.VIBRATION_EFFECT_SUPPORT_UNKNOWN" ) ]
Unknown = 0 ,
[ IntDefinition ( "Android.OS.Vibrator.VibrationEffectSupportYes" , JniField = "android/os/Vibrator.VIBRATION_EFFECT_SUPPORT_YES" ) ]
Yes = 1 ,
[ IntDefinition ( "Android.OS.Vibrator.VibrationEffectSupportNo" , JniField = "android/os/Vibrator.VIBRATION_EFFECT_SUPPORT_NO" ) ]
No = 2
}
Steps to Reproduce
Create new .NET 6 Android project and use Android consts/enums.
Did you find any workaround?
No response
Relevant log output
No response
Reactions are currently unavailable
Android application type
Android for .NET (net6.0-android, etc.)
Affected platform version
VS 2022 17.3.3
Description
In .NET 6 Android the consts are missing
SupportedOSPlatformAttribute.Examples:
APILevel is already present in RegisterAttribute.ApiSince.
I would also expect that the new enum
VibrationEffectSupportalso has theSupportedOSPlatformAttributeas the values are only available since API 30.Steps to Reproduce
Create new .NET 6 Android project and use Android consts/enums.
Did you find any workaround?
No response
Relevant log output
No response