New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

android-device-list

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

android-device-list

List of Android Supported Devices

  • 1.2.10
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
2.5K
decreased by-46.19%
Maintainers
1
Weekly downloads
 
Created
Source

Android device list

npm

A JSON list created from Google Play Supported devices CVS.

Source: https://support.google.com/googleplay/android-developer/answer/6154891?hl=en

Install

$ npm install android-device-list

Usage

.deviceList() : Array

Returns the full device list

.brandList() : Array

Returns the full brand list

.getDevicesByBrand(brand, [options]) : Array

Returns a device list with matching retail brand.

options is an Object.

  • caseInsensitive: boolean (default false) - do not care of case type
  • contains: boolean (default false) - return partial (substring) results too

.getDevicesByName(name, [options]) : Array

Returns a device list with matching marketing name.

.getDevicesByDeviceId(deviceId, [options]) : Array

Returns a device list with matching build.os.DEVICE.

.getDevicesByModel(model, [options]) : Array

Returns a device list with matching build.os.MODEL.

Example

var androidDevices = require('android-device-list');

var devices = androidDevices.deviceList();
var brands = androidDevices.brandList();

console.log(devices.length);
// 11174

console.log(brands.length);
// 485

console.log(brands[209]);
// 'LGE'

var LGDevices;

LGDevices = androidDevices.getDevicesByBrand('lg');
console.log(LGDevices.length);
// 0

LGDevices = androidDevices.getDevicesByBrand('LG');
console.log(LGDevices.length);
// 0

LGDevices = androidDevices.getDevicesByBrand('lg', { contains: true, caseInsensitive: true });
console.log(LGDevices.length);
// 902

LGDevices = androidDevices.getDevicesByBrand('LG', { contains: true });
console.log(LGDevices.length);
// 901


LGDevices = androidDevices.getDevicesByBrand('LGE');
console.log(LGDevices.length);
// 896

console.log(LGDevices[403]);
// { brand: 'LGE', name: 'LG G4', device: 'p1', model: 'LG-H815' }

License

android-device-list is licensed under the MIT Open Source license. For more information, see the LICENSE file in this repository.

Keywords

FAQs

Package last updated on 04 Apr 2023

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

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc