title: How To Use Javascript to Detect When Phonegap-based Android App Loses Focus
body: <p>My title sums up my question. I have an Android App written entirely with html5 and javascript. I am a beginner at java (at best) and do not want to use java to do this, but, instead, javascript. I want to be able to turn off video and music when a phone call comes in or the application otherwise goes to the background. I have tried window.onBlur and the new html5 visibility API. No dice. Is there a way to do this without rolling up my sleeves and learning Java? I want to use javascript.</p>