title: Android - how to know if user click on Home Screen
body: <p>Is there a way to know if some user is clicked on the Home Screen of Android device. Something like <code>homeScreen.onclicklistener</code></p>
  
  <p>I tried to create a widgets and to listen for clicks, but this is not possible task, because there is no way to create widgets programmatically(auto adding), or maybe I don't know how to do it. I know this way is wrong but I had to tried.</p>
  
  <p>Thanks in advance.</p>
  
  <p>Screenshot from the Home Screen.</p>
  
  <p><img src="https://i.stack.imgur.com/MYThL.jpg" alt="enter image description here"></p>