Android EMDK ANR issues

D Domenic Cucullo 1 year 6 months ago
89 0 0

Our reporting indicates many instances of ANRs happening in the field.
We're running TC52 devices with Android 8.1 and 10. EMDK version is 11.0.131.4031.

Here are snippets of the log files:
 

AppNotResponding : Application not responsive since: Sat May 06 13:34:26 EDT 2023
        at android.os.BinderProxy.transactNative(Binder.java)
        at android.os.BinderProxy.transact(Binder.java:764)
        at com.symbol.emdk.emdkservice.IEMDKService$Stub$Proxy.initEMDKManager(IEMDKService.java:2120)
        at com.symbol.emdk.EMDKServiceConnection.onServiceConnected(EMDKServiceConnection.java:93)
        at android.app.LoadedApk$ServiceDispatcher.doConnected(LoadedApk.java:1652)
        at android.app.LoadedApk$ServiceDispatcher$RunConnection.run(LoadedApk.java:1681)
        at android.os.Handler.handleCallback(Handler.java:790)
        at android.os.Handler.dispatchMessage(Handler.java:99)
        at android.os.Looper.loop(Looper.java:164)
        at android.app.ActivityThread.main(ActivityThread.java:6528)
        at java.lang.reflect.Method.invoke(Method.java)
        at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438)
        at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:807)


AppNotResponding : Application not responsive since: Sat May 06 09:21:48 CDT 2023
        at android.os.BinderProxy.transactNative(Binder.java)
        at android.os.BinderProxy.transact(Binder.java:764)
        at com.symbol.emdk.emdkservice.IEMDKService$Stub$Proxy.scnEnable(IEMDKService.java:2830)
        at com.symbol.emdk.barcode.Scanner.enable(Scanner.java:343)
        at com.carters.retail.omnichannel.features.scanner.Scanner.initializeScanner(Scanner.kt:107)

AppNotResponding : Application not responsive since: Sat May 06 10:15:37 CDT 2023
        at android.os.BinderProxy.transactNative(Binder.java)
        at android.os.BinderProxy.transact(Binder.java:764)
        at com.symbol.emdk.emdkservice.IEMDKService$Stub$Proxy.scnSetConfig(IEMDKService.java:3045)
        at com.symbol.emdk.barcode.Scanner.setConfig(Scanner.java:288)
        at com.carters.retail.omnichannel.features.scanner.Scanner.initializeScanner(Scanner.kt:111)


Also here's a code snippet from our app.

 

@Throws(ScannerException::class)
private fun initializeScanner() {
    if (zebraScanner == null) {
        isStarting = true

        // Get the Barcode Manager object
        barcodeManager = emdkListener.manager?.getInstance(EMDKManager.FEATURE_TYPE.BARCODE) as BarcodeManager

        // Get default scanner defined on the device
        zebraScanner = barcodeManager?.getDevice(BarcodeManager.DeviceIdentifier.DEFAULT)

        // Add data and status listeners
        zebraScanner?.addDataListener(dataListener)
        zebraScanner?.addStatusListener(statusListener)

        // Hard trigger. When this mode is set, the user has to manually
        // press the trigger on the device after issuing the read call.
        zebraScanner?.triggerType = ZebraScanner.TriggerType.HARD

        // Enable the scanner
        zebraScanner?.enable()

        val config = zebraScanner?.config
        config?.decoderParams?.i2of5?.enabled = true
        zebraScanner?.config = config

        // Starts an asynchronous Scan. The method will not turn ON the
        // scanner. It will, however, put the scanner in a state in which
        // the scanner can be turned ON either by pressing a hardware
        // trigger or can be turned ON automatically.
        zebraScanner?.read()
    }
    isStarting = false
    shouldCancelStart = false
}

 

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