title: Can I take screenshot of home screen programmatically ,without rooting my android device?
body: <p>I want to take screenshot of my home screen .How can I achieve this ? I am able to take screenshots of current activity but not the home screen .</p>
  
  <p>My codes for  taking screenshot of current activity is </p>
  
  <pre><code>View v1 = linearlayout_var.getRootView();
  v1.setDrawingCacheEnabled(true);
  Bitmap bm = v1.getDrawingCache();
  BitmapDrawable bitmapDrawable = new BitmapDrawable(bm);
  imageview.setBackgroundDrawable(bitmapDrawable);
  </code></pre>
  
  <p>If i want to  take the screenshot of  Home screen ,what I should use instead of linearlayout_var so that I can  reach  the root view of home screen .</p>
  
  <p>In single line my question is how to get the root view of Homescreen ??</p>