-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
DeviceSample API crash #8
Comments
Hi Mattias, thank you for your reporting. Take into account that the version of Memor10 installed on your device could not support the Datalogic SDK v1.20 released on August. thank you, |
Hi, Thanks for quick reply. I'm sorry I mixed something. I'm using v1.20 within my application, the Datalogic DeviceSample APi is using 1.17.
Thanks upfront. |
Thank you Mattias for the clarification. Thanks, |
Hi, build number: 0.02.07.20180810 KR Mattias |
Your device supports Datalogic SDK v1.08, as you can check from the Settings. But the features of com.datalogic.battery (reported by your error log) have been introduced by Datalogic SDK v1.13. So, you should update your device with a newer sw version, if you need to interface with new feature of Datalogic SDK. MP |
Hi,
The DeviceSampleAPI in particular the Battery activity is crashing already within the onCreate.
--------- beginning of crash 2019-08-27 14:26:54.980 26184-26184/com.datalogic.examples.devicesampleapi E/AndroidRuntime: FATAL EXCEPTION: main Process: com.datalogic.examples.devicesampleapi, PID: 26184 java.lang.RuntimeException: Unable to start activity ComponentInfo{com.datalogic.examples.devicesampleapi/com.datalogic.examples.devicesampleapi.BatteryActivity}: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.datalogic.device.battery.DLBatteryManager.getIntProperty(com.datalogic.device.battery.BatteryInfo)' on a null object reference at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2805) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1613) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857) Caused by: java.lang.NullPointerException: Attempt to invoke virtual method 'int com.datalogic.device.battery.DLBatteryManager.getIntProperty(com.datalogic.device.battery.BatteryInfo)' on a null object reference at com.datalogic.examples.devicesampleapi.BatteryActivity.getBatteryInfo(BatteryActivity.java:70) at com.datalogic.examples.devicesampleapi.BatteryActivity.setText(BatteryActivity.java:43) at com.datalogic.examples.devicesampleapi.BatteryActivity.onCreate(BatteryActivity.java:37) at android.app.Activity.performCreate(Activity.java:7023) at android.app.Activity.performCreate(Activity.java:7014) at android.app.Instrumentation.callActivityOnCreate(Instrumentation.java:1214) at android.app.ActivityThread.performLaunchActivity(ActivityThread.java:2758) at android.app.ActivityThread.handleLaunchActivity(ActivityThread.java:2883) at android.app.ActivityThread.-wrap11(Unknown Source:0) at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1613) at android.os.Handler.dispatchMessage(Handler.java:106) at android.os.Looper.loop(Looper.java:164) at android.app.ActivityThread.main(ActivityThread.java:6523) at java.lang.reflect.Method.invoke(Native Method) at com.android.internal.os.RuntimeInit$MethodAndArgsCaller.run(RuntimeInit.java:438) at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:857) 2019-08-27 14:26:54.986 987-1307/? W/ActivityManager: Force finishing activity com.datalogic.examples.devicesampleapi/.BatteryActivity 2019-08-27 14:26:54.990 987-1307/? W/ActivityManager: Force finishing activity com.datalogic.examples.devicesampleapi/.DeviceAPITest
It seems that there is an issue around this line:
DLBatteryManager deviceBattery = DLBatteryManager.getInstance();
Info:
My general goal is to accomplish to get additional BatteryInfo like CAPACITY_FULL, PRODUCTION_YEAR, SERIAL_NUMBER and so on.
Thanks for any help.
KR
The text was updated successfully, but these errors were encountered: