如何检索IMEI不使用NativeAndroid/手机差距黑莓10

how to retrieve IMEI no using NativeAndroid/Phone Gap for Blackberry 10

本文关键字:手机 NativeAndroid 差距 何检索 检索 IMEI      更新时间:2023-09-26

我正在移植android应用程序到bb10。我无法从这个android移植应用程序中检索IMEI号码,是否有任何方法我可以在android应用程序中使用PhoneGap脚本文件,通过创建本地html并使用java脚本使用以下概念使用PhoneGap检索IMEI号码

http://developer.android.com/guide/webapps/webview.html BindingJavaScript

目前,我尝试使用下面的javascript检索IMEI no

   <script type="text/javascript" charset="utf-8" src="js/phonegap.js"></script>
</head>
<script type="text/javascript">
    function showAndroidToast(toast) {  
    Android.showToast('kkkkkkk');       
    var idno = device.uuid ;
var string = device.version;
Android.showToast('idno' + string); 
Android.showToast('string ' + idno); 
toast = toast + idno;
    Android.showToast(toast);
    }
</script>

我得到null的值,我正在测试它在BB 10开发Alpha设备。

是否有其他的解决方法?

IMEI不可用于第三方应用程序。你想用这些信息做什么?

我问这个问题的原因是因为我们刚刚发布了BlackBerry WebWorks(如PhoneGap)的扩展,可以检索可以识别当前运营商的移动网络代码(MNC)。你对构建自定义插件有多熟悉?如果是这样,你可以将这个本地代码移植到PhoneGap插件中:

https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10/deviceInfo

修复黑莓10.1版本的问题。IMEI号码是从这个操作系统版本中使用原生android代码检索的。