Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to detect a mobile device manufacturer and model programmatically in Android?

Tags:

android

device

I want to find device specification of a mobile phone for examples, the device manufacturer, model no ( and may be types of sensors in the device, wifi chipset etc..). I want to get the device manufacture/model number (eg. Samsung GT-I9100 i.e Galaxy S2) programmatically. The manufacture/model number is also used in Google Play when installing an app. I want to use this information to make some configuration changes in my hardware dependent app (for eg. power measurement).

like image 398
Shan Avatar asked Jul 05 '13 12:07

Shan


People also ask

How do I find the make and model of my Android phone?

The easiest way to check your phone's model name and number is to use the phone itself. Go to the Settings or Options menu, scroll to the bottom of the list, and check 'About phone', 'About device' or similar. The device name and model number should be listed.

What is device manufacturer for Android?

Android is developed by Google until the latest changes and updates are ready to be released, at which point the source code is made available to the Android Open Source Project (AOSP), an open source initiative led by Google.


2 Answers

You can get as below:

String deviceName = android.os.Build.MODEL; String deviceMan = android.os.Build.MANUFACTURER; 

For more other device details, Please refer this document: android.os.Build

like image 79
Avadhani Y Avatar answered Sep 17 '22 19:09

Avadhani Y


I just wanna elaborate on how to use the built in Attribute for the future visitors. You can use this method in identifying a Kindle Device(s)

public static boolean isKindle(){         final String AMAZON = "Amazon";         final String KINDLE_FIRE = "Kindle Fire";          return (Build.MANUFACTURER.equals(AMAZON) && Build.MODEL.equals(KINDLE_FIRE) ) || Build.MODEL.startsWith("KF"); }  
like image 37
neferpitou Avatar answered Sep 20 '22 19:09

neferpitou