This Java Android project looked at how to take a screenshot programmatically from within an application.
Both the READ_EXTERNAL_STORAGE & WRITE_EXTERNAL_STORAGE permissions are requested by the user in the main activity.
Once permission has been granted, the button's on click listener can be invoked to capture the screenshot.
Distributed under the MIT License. See LICENSE
for more information.