How can I get the device name programmatically in 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.
Android: Tap Device > Settings > Device information > Device name > Save.
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
android.os.Build.MANUFACTURER + android.os.Build.MODEL
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