I use phonegap Navigator.notification.alert to show a alert one my iPhone app.
But when I call the Navigator.notification.alert, there is nothing shown on the screen.
Then when I try to leave the app(double-click the home button),or I leave the app then open it again.
The alert pop up.
So I thing the function Navigator.notification.alert was working, but something stoped the alert from popping up on the screen.
And not just the alert,the Navigator.notification.confirm function also can not popup.
What would Cause This?
Thanks for any reply.
I tested out and it is working as expected,
Please make sure you installed the notification plugin,
$cordova plugin add org.apache.cordova.dialogs
and check you XML,
<feature name="Notification">
<param name="ios-package" value="CDVNotification" />
</feature>
If still exists use it as an event as mentioned below,
document.addEventListener("deviceready", showAlert, false);
function showAlert() {
navigator.notification.alert(
'Test Alert on Device Ready!',
alertDismissed,
'Testing',
'Ok'
);
}
function alertDismissed() {
// do something
}
For more info click here. Hope this helps.