Scroll to top

How to get unique mobile ID (device Id) from mobile in cordova?

Get unique mobile ID (device Id)  from mobile in cordova.

  <script type=”text/javascript” charset=”utf-8″>

    // Wait for Cordova to load
    //
    document.addEventListener(“deviceready”, onDeviceReady, false);

    // Cordova is ready
    //
    function onDeviceReady() {

        var element = document.getElementById(‘deviceProperties’);

        element.innerHTML = ‘Device Name: ‘     + device.name     + ‘<br />’ +
                            ‘Device Cordova: ‘  + device.cordova  + ‘<br />’ +
                            ‘Device Platform: ‘ + device.platform + ‘<br />’ +
                            ‘Device UUID: ‘     + device.uuid     + ‘<br />’ +
                            ‘device model: ‘     + device.model     + ‘<br />’ +
                            ‘device manufacturer: ‘     + device.manufacturer     + ‘<br />’ +
                            ‘device isVirtual: ‘     + device.isVirtual    + ‘<br />’ +
                            ‘device serial: ‘     + device.serial    + ‘<br />’ +
                            ‘Device Version: ‘  + device.version  + ‘<br />’;
    }

</script>

Leave a Reply

Your email address will not be published.