X
X
xmoonlight2015-06-23 13:54:34
phonegap
xmoonlight, 2015-06-23 13:54:34

How to basic display the UUID of a device in PhoneGap?

Comrades, help!
I created an application by default: phonegap create my1
I'm trying to build for Android 2.3.3 (API 10)
In the config.xml I wrote: "android-minSdkVersion" value="10"
On the virtual machine: phonegap logo (robot) and the inscription "Device Ready" "shimmers green (everything seems to be ok.)
Task: you need to display the UUID of the device through the usual alert () after the application starts.
Nothing comes out: no reaction. As soon as I have not tried ....
1. Do I need to put extra for this. Are plugins or CORE plugins already enabled when creating the project?
2. How to start your script STRICTLY AFTER! initialization of all application events, when it will be possible to interact with the API, similar to $(document ).ready() ?
(only without jquery!
Versions:

=====[ PhoneGap ]=========
5.0.0-0.28.1
=====[ Cordova ]=========
5.1.1
In advance, Thanks everyone for your help!

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
Bob, 2015-07-02
@xmoonlight

This listener monitors the start of the application:

document.addEventListener( "deviceready", function() {
  alert( device.uuid );
}, false );

well, or display the value in some DOM element
var div = document.getElementById( 'result' );
div.innerHTML = device.uuid;

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question