How to capture everything currently on screen including Dialogs

前端 未结 3 1372
天命终不由人
天命终不由人 2021-01-12 23:30

I have looked at probably every SO article concering capturing the screen (screenshot, screendump) programmatically on Android, and they usually all end up with the same ans

3条回答
  •  谎友^
    谎友^ (楼主)
    2021-01-13 00:15

    use this library .... it works great for me. https://github.com/jraska/Falcon

      // Saving screenshot to file
                Falcon.takeScreenshot(this, imageFile);
                // Take bitmap and do whatever you want
                Bitmap bitmap = Falcon.takeScreenshotBitmap(this);
    

提交回复
热议问题