cordova-plugin-device

cordova-plugin-device

This plugin defines a global device object, which describes the device's hardware and software. Although the object is in the global scope, it is not available until after the deviceready event.

document.addEventListener("deviceready", onDeviceReady, false);
function onDeviceReady() {
    console.log(device.cordova);
}

Report issues with this plugin on the Apache Cordova issue tracker

Installation

cordova plugin add cordova-plugin-device

Prop