title: Take Android Screenshot programmatically-whatever on screen-app may be in background-not rooted device
body: <p>I want to take Screenshot of Android device programmatically. I have searched lot of things but wherever i found, it is saying that either your device should be rooted or only you can take screenshot of your app only, i.e. if your app is in background then it will not take screenshot of home screen.</p>
  
  <p>In short, i want screenshot which gives me whatever is on screen that user can seen. My own app may be in background. </p>
  
  <ol>
  <li>Device is not rooted</li>
  <li>Whole screen(only visible portion to user)</li>
  <li>App may be in background(but still should take screenshot of whatever visible to user, i.e. may be home screen)</li>
  </ol>