Skip to content

Instantly share code, notes, and snippets.

@rjlutz rjlutz/edit html
Last active Jan 16, 2018

Embed
What would you like to do?
notesf for basic cordova app w/notification dialog
add
<button id="aboutBtn">About</button>
add to onDeviceReady:
document.getElementById("aboutBtn").addEventListener("click", dialogAlert);
add before app.initialize()
function dialogAlert() {
var message = "Bob Lutz, ITEC 4550!";
var title = "About";
var buttonName = "Dismiss";
navigator.notification.alert(message, alertCallback, title, buttonName);
function alertCallback() {
console.log("Thanks for visiting!");
}
}
cordova create aug22 edu.ggc.lutz.firstapp "First App"
cd aug22
cordova platform add android
cordova plugin add cordova-plugin-console
cordova plugin add cordova-plugin-dialogs
cordova run android
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.