/cordova-plugin-device-descriptor

:green_apple: Cordova plugin to get the device's descriptor based on model (brand, name)

Primary LanguageJavaScriptMIT LicenseMIT

cordova-plugin-device-descriptor

Platform Donate

This is a cordova plugin to get device's descriptor based on model (brand, name).

Underlying components:

Installation

cordova plugin add cordova-plugin-device-descriptor

Supported Platforms

  • Android
  • iOS

Usage

document.addEventListener("deviceready", onDeviceReady, false);

function onDeviceReady() {
  window.descriptor.get(successCallback, errorCallback);
}

function successCallback(result) {
  console.log(result);
}

function errorCallback(error) {
  console.log(error);
}

The plugin returns a JSON object.

Android return value example

{
  brand: "LGE",
  device: "p1",
  model: "LG-H815",
  name: "LG G4"
}

iOS return value example

{
  brand: "Apple",
  name: 'iPhone 5c',
  model: 'iPhone5,3',
  ANumber: [ 'A1456', 'A1532' ],
  FCCID: [ 'BCG‑E2644A' ]
}

Author

Peter Bakondy

LICENSE

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