I used device.uuid to get device id of the phone.
Is this you want or something else?
Full Example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN"
"http://www.w3.org/TR/html4/strict.dtd">
<html>
<head>
<title>Device
<http://docs.phonegap.com/phonegap_device_device.md.html#Device>
Properties Example</title>
<script type="text/javascript" charset="utf-8" src="phonegap.js"></script>
<script type="text/javascript" charset="utf-8">
// Wait for PhoneGap to load
//
function onLoad() {
document.addEventListener("deviceready
<http://docs.phonegap.com/phonegap_events_events.md.html#deviceready>",
onDeviceReady, false);
}
// PhoneGap is ready
//
function onDeviceReady() {
var element = document.getElementById('deviceProperties');
element.innerHTML = 'Device
<http://docs.phonegap.com/phonegap_device_device.md.html#Device> Name:
' + device.name
<http://docs.phonegap.com/phonegap_device_device.md.html#device.name>
+ '<br />' +
'Device
<http://docs.phonegap.com/phonegap_device_device.md.html#Device>
PhoneGap: ' + device.phonegap
<http://docs.phonegap.com/phonegap_device_device.md.html#device.phonegap>
+ '<br />' +
'Device
<http://docs.phonegap.com/phonegap_device_device.md.html#Device>
Platform: ' + device.platform
<http://docs.phonegap.com/phonegap_device_device.md.html#device.platform>
+ '<br />' +
'Device
<http://docs.phonegap.com/phonegap_device_device.md.html#Device> UUID:
' + device.uuid
<http://docs.phonegap.com/phonegap_device_device.md.html#device.uuid>
+ '<br />' +
'Device
<http://docs.phonegap.com/phonegap_device_device.md.html#Device>
Version: ' + device.version
<http://docs.phonegap.com/phonegap_device_device.md.html#device.version>
+ '<br />';
}
</script>
</head>
<body onload="onLoad()">
<p id="deviceProperties">Loading device properties...</p>
</body>
</html>
On Wed, Dec 8, 2010 at 10:48 AM, yanamala siddaiah <
[email protected]> wrote:
> HOw to get device id using phone gap application.
>
> device.uuid ; not working for this one .
>
> --
> You received this message because you are subscribed to the Google
> Groups "Android Developers" group.
> To post to this group, send email to [email protected]
> To unsubscribe from this group, send email to
> [email protected]<android-developers%[email protected]>
> For more options, visit this group at
> http://groups.google.com/group/android-developers?hl=en
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en