-
Notifications
You must be signed in to change notification settings - Fork 184
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
Exception thrown for missing manufacturer when retrieving getDeviceName() #40
Comments
I have the same trouble.
Got error:
|
Same for me Samsung galaxy Note 9 |
I am using AndroidDeviceNames library in the banking app and found a problem:
In this section of code, printStackTrace() outputs all exceptions to the console, even in the release build of the app. This behavior reduces the security of the application. If the library can perform its functions successfully without annoying stack trace in the console, then you don't need to output extra information to the console. If you need to get this information when developing the library, then it is better to run printStackTrace() in the library version only for the developers of the library itself. To do this, you can use Timber library or your custom logger. Please fix the specified problem. |
Faced this too. |
Hello,
I am using the library to retrieve the device market name, which works, but i always see this exception below for the missing manufacturer?
org.json.JSONException: No value for manufacturer
at org.json.JSONObject.get(JSONObject.java:389)
at org.json.JSONObject.getString(JSONObject.java:550)
at com.jaredrummler.android.device.DeviceName$DeviceInfo.(DeviceName.java:374)
at com.jaredrummler.android.device.DeviceName$DeviceInfo.(DeviceName.java:347)
at com.jaredrummler.android.device.DeviceName.getDeviceInfo(DeviceName.java:186)
at com.jaredrummler.android.device.DeviceName.getDeviceName(DeviceName.java:138)
at com.jaredrummler.android.device.DeviceName.getDeviceName(DeviceName.java:111)
at com.atos.ucc.g3pten.core.services.G3PTenService.setDeviceInformation(G3PTenService.kt:307)
at com.atos.ucc.g3pten.core.services.G3PTenService.setup(G3PTenService.kt:143)
at com.atos.ucc.g3pten.core.services.G3PTenService.onCreate(G3PTenService.kt:100)
at android.app.ActivityThread.handleCreateService(ActivityThread.java:3522)
at android.app.ActivityThread.-wrap6(ActivityThread.java)
at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1740)
at android.os.Handler.dispatchMessage(Handler.java:102)
at android.os.Looper.loop(Looper.java:154)
at android.app.ActivityThread.main(ActivityThread.java:6688)
at java.lang.reflect.Method.invoke(Native Method)
at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:1468)
at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:1358)
It is a very simple code:
I have initialized the lib:
DeviceName.init(this)
Then call:
The text was updated successfully, but these errors were encountered: