Skip to content
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

No value for manufacturer #35

Open
prechtelm opened this issue Mar 31, 2020 · 7 comments
Open

No value for manufacturer #35

prechtelm opened this issue Mar 31, 2020 · 7 comments

Comments

@prechtelm
Copy link

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)
@jeffreymuir
Copy link

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?

@jeffreymuir
Copy link

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.

@Climax777
Copy link

Kind of a blocker now. This library isn't usable currently

@arlm1
Copy link

arlm1 commented Jul 3, 2020

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)

@ChrAnd2
Copy link

ChrAnd2 commented Jul 8, 2020

Same Error here with a Google Pixel 2

@digitaldjango
Copy link

Same here on a Lenovo TB-8304F1

@shahramomidvar
Copy link

'manufacturer' is deprecated
Untitled

manufacturer = info.manufacturer is null

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

7 participants