Jim Raynor Jim Raynor - 1 year ago 139
Android Question

How to get the device Model Name?

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

Answer Source

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();


Samsung Note 4 6.0 MARSHMALLOW

LGE LG-D410 4.4.2 KITKAT

Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download