0

The Android SDK class Build.VERSION gives programmatic access to many (relatively) hard-wired values from the phone, as has been discussed in several other threads. But I am looking for a way to access the "Device name" value the user can enter/change from the About Phone dialog.

When I first went to About Phone on my Galaxy S4, the "Device name" value was SCH-1545, which is the same value as I get if I print out android.os.Build.MODEL

The phone lets me enter a new value, say, "Foo bar" but, as I rather expected, that did not change the value of android.os.Build.MODEL, even after rebooting the phone. Nor did it change the value of android.os.Build.USER which seemed the only other field it might affect.

Is there a way to access the value that the user can change/see?

Anne Gunn
  • 2,347
  • 1
  • 28
  • 42
  • possible duplicate of [How do you get the user defined "Device Name" in android?](http://stackoverflow.com/q/16704597/3204827) – Howli Apr 16 '14 at 08:31

2 Answers2

0

That is most probably the device name from Bluetooth.

Use BluetoothAdapter to access the name.

Mikel
  • 1,581
  • 17
  • 35
0

Actually, it turns out that this question is essentially a duplicate of another question which I was unable to find with my original search terms and I have since up-voted. The short answer is: yes, for some phones but not in the general case, AND you have to request bluetooth permission to use the call that can do it. IOW, ugh, no not really.

I'm leaving this question up in the hope that the terminology I use may help another searcher find the answer more quickly.

Community
  • 1
  • 1
Anne Gunn
  • 2,347
  • 1
  • 28
  • 42