[java] Get Android Device Name

You can use:

From android doc:

MANUFACTURER:

String MANUFACTURER

The manufacturer of the product/hardware.

MODEL:

String MODEL

The end-user-visible name for the end product.

DEVICE:

String DEVICE

The name of the industrial design.

As a example:

String deviceName = android.os.Build.MANUFACTURER + " " + android.os.Build.MODEL;
//to add to textview
TextView textView = (TextView) findViewById(R.id.text_view);
textView.setText(deviceName);

Furthermore, their is lot of attribute in Build class that you can use, like:

  • os.android.Build.BOARD
  • os.android.Build.BRAND
  • os.android.Build.BOOTLOADER
  • os.android.Build.DISPLAY
  • os.android.Build.CPU_ABI
  • os.android.Build.PRODUCT
  • os.android.Build.HARDWARE
  • os.android.Build.ID

Also their is other ways you can get device name without using Build class(through the bluetooth).