Tag : screenshot

In Java there is a easy was to capture screenshots. The following captureScreenshot method will capture a screenshot of the display of your screen and save it to the disk. public void captureScreenshot(String filename) throws Exception { java.awt.Dimension size = java.awt.Toolkit.getDefaultToolkit().getScreenSize(); java.awt.Rectangle rectangle = new java.awt.Rectangle(size); java.awt.Robot robot = new java.awt.Robot(); java.awt.image.BufferedImage image = robot.createScreenCapture(rectangle); ..

Read more

Sometimes it can happen, that the app has to prevent android from taking a screenshot of the app. This can make sense if the app is being pushed into the background and/or for security reasons. So use FLAG_SECURE: getWindow().setFlags(LayoutParams.FLAG_SECURE, LayoutParams.FLAG_SECURE); This line secures against manual screenshots and automatic screenshots from the ICS recent-tasks history. You ..

Read more