【问题标题】:How to get mobile device UUID from an emulator in Kendo Mobile如何从 Kendo Mobile 中的模拟器获取移动设备 UUID
【发布时间】:2016-09-01 07:44:45
【问题描述】:

我正在使用剑道手机,我是新手,我在谷歌中搜索了有关获取设备 UUID 的信息,我得到了它并尝试使用它,它显示了一个名为 Uncaught ReferenceError: device is not defined下面需要帮助是我的代码

当我安装在安卓操作系统而不是模拟器中时它可以工作

document.addEventListener("deviceready", onDeviceReady, false);
    var deviceUID
function onDeviceReady() {

      deviceUID=device.uuid

     console.log(deviceUID);
 }

  //app.js//

  var app;
 (function () {app = new kendo.mobile.Application(document.body, { skin: 'flat', });}());

【问题讨论】:

    标签: kendo-ui phonegap-plugins cordova-plugins kendo-mobile


    【解决方案1】:

    为了获取设备ID,您需要在Deviceready功能中使用cli将org.apache.cordova.device插件安装到您的phonegap项目中,您需要输入以下代码。

    device.uuid
    

    【讨论】:

      猜你喜欢
      • 2020-08-08
      • 2018-04-14
      • 2014-12-08
      • 1970-01-01
      • 2019-12-24
      • 1970-01-01
      • 1970-01-01
      • 2011-03-31
      • 2020-07-10
      相关资源
      最近更新 更多