Search code examples
androidscreenshot

Taking Screenshot of Current screen


I am working on an application on Android which will share the screen to another android device.This app will run in background as service.

I want to capture the screen (current screen),save it as JPEG and continously send it over UDP to other Android device.

But my problem is how to capture the current screen by capturing framebuffer .

Please help.


Solution

  • You can take the screenshot of a layout by enabling

    setDrawingCacheEnabled(true);
    

    of the view.

    Check this link