Android: Get the device name programmatically

Viewed 23125

This is what I tried.

mTextView.setText("MODEL: "+android.os.Build.MODEL
                +"\nDEVICE: "+android.os.Build.DEVICE
                +"\nBRAND: "+android.os.Build.BRAND
                +"\nDISPLAY: "+android.os.Build.DISPLAY
                +"\nBOARD: "+android.os.Build.BOARD
                +"\nHOST: "+android.os.Build.HOST
                +"\nMANUFACTURER: "+android.os.Build.MANUFACTURER
                +"\nPRODUCT: "+android.os.Build.PRODUCT);

Can anyone tell me how to get these outputs:
Samsung Galaxy S
Samsung note 3
Sony Xperia z
Sony Xperai z1
Samsung Grand

for nexus it shows nexus 4 or nexus 7 not the same case with sony or samsung.

4 Answers

Download csv from here:

https://support.google.com/googleplay/answer/1727131?hl=en

See if your device works with Google Play by checking the list below. When you download the PDF file, devices are ordered alphabetically (A-Z) by manufacturer name.

Then import this file into your database.

Query RetailBranding and Marketing Name by Model = Build.Model.

To have a better performance, put these data in your database server.

Get the RetailBranding and Marketing Name when the app is first launched and save it to the local database.

Related