Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I get the device name in Android?

Tags:

android

How can I get the device name programmatically in Android?

like image 626
Caner Avatar asked Jul 05 '11 08:07

Caner


People also ask

How do I change my device name on Android?

What to Know. Stock Android: Go to Settings > Bluetooth > Device Name > enter the new name > checkmark icon. Samsung: Go to Settings > About Phone > Device Name > enter the new name > Save. It's a good idea to set a unique name for privacy reasons; you can change the phone name multiple times.

How do I find the name of my device on Google?

Android: Tap Device > Settings > Device information > Device name > Save.


2 Answers

To display the device name/model in android use:

TextView tv1 = (TextView) findViewById(R.id.tv1); String str = android.os.Build.MODEL; tv1.setText(str); 

Link to Android Build Class

like image 152
Rahul Sharma Avatar answered Sep 25 '22 15:09

Rahul Sharma


android.os.Build.MANUFACTURER + android.os.Build.MODEL 
like image 21
diptia Avatar answered Sep 25 '22 15:09

diptia