Use this:
$(document).ready(function() {
document.addEventListener("resume", AppResumed, false);
function AppResumed() {
// Handle the resume event
$(".message").text("Application Resumed");
alert("app resumed");
}
});
Edited:
phonegap.js must be added and cordova js removed in order for this to work!