Chapter 23. Building Android Apps

There are two ways to view Flash-developed content on Android devices like the HTC One smartphones or Motorola Xoom tablets. The old-fashioned way is to use the device’s web browser to display Flash content that’s embedded in the web page. The up-and-coming way is to develop an application using AIR for Android, and that’s the focus of this chapter. (For a comparison of installed apps versus web-based animations, see the box on AIR for Android vs. Flash Player.)

You can use all your animation and ActionScript skills to build apps for Android devices, but there are differences between mobile apps and web-based or desktop apps. For example, in an app you’ll want to include touchscreen gestures. If your app is destined for smaller smartphone screens, you need to make your buttons large, and the text and images readable. Take a look back at Chapter 22—which explains how to create apps for Apple’s iOS—even if you plan to focus on Android. That chapter’s details on using code snippets to add touchscreen gestures, for example, also applies to Android.

This chapter explains how to create a new Android document in Flash. You’ll also learn how to create an app that uses Android’s accelerometer to move objects on the screen. The last section discusses how to convert an iOS app into an Android app to maximize your app-building efforts. It’s not hard to convert an application so that it runs on AIR for desktops (Windows, Mac, and Linux), as well as Apple’s iDevices ...

Get Flash CS6: The Missing Manual 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.