Get Android Device Name

Zach picture Zach · Aug 15, 2011 · Viewed 195.7k times · Source

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?

Answer

hbhakhra picture hbhakhra · Aug 16, 2011

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