Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to get Samsung Android Device Name programmatically?

Tags:

android

Other similar questions in SO are answered by retrieving the Build.MODEL name.

But what I would really like is to get the customizable Device name on Samsung Devices. I know it is customizable because on my Galaxy Note, I can change it from the settings->About device. For example, below, I would like to retrieve the "Milky Way" string.

enter image description here

like image 401
hopia Avatar asked May 28 '14 16:05

hopia


People also ask

How do I find my android device name?

Open the Settings app to check your device information: Tap About phone. Take note of your device name.

How do I find Android hardware information?

For Android 7 : go to "Settings" > "About" > "Hardware information".

How do I make my device name flutter?

IosDeviceInfo iosDeviceInfo = await deviceInfo. iosInfo; print('device name ${iosDeviceInfo.name}');


1 Answers

There is no common way getting this, since it's not a "android-feature" more likely a Samsung Feature afaik.

Try getting it with this, which worked on my galaxy s3, s4 and s5

BluetoothAdapter myDevice = BluetoothAdapter.getDefaultAdapter();
String deviceName = myDevice.getName();

Do not forget to add the bluetooth permissions.

<uses-permission android:name="android.permission.BLUETOOTH"/>
like image 154
Emanuel S Avatar answered Oct 11 '22 15:10

Emanuel S