Attend XDA's Second Annual Developer Conference, XDA:DevCon 2014!
5,785,052 Members 45,595 Now Online
XDA Developers Android and Mobile Development Forum

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

Tip us?
 
0xD34D
Old
(Last edited by 0xD34D; 28th December 2013 at 05:34 PM.)
#1  
0xD34D's Avatar
Senior Member - OP
Thanks Meter 2,042
Posts: 459
Join Date: Feb 2009
Location: San Diego

 
DONATE TO ME
Angry [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.
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.
The Following 95 Users Say Thank You to 0xD34D For This Useful Post: [ Click to Expand ]
 
King ov Hell
Old
#2  
King ov Hell's Avatar
Senior Member
Thanks Meter 581
Posts: 974
Join Date: Dec 2012
Very interesting
 
TecknoFreak
Old
#3  
TecknoFreak's Avatar
Recognized Contributor
Thanks Meter 778
Posts: 1,858
Join Date: Feb 2011
Location: Deltona

 
DONATE TO ME
This is doupe. Lol
Is this open source so I can added to my ROM?
Motorola Atrix HD(MB886)
Just Thank me if I Helped you. That will pay off my time if you do
If you think I did great then why not buy me a small coffee
 
0xD34D
Old
#4  
0xD34D's Avatar
Senior Member - OP
Thanks Meter 2,042
Posts: 459
Join Date: Feb 2009
Location: San Diego

 
DONATE TO ME
Quote:
Originally Posted by SVLAN View Post
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: [ Click to Expand ]
 
riteish08
Old
(Last edited by riteish08; 29th November 2013 at 07:04 AM.)
#5  
riteish08's Avatar
Member
Thanks Meter 19
Posts: 63
Join Date: Mar 2013
Location: Mumbai
Quote:
Originally Posted by 0xD34D View Post
#OT

Which Font?
 
itechengine
Old
#6  
Senior Member
Thanks Meter 9
Posts: 133
Join Date: Mar 2013
Location: Pune
Is there a way we can have this on 4.2 or 4.3 devices?
Nokia 5110, 3310, 3300, 5510, 3510, 6600, X6
LG Reliance CDMA Mobile Phone
Sony Ericsson K550i
Samsung The SGH 170, GT-S5282
Xolo Q800
Samsung S5 SM-G900F, Samsung Gear 2
 
FantasticalX
Old
#7  
FantasticalX's Avatar
Senior Member
Thanks Meter 345
Posts: 433
Join Date: Jan 2013
Location: here

 
DONATE TO ME
Quote:
Originally Posted by itechengine View Post
Is there a way we can have this on 4.2 or 4.3 devices?
Same question here

FantasticalX
Code:
@echo off

echo Sorry for my bad english
echo ^^
exit
 
lichti1901
Old
#8  
lichti1901's Avatar
Recognized Contributor
Thanks Meter 4,776
Posts: 3,307
Join Date: Sep 2010
Location: Riding my Bike

 
DONATE TO ME
Quote:
Originally Posted by itechengine View Post
Is there a way we can have this on 4.2 or 4.3 devices?
No





Quote:
Originally Posted by abielzuliom View Post
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
///DevHost for my rastakat builds black&white themed with some extra goodies ///
Android File Host also for my rastakat updates
github for my Code
Want to know what is inside my build? Here's a Feature List

Sent from my Nexus 5
and my second Baby
Cube Stereo Super HPC 140 Race


The Following 5 Users Say Thank You to lichti1901 For This Useful Post: [ Click to Expand ]
 
mgbotoe
Old
#9  
mgbotoe's Avatar
Senior Member
Thanks Meter 1,506
Posts: 1,876
Join Date: Jan 2013
Location: Berkeley

 
DONATE TO ME
This is pretty sweet and congrats on making it to the portal ^.^

Look forward to cherry picking this!
 
matheus_sc
Old
#10  
matheus_sc's Avatar
Senior Member
Thanks Meter 284
Posts: 1,226
Join Date: Mar 2011
Location: Olimpia-SP

 
DONATE TO ME
can i download a .zip and flash in pa 4.0?
Lg G2 4.4 KitKat


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

Advanced Search
Display Modes