title: Programmatically take a screenshot from service
body: <p>it is easy to this code </p>
  
  <pre><code>Bitmap bitmap;
  View v1 = MyView.getRootView();
  v1.setDrawingCacheEnabled(true);
  bitmap = Bitmap.createBitmap(v1.getDrawingCache());
  v1.setDrawingCacheEnabled(false);
  </code></pre>
  
  <p>and it works great , but this is the case if there is activity.</p>
  
  <p>How can I take a screenshot from service ?</p>
  
  <p>my goal to take a screenshot ones in a hour ,e.i to to take screen shut every hour for example in 12 then in 1 then in 2 .... and so on</p>