31
Oct
anotherfreakinkk

Android has had native support for user-taken screenshots since 4.0, and a few OEMs like Samsung have had supported the feature even before that. But until now, getting a reliable video recording of your device's screen has been a major pain, usually requiring some kind of root solution that doesn't work for all hardware. In KitKat, Google is doing away with that, allowing end users to record video directly from the screens of their devices.

4.4 includes a screen recorder utility available for all users, something that most desktop operating systems are still lacking. Video can be recorded at any resolution (landscape or portrait) supported by your smartphone or tablet and saved in an MP4 file with the screen recording utility. Users can initiate screen recording with the command adb shell screenrecord or by using DDMS. Check the video below at the 5:10 mark for a very short developer overview.

image

Update by Artem: The documentation is quite ambiguous, so right now it's not clear whether you can initiate screen recording from the device without having to be connected to a computer. Google talks about an on-device screen recording utility and only in the end follows up with the mention of ADB and DDMS. The part that's unclear is whether those tools are the only methods to initiate recording or just some. The article also previously suggested there was a new API offered for other apps to utilize. The erroneous reference has since been removed.

Oh, and before you start dreaming of an Android-powered pirate empire, Google thought of that already. Apps with copyright-sensitive content can be secured against the feature with a simple code flag: SurfaceView.setSecure(). It's not clear at the moment whether that will mean that the content area is blacked out or the recording app will just refuse to work, but there will be no easy copyright infringement on Google's watch... until someone inevitably finds a way around it.

On a personal note, I'd like to thank Google for making the lives of app reviewers just a little more easy (you can definitely look forward to more video reviews around here), and for actively working against the lackluster app demonstration videos that litter the Play Store. Cheers.

Source: Developer.Android.com

Jeremiah Rice
Jeremiah is a US-based blogger who bought a Nexus One the day it came out and never looked back. In his spare time he watches Star Trek, cooks eggs, and completely fails to write novels.
  • Thomas

    I can imagine it kinda sucks for Koush to have made this feature only to be beaten to it by Google :P

    Well it's still useful pre-4.4 but still, gotta be kinda annoying :(

    • Jays2Kings

      It's funny how the same thing happened with 4.3 (with App Ops).

      • Potato

        If you're talking about Privacy Guard, that's completely different functionality.

      • http://jedibeeftrix.wordpress.com/ Jedibeeftrix

        App Ops activity seems to have been removed in Kitkat, which is a shame given it was App Ops in no small measure that persuaded me to try an Android phone.

    • Bob G

      Great minds think alike. Should be a compliment.

    • john

      I actually read somewhere that KLP (4.4? 5.0?) was heavily based on Cyanogenmod.. Annoying pie Moto X camera controls, now this :) Look at cmod to see android B)

      • Dianne Hackborn

        It is not based on Cyanogenmod at all. Caynogenmod can contribute patches to AOSP, but I don't believe many are.

  • Landrovan

    And what will be the status of the secure flag for app created on api version lower (before this function exists)?

    • Bluewall

      I guess we won't be able to record them

  • Frekko

    This makes bug reporting much easier.

  • http://ashutoshmishra.org/ Ashutosh Mishra

    So much for VP8/VP9. At least use your own products.

    • quasibaka

      hear! hear !

    • Walkop

      Isn't that a codec for STREAMING video?

      Not local.

  • esper256

    "This isn't just an API function: 4.4 includes..."

    I think this is misleading. I don't think there is an API for screen recording. I think this is *only* available through ADB. So remote desktop apps will still be out in the cold.

    At least I couldn't find a screen recording API in the diff report:
    https://developer.android.com/sdk/api_diff/19/changes.html

    • http://www.androidpolice.com/ Artem Russakovskii

      Yeah, it's not an API, it's a utility. I'll have to tweak this post now.

  • Danny Holyoake

    The article suggests this is an API that any app can use. It's not. You have to be connected to your PC via adb.

    • HebeGuess

      "When you are done recording, you can share the video
      directly from your device or pull the MP4 file to your host computer for
      post-production." from the doc..

      • esper256

        The file gets recorded onto the flash storage on the device. However initiating the recording seems only possible through ADB commands run from a plugged in computer.

        • http://www.androidpolice.com/ Artem Russakovskii

          I think you and Danny are right. It's not 100% clear, but I think it's only available via a PC hookup.

    • Simon Belmont

      "4.4 includes a plain-Jane screen recorder available for all users, something that most desktop operating systems are still lacking." It's available on the device.

      "ADB users can initiate screen recording with the command adb shell screenrecord." This just means ADB users can initiate a recording, too.

      • http://www.androidpolice.com/ Artem Russakovskii

        This is due to the ambiguity of the way the docs are written. I actually think @ynnadanny:disqus is right.

        • ari_free

          yup otherwise the setSecure feature doesn't make sense

    • http://www.androidpolice.com/ Artem Russakovskii

      I've updated the post, there's still ambiguity, and we will only figure this out with a device in hand.

  • Alexander Terry

    Dose this mean there will be an app that records the screen on any android4.4 device?

  • MonBehh

    this feature was available on the note 2 when it was launching and then samsung removed it for whatever reason, not sure why, good to see it back though

  • http://www.bordersweather.co.uk/ Andy J

    Please note it only records for *UP TO* 15 seconds.

    • Kevin Coppock

      That's not correct. It's up to 3 minutes. From the --help flag on adb shell screenrecord:

      "Set the maximum recording time, in seconds. Default / maximum is 180."

      • http://www.androidpolice.com/ Artem Russakovskii
        • http://www.bordersweather.co.uk/ Andy J

          Thanks for the replies @archon810:disqus and @kevincoppock:disqus they seem to of updated that video - they appear to be unclear if it's 15 seconds or 3 minutes but the video I watched this afternoon from those guys most definitely said 15 seconds.

          • Stacey Liu

            It's definitely longer than 15 seconds. I just made one that's over a minute long.

  • Dennis Ulijn

    does this also mean it can stream my screen to teamviewer, so i can remote control my phone from my pc?

  • http://www.androidpolice.com/ Artem Russakovskii

    So I'm using the 4.4 AOSP ROM, and screenrecord is accessible via adb, and as I expected, I don't see a way to initiate it on the device itself. It's very developer-oriented right now.

    • Stacey Liu

      It can be done on the device itself through a terminal emulator. The only problem is that the video will show the terminal window when you start or end the recording.

      • http://www.androidpolice.com/ Artem Russakovskii

        We need a volume up plus power solution - it'd make perfect sense. But I don't see Google implementing it, it'll most likely stay only in custom ROMs. But at least some sort of a native trigger would be nice.

        • PhilNelwyn

          Or volume down plus power could open a resizeable area, offering both possibilities (and why not some more options)?

          Yeah, I know, I'm very late to that discussion. :P

  • David Li

    the framerate is so low, 16fps

  • A Popov

    I've played around with this and have picked presets with optimal performance-to-quality ratio for Nexus 7 and Nexus 10: http://androidworks-kea.blogspot.com/2013/11/developers-notes-iv-presets-for-screen.html

Quantcast