Created
August 29, 2012 16:02
-
-
Save willkoper/3514870 to your computer and use it in GitHub Desktop.
Cordova js excerpt
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
function onDeviceReady(){ | |
if(window.location.hash){ | |
//resuming from saved state | |
getPhoto("resume"); | |
function getPhoto (source){ | |
//callbacks defined within this function | |
if(source === "resume"){ | |
//execute cb based on saved instance | |
//there was an if(window.cordova) here, but I removed since it's running in the onDeviceReady func. | |
alert("Resuming from saved state! Woohoo!"); | |
cordova.callbacks["Camera"] = { | |
success : onSuccess, | |
fail : onFail | |
}; | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment