-
Notifications
You must be signed in to change notification settings - Fork 564
Closed
Labels
Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).Issues with the Android API binding (Mono.Android.dll).needs-triageIssues that need to be assigned.Issues that need to be assigned.
Description
Android framework version
net9.0-android
Affected platform version
VS 2022 17.14.11 .NET 9.0.304
Description
Since android api level >= 31 location permission is no longer required for using bluetooth apis if you strongly assert that your app doesn't derive physical location.
A developer can do so by setting usesPermissionFlags to neverForLocation:
<manifest>
<!-- Include "neverForLocation" only if you can strongly assert that
your app never derives physical location from Bluetooth scan results. -->
<uses-permission android:name="android.permission.BLUETOOTH_SCAN"
android:usesPermissionFlags="neverForLocation" />
<!-- Set maxSdkVersion to 30 if you can strongly assert that, on
Android 12 and higher, your app never derives physical location from
Bluetooth scan results and doesn't need location access for any other
purpose. -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION"
android:maxSdkVersion="30" />
...
</manifest>Sadly, this attribute is not exposed via the UsesPermissionAttribute:
| <element path="uses-permission.usesPermissionFlags" visible="false" /> |
Steps to Reproduce
- Create new project
- Try setting
usesPermissionFlagsusingUsesPermissionAttribute
Did you find any workaround?
No response
Relevant log output
Copilot
Metadata
Metadata
Assignees
Labels
Area: Mono.AndroidIssues with the Android API binding (Mono.Android.dll).Issues with the Android API binding (Mono.Android.dll).needs-triageIssues that need to be assigned.Issues that need to be assigned.