<script>
document.addEventListener("deviceready", function ()
{
window["c2iscordova"] = true;
// Create new runtime using the c2canvas
cr_createRuntime("c2canvas");
document.addEventListener("pause", function() {
c2_callFunction('onWindowLostFocus');
}, false);
document.addEventListener("resume", function() {
c2_callFunction('onWindowGotFocus');
}, false);
}, false);
</script>
This allows me to catch when this application is in focus or not. But not 100% of the time. Sometimes it just does not work out. But when the screen splits into 2, it works out in 100% of cases.
In the project settings, I turned pause on focus on and off.
The same events Plugin Browser.
- on supended and on resumed checked also give 0% processing.
Handling keys on menu button and on search button also do not give any result.
How to do what I could handle when the application is minimized - so that the picture would change as in Google Chrome in incognito mode.