Arf Well-Known Member Licensed User Longtime User Sep 27, 2017 #1 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. Click to expand... I have added the line "AddPermission(android.permission.BLUETOOTH_PRIVILEGED)" in my manifest editor, but am still getting the error. Any ideas?
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. Click to expand... 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 Sep 27, 2017 #2 Google first! https://www.google.de/search?q=android.permission.BLUETOOTH PRIVILEGED&spell=1&sa=X&ved=0ahUKEwib94Oh28XWAhXFmBoKHazZBGUQBQgkKAA&biw=1661&bih=790 The answer is: You can't use this permission if your app is a third party app (non-system app). To learn more, see Android API: BLUETOOTH_PRIVILEGED So: No premade checks by yourself.... Note: Disqualified Last edited: Sep 27, 2017 Upvote 0
Google first! https://www.google.de/search?q=android.permission.BLUETOOTH PRIVILEGED&spell=1&sa=X&ved=0ahUKEwib94Oh28XWAhXFmBoKHazZBGUQBQgkKAA&biw=1661&bih=790 The answer is: You can't use this permission if your app is a third party app (non-system app). To learn more, see Android API: BLUETOOTH_PRIVILEGED So: No premade checks by yourself.... Note: Disqualified
Arf Well-Known Member Licensed User Longtime User Sep 27, 2017 #3 Aaargh, I guess that puts an end to auto pairing :-( Thanks, I will endevour to google prodigously first in the future! Upvote 0
Aaargh, I guess that puts an end to auto pairing :-( Thanks, I will endevour to google prodigously first in the future!
DonManfred Expert Licensed User Longtime User Sep 27, 2017 #4 Arf said: Aaargh, I guess that puts an end to auto pairing :-( Click to expand... Probably it will be harder in each new Android Version... Upvote 0
Arf said: Aaargh, I guess that puts an end to auto pairing :-( Click to expand... Probably it will be harder in each new Android Version...
Arf Well-Known Member Licensed User Longtime User Sep 27, 2017 #5 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
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
Erel B4X founder Staff member Licensed User Longtime User Sep 28, 2017 #6 Please start a new thread for a new question. Upvote 0