Android api 31 printing security problem

// Expert user has replied.
M Maria Palacios 2 years 9 months ago
8 1 0

Hello, Im getting the following error:

java.lang.SecurityException
com.zebra.sdk.comm.BluetoothConnection.cancelBluetoothDiscovery

with these stacktrace
java.lang.RuntimeException:
at android.os.AsyncTask$4.done (AsyncTask.java:415)
at java.util.concurrent.FutureTask.finishCompletion (FutureTask.java:383)
at java.util.concurrent.FutureTask.setException (FutureTask.java:252)
at java.util.concurrent.FutureTask.run (FutureTask.java:271)
at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)
Caused by: java.lang.SecurityException:
at android.os.Parcel.createExceptionOrNull (Parcel.java:2437)
at android.os.Parcel.createException (Parcel.java:2421)
at android.os.Parcel.readException (Parcel.java:2404)
at android.os.Parcel.readException (Parcel.java:2346)
at android.bluetooth.IBluetooth$Stub$Proxy.cancelDiscovery (IBluetooth.java:4979)
at android.bluetooth.BluetoothAdapter.cancelDiscovery (BluetoothAdapter.java:2942)
at com.zebra.sdk.comm.BluetoothConnection.cancelBluetoothDiscovery (BluetoothConnection.java:6)
at com.zebra.sdk.comm.BluetoothConnection.open (BluetoothConnection.java)
at com.yoveri.axiscloud.Utility.impresion.impresoras.Zebra.connect (Zebra.java:7)
at com.yoveri.axiscloud.Utility.impresion.impresoras.Zebra.access$100 (Zebra.java)
at com.yoveri.axiscloud.Utility.impresion.impresoras.Zebra$connTask.doInBackground (Zebra.java:4)
at com.yoveri.axiscloud.Utility.impresion.impresoras.Zebra$connTask.doInBackground (Zebra.java:2)
at android.os.AsyncTask$3.call (AsyncTask.java:394)
at java.util.concurrent.FutureTask.run (FutureTask.java:266)
at android.os.AsyncTask$SerialExecutor$1.run (AsyncTask.java:305)
at java.util.concurrent.ThreadPoolExecutor.runWorker (ThreadPoolExecutor.java:1167)
at java.util.concurrent.ThreadPoolExecutor$Worker.run (ThreadPoolExecutor.java:641)
at java.lang.Thread.run (Thread.java:920)

It only occurs when trying to print with Android 12 (API 31) phones. We have already tried using the latest ZEBRA sdk available for developers but its not compatible with this android version.

CONTACT
Can’t find what you’re looking for?