Reputation: 3661
This looks like a very basic question.
I am unable to retrieve a few basic information like
Build.MANUFACTURER
, Build.MODEL
, and Build.VERSION.RELEASE
.
My code works in 50+ devices but fails in HTCC6435LVM
(Droid DNA Deluxe, Verizon Device
). Are there be any kind of special permissions required for this device? Is there any other API available to retrieve this information?
All these value return "unknown"
TextView tvModel = (TextView) findViewById(R.id.model);
tvModel.setText(Build.MODEL);
TextView tvmanuf = (TextView) findViewById(R.id.manufacturer);
tvManuf.setText(Build.MANUFACTURER);
TextView tvversion = (TextView) findViewById(R.id.version);
tvVersion.setText(Build.VERSION.RELEASE);
Thanks.
Upvotes: 2
Views: 1329
Reputation: 1
this is returning "unknown" from user space; if we place the same app in system space its returning proper values.
I tried by invoking methods/fields with reflectionfrom android.os.Build.java / SystemProperties.java files still no use...
Not sure why HTC wants to hide such info..
Upvotes: 0
Reputation: 22342
These are obtained by the system from the file /system/build.prop
. If it's coming up as "unknown" in your code, it's because it's either not set, or it's set explicitly to "unknown".
There's not much you can really do about this, though. It's set by the manufacturer, and if they failed to do it, then it won't be set. If you're rooted, you can edit the file yourself, but that doesn't help if you're talking about other users.
Upvotes: 3