No value for manufacturer
Hi, we upgraded to 2.0.0. Following exception is thrown:
org.json.JSONException: No value for manufacturer
at org.json.JSONObject.get(JSONObject.java:399)
at org.json.JSONObject.getString(JSONObject.java:560)
at com.jaredrummler.android.device.DeviceName$DeviceInfo.<init>(DeviceName.java:374)
at com.jaredrummler.android.device.DeviceName$DeviceInfo.<init>(DeviceName.java:347)
at com.jaredrummler.android.device.DeviceName.getDeviceInfo(DeviceName.java:186)
at com.jaredrummler.android.device.DeviceName.getDeviceName(DeviceName.java:138)
Just upgraded to 2.0.0 and found that manufacturer is marked deprecated. Looked around in the code for any mention but did not find any yet. The hint is that we are not supposed to use it but then what are we supposed to use instead?
Found that it could have a null manufacturer with Google Pixel 3a. Looking at the code, it might be related to SharedPrefs from previous version. It caches using the shared preferences and might have an old entry. Noticed that it is saving the manufacturer when it looks it up in the database. Worked around it by using the Build.MANUFACTURER from Android.
Kind of a blocker now. This library isn't usable currently
I am getting this crash on a Moto G4 Plus with the 2.0.0 version. I noticed it is just a warning log. At the end it is returning a proper value to DeviceName.getDeviceName(). I am getting "Moto G (5) Plus" which is fair enough (but my device is 4, not 5)
Same Error here with a Google Pixel 2
Same here on a Lenovo TB-8304F1
'manufacturer' is deprecated
manufacturer = info.manufacturer is null