I want to get my android phone device/phone name that defined by user. I already know android.os.Build.MODEL which return exact model of my device, But I want to get the name that sate by user or owner of the phone.
The problem is that not all Android devices have such a custom name, therefor there is no direct way of getting it reliable.
What I have experienced (at least for Samsung) is that the user-defined name is also used for the WifiP2pDevice name: http://developer.android.com/reference/android/net/wifi/p2p/WifiP2pDevice.html
Some manufacturers also use it as the default Bluetooth-Name or as the Hostname, anyway you can check what property is used for your phone by using dumpsys in an adb shell
dumpsys | grep 'My new phone'
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