Android Question Bluetooth permissions problem with Android 7

Arf

Well-Known Member
Licensed User
Longtime User
Hi,
My app attempts to automatically pair my bluetooth device when it finds it, but I am getting crashes at this point in android 7.
Caused by: java.lang.SecurityException: Need BLUETOOTH PRIVILEGED permission: Neither user 10082 nor current process has android.permission.BLUETOOTH_PRIVILEGED.

I have added the line "AddPermission(android.permission.BLUETOOTH_PRIVILEGED)" in my manifest editor, but am still getting the error.

Any ideas?
 

DonManfred

Expert
Licensed User
Longtime User
Last edited:
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Aaargh, I guess that puts an end to auto pairing :-(

Thanks, I will endevour to google prodigously first in the future!
 
Upvote 0

Arf

Well-Known Member
Licensed User
Longtime User
Ok so I've disabled it android 7+.
Now I have a problem as my app needs to know if pairing has been done before it continues.
Can I intercept an event that tells me the user has clicked the pairing OK button?

Maybe this, but I don't know if this applies to Bluetooth 2.1 or BLE only (I use 2.1)

If StartingIntent.Action = "android.bluetooth.device.action.BOND_BONDED" Then
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…