// fixed duration loading screen
function showLoadingScreen(durationInSeconds) {
if (!durationInSeconds) {
durationInSeconds = prompt("Enter the load duration in seconds", 3);
}
if (durationInSeconds) {
options = {
'duration': durationInSeconds
};
navigator.notification.loadingStart(options);
} else {
return;
}
}
// standard no duration loading screen, with min duration
var durationOptions = {
minDuration: 2
};
navigator.notification.loadingStart(durationOptions);
// do other stuff here... when stuff done, stop loading screen
navigator.notification.loadingStop();
Comments (0)
You don't have permission to comment on this page.