Developing Android Applications with Adobe AIR [0]
Véronique Brossier
Editor
Mary Treseler
Copyright © 2011 Véronique Brossier
O’Reilly books may be purchased for educational, business, or sales promotional use. Online editions are also available for most titles (http://my.safaribooksonline.com). For more information, contact our corporate/institutional sales department: (800) 998-9938 or corporate@oreilly.com.
Nutshell Handbook, the Nutshell Handbook logo, and the O’Reilly logo are registered trademarks of O’Reilly Media, Inc. Developing Android Applications with Adobe AIR, the image of a Royal Flycatcher, and related trade dress are trademarks of O’Reilly Media, Inc.
Many of the designations used by manufacturers and sellers to distinguish their products are claimed as trademarks. Where those designations appear in this book, and O’Reilly Media, Inc., was aware of a trademark claim, the designations have been printed in caps or initial caps.
While every precaution has been taken in the preparation of this book, the publisher and authors assume no responsibility for errors or omissions, or for damages resulting from the use of the information contained herein.
O'Reilly Media
* * *
DEDICATION
A mon père.
A ma mère.
Foreword
Arno Gourdol, Director of Engineering, Flash Runtime Foundation
Building engaging experiences for stand-alone applications is much harder than it should be. With Adobe AIR, we give developers and designers a tool to turn their ideas into applications quickly and easily. As new mobile platforms emerged, we have extended the reach of our customers by bringing AIR to those platforms. Véronique’s book is a great introduction to everything you need to know to use AIR to build some awesome applications, taking advantage of some of the new capabilities available on mobile platforms, like geolocation, touch, and other sensors. Now get coding!
Preface
If you can’t explain it simply, you don’t understand it well enough.
—Albert Einstein
The proliferation of the cellular phone has revolutionized the way we connect to the world and communicate with one another. It is the foundation of a mobile lifestyle.
Although the evolution of cell phone technology is progressing thanks to hardware manufacturers and platform engineers, the unveiling of its potential is in the hands of application creators.
Toward that end, Google and the Open Handset Alliance have developed Android, an operating system that runs on many mobile devices. Adobe and the Open Screen Project offer AIR as a development tool for various mobile systems. Both efforts bring some uniformity to this fragmented world.
This book is about developing for the Android platform using Adobe AIR. My goal is to provide in-depth information on the various topics specific to mobile development. My wish is that this book will help you create quality applications.
Audience
This book is for developers. It aims to attract enthusiast coders who are curious about both the technology and the user experience. I try to provide as much background information as possible on all topics, and not just an ActionScript reference guide.
Today is still the beginning of the mobile era, and any one of you is a potential innovator. Your contribution can influence the future of mobile technology.
Assumptions This Book Makes
This book assumes you already have basic to intermediate experience with the ActionScript 3 language. For example, you should know how to create an event listener, understand different data types, and know what a class is. If you need to learn the fundamentals of the language or get a refresher, I recommend Essential ActionScript 3.0 by Colin Moock (O’Reilly).
I introduce each topic from the ground up. I also provide code samples in snippets so that you can absorb the concept in small steps. Finally, I use pure ActionScript only, and few third-party libraries.
Contents of This Book
This book is divided into four sections:
Chapters 1 through 5 go over the technology, the environment, and the fundamentals of creating and