Is there a way to find out the path used by android to save screenshots?
Can I get the path from a code?
Android's API has no fixed path for screenshots but
File pix = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES);
File screenshots = new File(pix, "Screenshots");
might work. That's what ICS uses as path.
The "Screenshots" value is part of the private API.
Here is link to the source code where the value is set. Since the class is loaded in our application context there is no option to access the field. I'd hardcode it as @zapi suggested.
来源:https://stackoverflow.com/questions/9667297/path-to-screenshots-in-android