[Feature][ROM][4.4] Screen Recorder w/ Audio
As most of you probably already know, Android 4.4 comes with a binary that allows you to record the display. It's nice to have this feature available but it's not the most convenient method to use. It would be a whole lot nicer if it were exposed to the user through the framework. I did just that and am here today to share it with the masses. I took the original screenrecord code and turned it into a native library with JNI bindings to allow using it in Java.
I've added hooks into PhoneWindowManager which allows the user to press power + volume up
start/stop screen recording. Once recording is started there is an ongoing notification that can be pressed to stop recording as well. For those that don't have volume rockers or don't like pressing those two buttons together, I have a couple commits for you to pick which will add an option to the global actions menu that is displayed when you hold down the power button.
Now for the stuff you'll need to get this up and running in your own ROM.
For the core functionality you'll need one commit from frameworks/base
and one from Settings
as well as the ScreenRecorder app which contains the service that does the majority of the work.
Screen Recorder app
To get these built into your ROM you will need to add a couple products to PRODUCT_PACKAGES, you can decide where you want to add this.
# Screen recorder
PRODUCT_PACKAGES += \
If you want to add the option to the global actions menu, here are the two commits you will need.
NEW - Audio recording
I currently have 3 patches
up for code review
on github which add audio recording via the microphone. One for frameworks/base, one for Settings, and one for ScreenRecorder app. For those interested in trying out audio recording here are the links to the patches:
And if you want to test it out in the screenrecord binary, you can check out this patch.
And now I leave you with a couple of screenshots and a short video that was taken using this feature.
Note: I have no interest in working on back porting this to older versions of Android. If you want to give it a shot, knock yourself out but please don't reply to this thread or in PM about how to do it or how to overcome any obstacles you may face.