Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get device name from phone settings in android

Tags:

android

How to read the device name from phone setting in android, As shown in below image how to read the first field that is "device name" in android.

In some phones, the device name is the same as the model name but in some phones both are different so how to particular read device name from phone settings inenter image description here android?

Any help is appreciated!


1 Answers

here you go

Settings.Global.getString(getContentResolver(), Settings.Global.DEVICE_NAME)
like image 91
Priyanka Avatar answered Oct 25 '25 17:10

Priyanka



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!