Cordova开发-2 具体插件的使用

1.获取设备信息

 首先添加插件

  cordova plugin add corova-plugin-device 

 这样直接在页面调用

device.platform,device.uuid等就可以获取设备信息
这里device哪来的呢?
当我们通过插件安装后,会在cordova-plugins.js中生成
{
"id": "cordova-plugin-device.device",
"file": "plugins/cordova-plugin-device/www/device.js",
"pluginId": "cordova-plugin-device",
"clobbers": [
"device"
]
}
clobbers下面的device就是前端调用的





posted @ 2017-11-30 09:48  行藏在我  阅读(207)  评论(0编辑  收藏  举报