-
Notifications
You must be signed in to change notification settings - Fork 114
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Permissions error on Android 12, 13 #102
Comments
tv_device_selected, Maybe you need use permission on run time. ` private fun hasConnectBluetooth() =
and use requestPermissions fun in your activity or fragment |
Since android 12 you need to add two extras permissions, depending on your need but in my case I do this using Dexter to request permissions : final List<String> permissions = new ArrayList<>();
permissions.add(Manifest.permission.ACCESS_FINE_LOCATION);
permissions.add(Manifest.permission.BLUETOOTH);
permissions.add(Manifest.permission.BLUETOOTH_ADMIN);
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.S) {
permissions.add(Manifest.permission.BLUETOOTH_CONNECT);
permissions.add(Manifest.permission.BLUETOOTH_SCAN);
}
Dexter.withContext(requireActivity())
.withPermissions(permissions)
.... |
hi guys @hernando-montoya @tspoke @Dumankrg2019 , i get this issue too, so which solution need to implement for this issue? |
The scanning activity crash.
java.lang.SecurityException: Need android.permission.BLUETOOTH_SCAN permission for android.content.AttributionSource@d39f7202: Starting discovery.
But the permission is already present in the manifest.
The text was updated successfully, but these errors were encountered: