lds1804 / android-screenshot-library

Automatically exported from code.google.com/p/android-screenshot-library
Other
0 stars 0 forks source link

takeScreenshot() in ScreenshotService.java (almost) always returns null #16

Open GoogleCodeExporter opened 8 years ago

GoogleCodeExporter commented 8 years ago
In the latest source code revision (as of May 22, 2012), there's a bug that 
will likely make takeScreenshot() in ScreenshotService.java return null.

The line in question is the following:

   if (!screensPath.mkdirs())      return null;

mkdirs() only returns true IF the directory in question DID NOT EXIST BEFORE 
and HAS BEEN CREATED BY THIS CALL. If the directory already existed before, 
mkdirs() will return false, which means that on a brand new sdcard the 
Screenshot Service will only work once.

I suggest the following change:

   screensPath.mkdirs()
   if (!screensPath.isDirectory())     return null;

This should work as intended.
This should 

Original issue reported on code.google.com by ziritr...@gmail.com on 22 May 2012 at 3:40

GoogleCodeExporter commented 8 years ago
I am having trouble related to implementation of ASL. if anyone helps me i can 
pay for services.send me email on kartikk55@gmail.com its urgent task for me.

Original comment by kartik...@gmail.com on 11 Sep 2014 at 7:04