Search code examples
javaandroiddevice-name

Get Android Device Name


How to get Android device name? I am using HTC desire. When I connected it via HTC Sync the software is displaying the Name 'HTC Smith' . I would like to fetch this name via code.

How is this possible in Android?


Solution

  • In order to get Android device name you have to add only a single line of code:

    android.os.Build.MODEL;
    

    Found here: getting-android-device-name