How to programmatically take a screenshot on Android?
Here is the code that allowed my screenshot to be stored on an SD card and used later for whatever your needs are: First, you need to add a proper permission to save the file: <uses-permission android:name=”android.permission.WRITE_EXTERNAL_STORAGE”/> And this is the code (running in an Activity): private void takeScreenshot() { Date now = new Date(); … Read more