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).
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.
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.
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
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"); }
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With