Socket
Book a DemoInstallSign in
Socket

android-model-names

Package Overview
Dependencies
Maintainers
2
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

android-model-names

Convert Android device strings to human-readable manufacturer and model names

1.1.0
latest
npmnpm
Version published
Weekly downloads
7
-30%
Maintainers
2
Weekly downloads
 
Created
Source

Android Model Names

A tiny helper library to convert Android hardware strings ("GT-I9060") into human-readable model names ("Galaxy Grand Neo").

Supports all devices that are compatible with Google Play. See Translation Sources for more info.

Usage

First, install the library:

npm install --save android-model-names

Then, import and use:

import getModelName from 'android-model-names';

getModelName('GT-I9060'); // 'Galaxy Grand Neo'
getModelName('GT-I9060', { full: true }); // { manufacturer: 'Samsung', model: 'Galaxy Grand Neo', key: 'GT-I9060' }

// Examples with no matching result
getModelName('GT-I9999'); // 'GT-I9999'
getModelName('GT-I9999', { full: true }); // { key: 'GT-I9060' }

Options

An options hash can be passed in as a second parameter to customize the return data. Here are the available options:

OptionDefault ValueDescription
fullfalseReturn an object with manufacturer, marketing name (model), and original string key.

Translation Sources

The translations are pulled straight from Google's support page on supported Google Play devices, which is an exhaustive enough list for this purpose.

View the full device list here in CSV format.

Missing a model? Found a bug?

We welcome contributions! Feel free to open an issue (or a PR!) if you notice any missing models (new releases, etc.), or spot a bug. Thanks!

License

Copyright 2016 Twitter, Inc.

Licensed under the MIT License: https://opensource.org/licenses/MIT

Keywords

android

FAQs

Package last updated on 25 Oct 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

About

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.

  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc

U.S. Patent No. 12,346,443 & 12,314,394. Other pending.