O'Reilly logo

Flash Development for Android Cookbook by Joseph Labrecque

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Using the Mobile CameraUI API to save a captured video

Using the new CameraUI API (available in the mobile AIR SDK) we can perform and alternative capture process to the normal Camera API. The mobile CameraUI class will make use of the default Android camera application, alongside our custom app to capture a video.

How to do it...

We will set up a CameraUI object to invoke the native Android camera to capture a video:

  1. First, import the following classes into your project:
    import flash.display.Sprite; import flash.display.StageAlign; import flash.display.StageScaleMode; import flash.events.Event; import flash.events.MediaEvent; import flash.events.TouchEvent; import flash.media.CameraUI; import flash.media.MediaPromise; import flash.media.MediaType; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required