title: Android onAppHasFocus onAppLosesFocus
body: <p>Thanks in advance for your help with this question</p>
  
  <p>I want to know when my app gains and loses focus.</p>
  
  <p>I know how to tell when a specific activity window gains or loses focus, but if the main activity window has sub windows that open, the main window loses focus</p>
  
  <p>I want to know when my app loses focus entirely, including it's sub activities, and gains focus after it was entirely out of focus</p>
  
  <p>thanks</p>