You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I keep getting a Microsoft.Maui.ApplicationModel.PermissionException with the message:
You need to declare using the permission: android.permission.ACCESS_COARSE_LOCATION in your AndroidManifest.xml
Where, in my AndroidManifest.xml I have:
<?xml version="1.0" encoding="utf-8"?>
<manifestxmlns:android="http://schemas.android.com/apk/res/android">
<uses-sdk
android:minSdkVersion="21"
android:targetSdkVersion="33"
android:compileSdkVersion="33"/>
[...]
<!-- Originally I had this: <uses-permission android:name="ACCESS_COARSE_LOCATION" android:maxSdkVersion="30" /> --><!-- I currently have this: -->
<uses-permission
android:name="ACCESS_COARSE_LOCATION" />
[...]
</manifest>
This message/behavior doesn't make much sense to me as the permission IS defined in the manifest...
Any ideas as to what the issue might be?
For context, I am trying to get Bluetooth working on Android
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
I keep getting a
Microsoft.Maui.ApplicationModel.PermissionException
with the message:Where, in my
AndroidManifest.xml
I have:This message/behavior doesn't make much sense to me as the permission IS defined in the manifest...
Any ideas as to what the issue might be?
For context, I am trying to get Bluetooth working on Android
For the permissions, I have defined a class
CustomPermissions.Bluetooth
(following MAUI Bluetooth Permission Declaration)Here is a reference I've been following for Android bluetooth permissions: https://developer.android.com/guide/topics/connectivity/bluetooth/permissions
This approach I've implemented works for a physical device and an emulator using API 33, but for an emulator using API 21, I get the above exception.
The error is thrown when I try to execute this line:
Please let me know if any kind of additional context/information would be helpful to assess/address this!
Many thanks in advance!
Beta Was this translation helpful? Give feedback.
All reactions