Trying to run this on unrooted Nexus 6, but doesn't seem to work. I see this error in logcat after pairing:
D/HidPeripheral: Need BLUETOOTH PRIVILEGED permission: Neither user 10102 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
java.lang.SecurityException: Need BLUETOOTH PRIVILEGED permission: Neither user 10102 nor current process has android.permission.BLUETOOTH_PRIVILEGED.
at android.os.Parcel.readException(Parcel.java:1942)
at android.os.Parcel.readException(Parcel.java:1888)
at android.bluetooth.IBluetooth$Stub$Proxy.setPairingConfirmation(IBluetooth.java:1677)
at android.bluetooth.BluetoothDevice.setPairingConfirmation(BluetoothDevice.java:1235)
at jp.kshoji.blehid.HidPeripheral$4.onConnectionStateChange(HidPeripheral.java:581)
at android.bluetooth.BluetoothGattServer$1.onServerConnectionState(BluetoothGattServer.java:93)
at android.bluetooth.IBluetoothGattServerCallback$Stub.onTransact(IBluetoothGattServerCallback.java:70)
at android.os.Binder.execTransact(Binder.java:674)
According to docs, BLUETOOTH_PRIVILEGED is not allowed for 3rd party apps.
Trying to run this on unrooted Nexus 6, but doesn't seem to work. I see this error in logcat after pairing:
According to docs, BLUETOOTH_PRIVILEGED is not allowed for 3rd party apps.