I have been developing an application for a long time and I was working with Bluetooth printing until the mobile software was updated, it started to slow down the connection after the phone's 6.0 Marshmallow update, then it did not connect to the first one if not that I had to give it several times until I succeeded and now it does not connect; I get the following error:
java.lang.SecurityException: Need BLUETOOTH PRIVILEGED permission: Neither user 10218 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
Permissions are well declared in the Manifest:
<uses-permission android:name="android.permission.BLUETOOTH"/>
<uses-permission android:name="android.permission.BLUETOOTH_ADMIN"/>
<uses-permission android:name="android.permission.BLUETOOTH_PRIVILEGED"/>
...
...
...
I have searched a lot and I really do not know what to do. I appreciate the help you can give me, I'm going crazy ... The Bluetooth turns on, finds the necessary device but at the time of matching
mmDevice.setPairingConfirmation(true);
I get the error. As I said before, it worked very well until the mobile software was updated now it's Android 7.0 Nougat.