The below error appears when printing on Android 12 or above
Failed to print:
java.lang.SecurityException: Need android.permission.BLUETOOTH_CONNECT permission for android.content.AttributionSource@879bf1d0: AdapterService getBondedDevices
at android.os.Parcel.createExceptionOrNull(Parcel.java:2426)
at android.os.Parcel.createException(Parcel.java:2410)
at android.os.Parcel.readException(Parcel.java:2393)
at android.os.Parcel.readException(Parcel.java:2335)
at android.bluetooth.IBluetooth$Stub$Proxy.getBondedDevices(IBluetooth.java:3379)
at android.bluetooth.BluetoothAdapter.getBondedDevices(BluetoothAdapter.java:2502)
at com.brother.ptouch.sdk.connection.BluetoothConnection.getPrinterDevice(BluetoothConnection.java:238)
at com.brother.ptouch.sdk.connection.BluetoothConnection.open(BluetoothConnection.java:56)
at com.brother.ptouch.sdk.Printer.init(Printer.java:2215)
at com.brother.ptouch.sdk.Printer.startCommunication(Printer.java:2350)
at com.brother.ptouch.sdk.printdemo.printprocess.BasePrint$PrinterThread.run(BasePrint.java:713)
The below error appears when printing on Android 12 or above