cordova-plugin-device-descriptor

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


Keywords
cordova, device, descriptor, name, brand, identifier, ecosystem:cordova, cordova-android, cordova-ios
License
MIT
Install
npm install cordova-plugin-device-descriptor@1.0.2

Documentation

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.