FORUMS

Android M Preview Images – XDA TV

Android M preview images are available. That and much more news is covered by Jordan when he … more

I/O Summary: How Android M Handles Power And Charging

In the spirit of improving the core Android experience, Google is changing Android … more

I/O Summary: Google Photos App

At I/O 2015, Google tackled the information problem in mobile once more, this time through … more

I/O Summary: Development, Play Store, The Next Billion

VP of Engineering Jen Fitzpatrick began talking about what Google is doing to … more

[Feature][ROM][4.4] Screen Recorder w/ Audio

Thanks Meter: 2,052
 
By 0xD34D, Senior Member on 28th November 2013, 05:19 PM
Post Reply Subscribe to Thread Email Thread
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.
frameworks/base
9a994be91c0cd262b7a28d19e8c2beaa48ba2bd9
Settings
671e2b98bd835e799003a3d13949e407f189b1a1
Screen Recorder app
https://github.com/ChameleonOS/andro...ScreenRecorder

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.
Code:
# Screen recorder
PRODUCT_PACKAGES += \
    ScreenRecorder \
    libscreenrecorder
If you want to add the option to the global actions menu, here are the two commits you will need.
frameworks/base
10cb81031549d33f2103fe5bc15d883c9aee50c9
Settings
a72dc8451cd21e133f9235297cb114ef2fc3d503

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:
frameworks/base
f109bce6102931719e7baf778005da8748fa8d6b
Settings
64299a3556307354c6b4448cdcb8350d7ff2815b
ScreenRecorder
10866dcd8fc161cca55e6b3bc0470722722a2dc9
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.






And a video showing off audio recording!
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.
Last edited by 0xD34D; 28th December 2013 at 05:34 PM.
The Following 100 Users Say Thank You to 0xD34D For This Useful Post: [ View ]
 
 
King ov Hell
28th November 2013, 07:51 PM |#2  
Guest
Thanks Meter: 0
 
More
Very interesting
29th November 2013, 12:38 AM |#3  
TecknoFreak's Avatar
Recognized Contributor
Flag Deltona
Thanks Meter: 1,088
 
Donate to Me
More
This is doupe. Lol
Is this open source so I can added to my ROM?
29th November 2013, 03:43 AM |#4  
0xD34D's Avatar
OP Senior Member
Flag San Diego
Thanks Meter: 2,052
 
Donate to Me
More
Quote:
Originally Posted by SVLAN

This is doupe. Lol
Is this open source so I can added to my ROM?

That's why I posted it here. I provided the links to the various commits you would want to cherry pick plus the ScreenRecorder app which is open source as well. If you are working on a 4.4 based ROM, then feel free to incorporate it.
The Following 3 Users Say Thank You to 0xD34D For This Useful Post: [ View ]
29th November 2013, 07:02 AM |#5  
riteish08's Avatar
Member
Flag Mumbai
Thanks Meter: 19
 
More
Thumbs up
Quote:
Originally Posted by 0xD34D

#OT

Which Font?
Last edited by riteish08; 29th November 2013 at 07:04 AM.
29th November 2013, 10:45 AM |#6  
Senior Member
Flag Pune
Thanks Meter: 17
 
More
Is there a way we can have this on 4.2 or 4.3 devices?
29th November 2013, 11:52 AM |#7  
FantasticalX's Avatar
Senior Member
Flag Yogyakarta
Thanks Meter: 386
 
Donate to Me
More
Question
Quote:
Originally Posted by itechengine

Is there a way we can have this on 4.2 or 4.3 devices?

Same question here
29th November 2013, 12:24 PM |#8  
lichti1901's Avatar
Recognized Contributor
Flag Riding my Bike
Thanks Meter: 9,237
 
Donate to Me
More
Quote:
Originally Posted by itechengine

Is there a way we can have this on 4.2 or 4.3 devices?

No





Quote:
Originally Posted by abielzuliom

Same question here

No

Seems that both of you cant read the OP. Have a look at the red text!


Gesendet von meinem Nexus 5 mit Tapatalk
The Following 5 Users Say Thank You to lichti1901 For This Useful Post: [ View ]
30th November 2013, 10:52 AM |#9  
mgbotoe's Avatar
Recognized Contributor
Flag Land of Curious
Thanks Meter: 3,143
 
Donate to Me
More
This is pretty sweet and congrats on making it to the portal ^.^

Look forward to cherry picking this!
30th November 2013, 11:55 AM |#10  
matheus_sc's Avatar
Senior Member
Flag Barretos-SP
Thanks Meter: 501
 
Donate to Me
More
can i download a .zip and flash in pa 4.0?
Post Reply Subscribe to Thread

Tags
kitkat 4.4, rom, screen record, screen recorder, screen recording
Previous Thread Next Thread
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes