I wanna get android device name (i.e. the "name" that user can change through settings and that you can find under "Settings > About device > Device name").
Other developers recommend to get this name through bluetooth.
But on my device (Samsung Galaxy S4) this name is only updated when I enable bluetooth, so if I change the name when bluetooth is disabled : the new name won't be displayed until I enable bluetooth.
I'm wondering if there is a way to get the updated device name without enabling bluetooth? I can think of a workaround like :
- enabling bluetooth
- get name
- disable bluetooth
but I was wondering if a more elegant solution exists.