Last active
January 16, 2018 21:35
-
-
Save rjlutz/801ba7409c5a9c188c6027a00196e878 to your computer and use it in GitHub Desktop.
notesf for basic cordova app w/notification dialog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add | |
<button id="aboutBtn">About</button> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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!"); | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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