Utilizing Device Features


  • Launching the device's native camera application
  • Using an image taken with the camera
  • Capturing audio with the device's microphone
  • Playing audio captured from the microphone
  • Displaying dynamic HTML content and web pages
  • Utilizing the device's geolocation sensor

In this chapter you'll take an in-depth look at some of the cool features of Adobe AIR that allow you to use the functionality that is integral to most mobile devices.

First you'll take a look at the CameraUI class, examining how you can take photos using the device's camera and include the images in your AIR mobile application. You'll explore the Microphone API, taking a close look at how you can record and play back audio streams using the device's microphone. You then turn your attention to integrating a device's web control and presenting web pages into your mobile applications using the StageWebView class. Finally, you take a look at using the device's Geolocation sensor to retrieve and incorporate GPS location data.

For each of the four sections, you'll build an example demonstrating the capabilities of the core feature.


One of the many features of all mobile devices is the camera, and unless you've been living in a cave for the past decade you can use mobile devices to take still photos and video. Although AIR for desktop has been able to use the camera for a while, the AIR 2.5 release gave developers their first opportunity ...

Get Beginning Flash®, Flex®, and AIR® Development for Mobile Devices now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.