title: How to take a screen shot with status bar contents in android application?
body: <p>I have a requirement that I have to take a screenshot of the current window in android. 
  This is the code am using, </p>
  
  <pre><code>View rootView = getWindow().getDecorView().findViewById(android.R.id.content);
  View screenView = rootView.getRootView();
  screenView.setDrawingCacheEnabled(true);
  Bitmap bitmap = Bitmap.createBitmap(screenView.getDrawingCache());
  screenView.setDrawingCacheEnabled(false);
  </code></pre>
  
  <p>by using this I could get the application screen shot, but the status bar contents are missing (bluetooth icon, battery status etc).
  How can I take a screenshot of the current Android phone window programmatically (including status bar contents)? 
  Is it possible? </p>