Taking Screenshot
问题 I'm developing an application for taking screenshots in the device. In this application, we can draw anything on the screen. For this I am using Canvas, Paint and Path to do this. I'm using this code to take screenshots: public void saveScreenshot() { if (ensureSDCardAccess()) { Bitmap bitmap = Bitmap.createBitmap(getWidth(), getHeight(), Bitmap.Config.ARGB_8888); Canvas canvas = new Canvas(bitmap); onDraw(canvas); File file = new File(mScreenshotPath + "/" + System.currentTimeMillis() + "