任何人都可以帮助我获取ios,windows和Android设备的deviceid,使用离子框架中的cordova插件进行混合应用。因为我是这个混合应用程序开发的新手,因此不止一件作品正在努力解决这个问题。任何帮助都可以理解。 感谢。
答案 0 :(得分:0)
看看this link,
用法:
module.controller('MyCtrl', function($scope, $cordovaDevice) {
document.addEventListener("deviceready", function () {
var device = $cordovaDevice.getDevice();
var cordova = $cordovaDevice.getCordova();
var model = $cordovaDevice.getModel();
var platform = $cordovaDevice.getPlatform();
var uuid = $cordovaDevice.getUUID();
var version = $cordovaDevice.getVersion();
}, false);
})
答案 1 :(得分:0)
使用IDFVPlugin:
cordova plugin add https://github.com/jcesarmobile/IDFVPlugin.git
在您的控制器中:
window.IDFVPlugin.getIdentifier(function(result){
alert(result);
},function(error){
alert(error);
});
来源:
https://github.com/jcesarmobile/IDFVPlugin
http://forum.ionicframework.com/t/how-to-get-iphone-unique-id-udid-in-ionic-framework-script/9575