Search code examples
androidandroid-4.4-kitkatscreen-capturescreencast

How to record screen in android from inside or outside the app?


I see some apps on Google Play which allow you to record entire screen for Android version 5.0+ I have been digging into android reference for a while but could not figure our a right way to do it. Could someone please provide me just a small hint ?

Also, I understand Android system won't give you full screen buffer access for version < 5.0+, However is there any way to just record my own app's screen cast within the app ? One approach I came up with is to take snapshot of the screen few times every second and put them in encoder to create a video, however, this looks like a very heavy approach. Can anybody please suggest a better way to do it ?


Solution

  • Source1 and Source2

    For Android 4.4+ you can record using command line adb shell screenrecord /sdcard/demo.mp4

    EDIT
    If you want it as a feature of your app, so that user can record their screen. check this out It has a detailed explanation.