How do I keep the javascript of my Phonegap application running minimized on android? -
developed application using android phonegap build , happens: when minimized, app paused ( freezes apparently javascript ). solve problem , tested backgroundmode plugin, still same thing. in app there event begins when animation reaches specific frame, not occur when application minimized. well, biggest problem .
part of following code :
document.addeventlistener("deviceready", function () { window["myphonegap"] = true; // create new runtime using c2canvas cr_createruntime("c2canvas"); document.addeventlistener("pause", function() { cr_setsuspended(false); cordova.plugins.backgroundmode.enable(); }, true); document.addeventlistener("resume", function() { cr_setsuspended(false); cordova.plugins.backgroundmode.disable(); }, true); document.addeventlistener("backbutton", function() { cr_setsuspended(false); }, true); }, true);
Comments
Post a Comment