GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - flolehmann/AndroidDeviceNames: A small Android library to get the market name of an Android device.

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

16 Commits
16 Commits

Folders and files

NameName
Last commit message
Last commit date
android-devices
android-devices
 
 
gradle/wrapper
gradle/wrapper
 
 
json
json
 
 
library
library
 
 
resources
resources
 
 
.gitignore
.gitignore
 
 
LICENSE.txt
LICENSE.txt
 
 
README.md
README.md
 
 
build.gradle
build.gradle
 
 
gradle.properties
gradle.properties
 
 
gradlew
gradlew
 
 
gradlew.bat
gradlew.bat
 
 
settings.gradle
settings.gradle
 
 

Repository files navigation

AndroidDeviceNames

A small Android library to get the market name of an Android device.


Unfortunately, on many popular devices, the market name of the device is not available. For example, on the Samsung Galaxy S6 the value of Build.MODEL could be "SM-G920F", "SM-G920I", "SM-G920W8", etc.

This small library gets the market (consumer friendly) name of a device. You can use one (or both) of the following examples:

Download

Download the latest AAR or grab via Gradle:

compile 'com.jaredrummler:android-device-names:1.0.1'

or Maven:

<dependency>
  <groupId>com.jaredrummler</groupId>
  <artifactId>android-device-names</artifactId>
  <version>1.0.1</version>
</dependency>

Or simply copy the DeviceName class intro your project, update the package declaration, and you are good to go.

Examples

Example 1

String deviceName = DeviceName.getDeviceName();

getDeviceName() contains over 600 popular Android devices and can be run on the UI thread. If the current device is not in the list then Build.MODEL will be returned as a fallback.

Example 2

DeviceName.with(context).request(new DeviceName.Callback() {

  @Override public void onFinished(DeviceName.DeviceInfo info, Exception error) {
    String deviceName;
    if (error != null) {
      deviceName = info.getName();
    } else {
      deviceName = DeviceName.getDeviceName();
    }
  }
 });

The above code loads JSON from a generated list of device names based on Google's maintained list. It will be up-to-date with Google's supported device list so that you will get the correct name for new or unknown devices.

About

A small Android library to get the market name of an Android device.

Resources

Readme
Apache-2.0 license
Activity

Stars

0 stars

Watchers

1 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.