title: takeScreenshot always returns false for uiautomator
body: <p>I am trying to automate 'taking a screenshot' on Galaxy S4 and Kindle HDX 8.9 and I am using the following code.</p>
  
  <pre><code>if(!(getUiDevice().takeScreenshot(new File("ANYPATH"))))
           System.out.println("False: Screenshot not taken!!");
       else
           System.out.println("Gangnam Style...");
  </code></pre>
  
  <p><strong>ANYPATH</strong> values I tried:</p>
  
  <ul>
  <li><strong>/data/local/tmp/</strong> (For both devices) . Not sure where would I find this folder on the device, I tried this because I pushed my jars to this location.</li>
  <li><strong>/sdcard/pictures/</strong> (For Kindle HDX)</li>
  <li><strong>/storage/emulated/0</strong> (for Galaxy S4)</li>
  </ul>
  
  <p>Irrespective of the path I try, the condition always returns <strong>false</strong> and the screenshot is not taken on any of the devices (actual devices and not an emulator). I am not sure what am I missing here?</p>
  
  <p>I am just following the syntax from <a href="http://developer.android.com/tools/help/uiautomator/UiDevice.html#takeScreenshot(java.io.File)" rel="nofollow">http://developer.android.com/tools/help/uiautomator/UiDevice.html#takeScreenshot(java.io.File)</a></p>
  
  <p>Regards,
  Rumit</p>