当前位置:   article > 正文

js获取唯一设备码_使用Javascript获取设备的唯一 id_javascript_酷徒编程知识库

js获取设备id

你可以为此目的访问设备的uuid

在Phonegap中你可以使用Cordova设备插件/* Android: Returns a random 64-bit integer (as a string, again!)

The integer is generated on the device's first boot

BlackBerry: Returns the PIN number of the device

This is a nine-digit unique integer (as a string, though!)

iPhone: (Paraphrased from the UIDevice Class documentation)

Returns a string of hash values created from multiple hardware identifies.

It is guaranteed to be unique for every device and can't be tied

to the user account.

Windows Phone 7 : Returns a hash of device+current user,

if the user is not defined, a guid is generated and will persist until the app is uninstalled

Tizen: returns the device IMEI (International Mobile Equipment Identity or IMEI is a number

unique to every GSM and UMTS mobile phone. */

var deviceID = device.uuid;

在MoSync中你可以使用Javascript

Device Properties Example

// Wait for Wormhole to load

//

document.addEventListener("deviceready", onDeviceReady, false);

// Wormhole is ready

//

function onDeviceReady() {

var element = document.getElementById('deviceProperties');

element.innerHTML = 'Device Name: ' + device.name + '
' +

'Device Platform: ' + device.platform + '
' +

'Device UUID: ' + device.uuid + '
' +

'Device Version: ' + device.version + '
';

}

Loading device properties...

声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/321043
推荐阅读
相关标签
  

闽ICP备14008679号