Coder Social home page Coder Social logo

deviceidentifierswrapper-sample's People

Contributors

ltrudu avatar

Watchers

 avatar

Forkers

zaitarzakarya

deviceidentifierswrapper-sample's Issues

not working on A13

this wrapper sample fails to work on A13 zebra devices
unless you grant accessmgr to com.zebra.emdk_deviceidentifiers_sample
content://oem_info/oem.zebra.secure/build_serial
content://oem_info/wan/imei   
content://oem_info/oem.zebra.secure/bt_mac

Ability to run on Emulator - Default Values

We have an application that we're working on where we're trying to also load a local deployed version of a webapp using a webview. An issue we face is that we want to be able to fallback to a hardcoded serial number in the case where EMDK/Zebra libraries are not available (in our case, when using an emulator).

Currently, I have no way to try/catch the DIHelper functions in a way that allows me to fallback to sending a default value. On the emulator we get the following error (which is something we completely expect to happen):

11-23 13:43:04.328  9320  9346 E AndroidRuntime: java.lang.RuntimeException: An error occurred while executing doInBackground()
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at android.os.AsyncTask$4.done(AsyncTask.java:415)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.finishCompletion(FutureTask.java:383)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.setException(FutureTask.java:252)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:271)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at android.os.AsyncTask$SerialExecutor$1.run(AsyncTask.java:305)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1167)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:641)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.lang.Thread.run(Thread.java:923)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: Caused by: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/symbol/emdk/EMDKManager$StatusListener;
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at com.zebra.deviceidentifierswrapper.RetrieveOEMInfoTask.registerCurrentApplication(RetrieveOEMInfoTask.java:148)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at com.zebra.deviceidentifierswrapper.RetrieveOEMInfoTask.RetrieveOEMInfo(RetrieveOEMInfoTask.java:50)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at com.zebra.deviceidentifierswrapper.RetrieveOEMInfoTask.doInBackground(RetrieveOEMInfoTask.java:35)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at com.zebra.deviceidentifierswrapper.RetrieveOEMInfoTask.doInBackground(RetrieveOEMInfoTask.java:28)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at android.os.AsyncTask$3.call(AsyncTask.java:394)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	at java.util.concurrent.FutureTask.run(FutureTask.java:266)
11-23 13:43:04.328  9320  9346 E AndroidRuntime: 	... 4 more
11-23 13:43:04.328  9320  9346 E AndroidRuntime: Caused by: java.lang.ClassNotFoundException: Didn't find class "com.symbol.emdk.EMDKManager$StatusListener"

When I wrap the DIHelper.getSerialNumber(<...>) call, it simply crashes the app with a Runtime exception that I can't seem to catch.

Would you mind working with me here to perhaps create a way to reliably fall out of the async task and return an error if libraries aren't available to call? One piece of the puzzle was to include android:required="false" for the uses-library statements in the manifest.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.