Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get the device Model Name? [duplicate]

Tags:

android

How to get the device model name ? I have a Yuphoria 5010 which displays YU5010 in device Model Number, I want to fetch the full name of the device? I want the fetch the exact string given below:

Yuphoria 5010 6.0 Marshmallow

like image 778
Jim Raynor Avatar asked Jul 02 '16 06:07

Jim Raynor


People also ask

What is the model number of the device?

Step 1: Go to Settings. Step 2: Scroll down and tap About Phone or About Device. Step 3: You'll see the model number under the Model or Model Number subheading. As with Samsung, you may find your model number printed on the back of your phone in some cases.

How do I know the model of my Samsung phone?

2 The IMEI, Serial number and Model number are printed on the back of the device.


1 Answers

It was really simple, just call:

String model = Build.MODEL;

Update: This code will print the exact string you requested:

String reqString = Build.MANUFACTURER
                + " " + Build.MODEL + " " + Build.VERSION.RELEASE
                + " " + Build.VERSION_CODES.class.getFields()[android.os.Build.VERSION.SDK_INT].getName();

Prints:

Samsung Note 4 6.0 MARSHMALLOW

LGE LG-D410 4.4.2 KITKAT

like image 119
Hisham Muneer Avatar answered Sep 28 '22 06:09

Hisham Muneer