1.1.4 • Published 5 years ago
cordova-plugin-jb-device v1.1.4
title: JBDevice
description: Get device information.
基于cordova-plugin-device 2.0.3-dev版本修改
cordova-plugin-jb-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);
}
Installation
cordova plugin add cordova-plugin-jb-device
Properties
- cordova
- model
- platform
- uniqueid
- version
- imei
- manufacturer
- isVirtual
- idfa
cordova.plugins.JBDevice.getInfo(function(info){ var html = " 设备上的cordova版本:" + info.cordova + " 设备名称:" + info.model + " 设备平台系统:" + info.platform + " 设备唯一标识符" + info.uniqueid + " 设备imei" + info.imei + " 设备平台操作系统版本号:" + info.version + " 设备平台制造商:" + info.manufacturer+" idfa:" + info.idfa ;
alert(html);
},function(error){
});
##1.1.4
去掉了android中的获取IMEI,并且不再询问允许电话权限