无法以检索Build.MANUFACTURER器件HTC6435LVW的Droid DNA豪华 [英] Unable to retrive Build.MANUFACTURER on device HTC6435LVW Droid DNA Deluxe

查看:440
本文介绍了无法以检索Build.MANUFACTURER器件HTC6435LVW的Droid DNA豪华的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这看起来像一个非常基本的问题。

我无法取出一些基本信息,如 Build.MANUFACTURER Build.MODEL Build.VERSION.RELEASE

我的code工作在50岁以上的设备,但未能在 HTCC6435LVM 的Droid DNA豪华,Verizon的设备 )。是否有进行任何特殊权限需要这种设备?是否有任何其他可用的API来获取这些信息?

所有这些价值回归未知

  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);
 

感谢。

解决方案

这些由系统从文件中获取

/system/build.prop 。如果它的未来在你的code未知,这是因为它未设置,或者它明确设置为未知。

有没有什么可以真正做到这一点,虽然。它是由制造商设置的,如果他们没有做到这一点,那么就不会被设置。如果你扎根,您可以自己编辑的文件,但没有帮助,如果你在谈论其他用户。

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.

解决方案

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.

这篇关于无法以检索Build.MANUFACTURER器件HTC6435LVW的Droid DNA豪华的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆