问题
I am trying to classify Android phones Running my Apps by something related to the performance. I want to cut out all low quality devices to look at performance/crash rates on good quality phones.
I have the Device Model. For example, on the Samsung Galaxy S6 the value of Build.MODEL could be "SM-G920F", "SM-G920I", or "SM-G920W8". There is a related post about how to convert these into something human readable. Get Android Phone Model Programmatically
I would like to just group phones by quality of the device. The first thought that comes to mind is processor/GPU or resolution. Is there such a lookup table for the specs like there is for the name here?
回答1:
You should look into Google Analytics. They probably have what you need for your app. But if you're going to change User Experience depending on the phone they use, these links could help:
Android: Get Hardware Information Programmatically
Get Android Phone Model Programmatically
Try these:
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);
回答2:
You can use mobile device API https://specsapi.cc. Here is the cURL example:
curl -X GET “https://specsapi.cc/specification?limit=1&name=iphone%20xs%20max&year=2018” -H “accept: application/json”
They have several ready to use API client enter link description here
来源:https://stackoverflow.com/questions/38624319/get-android-phone-specs-programmatically