Question

I am porting android app to BB 10.I am not able to retrieve IMEI number from this android porting application ,Is there any way i can use PhoneGap script file in android app ,by creating a local html and using java script to retrieve the IMEI number using Phone Gap using the below concept

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

Presently, I tried using javascript below to retrieve 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>

I am getting the value of null,I am testing it in BB 10 dev Alpha device.

Is there any other workaround for it?

Was it helpful?

Solution 2

Issue fixed in Blackberry 10.1 versions.IMEI number is retreived from this OS versions using native android code.

OTHER TIPS

IMEI is not available to 3rd party apps. What are you trying to do with that info?

The reason I ask is because we just published an extension for BlackBerry WebWorks (like PhoneGap) here that retrieves the Mobile Network Code (MNC) which can identify the current carrier. How comfortable are you with building custom-plugins? If so, you may be able to port this native code into a PhoneGap plugin:

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

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top