tslamic / AndroidDeviceNames
posted
Category: Not classified
Minimum SDK Level: None (1 | 1.0)

Badge

View in Github Github project information
Starred: 141
Forks: 18
Watchers: 11
Open Issues: 2

Snapshot pictures

No snapshot for this library yet.

Description

Android Device Names is a 14 kB library that transforms the device model name into something people can understand. For example, a useless SM-N910W8 becomes Samsung Galaxy Note 4. Here's how to use it:

// returns "Samsung Galaxy Note 4"
DeviceNames.getDeviceName("SM-N910W8", "Unknown Device");

To get the name of the device you're currently running on, use

DeviceNames.getCurrentDeviceName("Unknown Device");

Currently, the library recognises about 400 devices. In case the device model is not in the list, a fallback is returned:

// returns "Unknown Device"
DeviceNames.getDeviceName("unknown_device_model", "Unknown Device");
0

See also

No related library.