我希望能够获取用户定义的安卓手机设备/手机名称。我已经了解到android.os.Build.MODEL可以返回我的设备的确切型号,但是我想获取由用户或手机所有者设置的名称。
dumpsys | grep 'My new phone'
String userDeviceName = Settings.Global.getString(getContentResolver(), Settings.Global.DEVICE_NAME);
if(userDeviceName == null)
userDeviceName = Settings.Secure.getString(getContentResolver(), "bluetooth_name");
Settings.Global.getString(getContentResolver(), "device_name");