ltrudu / deviceidentifierswrapper-sample Goto Github PK
View Code? Open in Web Editor NEWA sample of the DeviceIdentifiersWrapper
License: MIT License
A sample of the DeviceIdentifiersWrapper
License: MIT License
Hi,
could you also offer a synchronous method to get the device id?
Thank you
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
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.