以编程方式获取Android手机规格

时间:2016-07-27 22:35:30

标签: android android-hardware

我正在尝试通过与性能相关的内容对Android手机进行分类。我想削减所有低质量设备,以查看优质手机的性能/崩溃率。

我有设备型号。例如,在三星Galaxy S6上,Build.MODEL的值可能是" SM-G920F"," SM-G920I"或" SM-G920W8"。有一篇关于如何将这些转化为人类可读的内容的相关文章。 Get Android Phone Model Programmatically

我想按照设备的质量分组手机。想到的第一个想法是处理器/ GPU或分辨率。是否存在类似于名称here的规格的查找表?

2 个答案:

答案 0 :(得分:1)

您应该查看Google Analytics。他们可能拥有您的应用所需的一切。但是,如果您要根据他们使用的手机更改用户体验,这些链接可能有所帮助:

Android: Get Hardware Information Programmatically

Get Android Phone Model Programmatically

试试这些:

    Log.i("TAG", "SERIAL: " + Build.SERIAL);
    Log.i("TAG","MODEL: " + Build.MODEL);
    Log.i("TAG","ID: " + Build.ID);
    Log.i("TAG","Manufacture: " + Build.MANUFACTURER);
    Log.i("TAG","brand: " + Build.BRAND);
    Log.i("TAG","type: " + Build.TYPE);
    Log.i("TAG","user: " + Build.USER);
    Log.i("TAG","BASE: " + Build.VERSION_CODES.BASE);
    Log.i("TAG","INCREMENTAL " + Build.VERSION.INCREMENTAL);
    Log.i("TAG","SDK  " + Build.VERSION.SDK);
    Log.i("TAG","BOARD: " + Build.BOARD);
    Log.i("TAG","BRAND " + Build.BRAND);
    Log.i("TAG","HOST " + Build.HOST);
    Log.i("TAG","FINGERPRINT: "+Build.FINGERPRINT);
    Log.i("TAG","Version Code: " + Build.VERSION.RELEASE);

答案 1 :(得分:0)

您可以使用移动设备API https://specsapi.cc。这是cURL示例:

curl -X GET “https://specsapi.cc/specification?limit=1&name=iphone%20xs%20max&year=2018” -H “accept: application/json” 

他们有几个可以随时使用的API客户端enter link description here