BN.com Gift Guide

Flash Mobile: Developing Android and iOS Applications [NOOK Book]

Overview

Build rich media applications for the iOS and Android platforms with this primer to Flash mobile development. You get all of the essentials-from setting up your development environment to publishing your apps to the Google Market Place/Apple iTunes App Store.


Develop elementary applications without coding; then realize the power of ActionScript 3 to add rich complexity to your applications. Step-by-step ...

See more details below
Flash Mobile: Developing Android and iOS Applications

Available on NOOK devices and apps  
  • NOOK Devices
  • Samsung Galaxy Tab 4 NOOK 7.0
  • Samsung Galaxy Tab 4 NOOK 10.1
  • NOOK HD Tablet
  • NOOK HD+ Tablet
  • NOOK eReaders
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK for Web

Want a NOOK? Explore Now

NOOK Book (eBook)
$25.99
BN.com price
(Save 42%)$44.95 List Price

Overview

Build rich media applications for the iOS and Android platforms with this primer to Flash mobile development. You get all of the essentials-from setting up your development environment to publishing your apps to the Google Market Place/Apple iTunes App Store.


Develop elementary applications without coding; then realize the power of ActionScript 3 to add rich complexity to your applications. Step-by-step instruction is combined with practical tutorial lessons to deliver a working understanding of the development stages including:


*Rapid prototyping *Adding interactivity, audio, and video *Employing iOS and Android Interface Calls *Hardware optimization with AIR *Game development; game engines, controlling physics, and 3D *Designing for iPad, Android tablets, and Google TV *Code optimization, testing, and debugging


User interfaces are presented in full color to illustrate their nuances. The companion website, www.visualizetheweb/flashmobile, includes all of the AS3 code, project files, and a blog to keep you up to date with related news and developments.



Read More Show Less

Product Details

  • ISBN-13: 9780240815695
  • Publisher: Elsevier Science
  • Publication date: 12/1/2010
  • Series: Visualizing the Web Series
  • Sold by: Barnes & Noble
  • Format: eBook
  • Pages: 308
  • File size: 14 MB
  • Note: This product may take a few minutes to download.

Meet the Author

Matthew David is a specialist developing rich Web solutions using technologies like Flash and the latest Web design techniques. In addition, he works in online sales, marketing, and search engine optimization, with the aim of driving business to customer sites. Matthew partners with many companies as a business strategist, works closely with the World Wide Web Consortium Group (W3C), and is on Adobe's Advisory team.
Read More Show Less

Read an Excerpt

FLASH MOBILE

DEVELOPING ANDROID AND iOS APPLICATIONS
By MATTHEW DAVID

Focal Press

Copyright © 2011 Elsevier Inc.
All right reserved.

ISBN: 978-0-240-81569-5


Chapter One

SETTING UP FLASH CS5 FOR ANDROID DEVELOPMENT

Today, there are 5 billion people around the world using mobile phones. It is a staggering figure. No other technology is advancing at the rapid speed the mobile industry is experiencing. As a frame of reference, there are only 1.7 billion PCs being used around the world.

A new category of mobile phone is rapidly growing: the smart phone (Figure 1.1). Three years ago, a smart phone allowed you to send e-mail. Today, when you think smart phone, you think e-mail, web, games, MMS, video conferencing—you think of a computer in your pocket.

There are a number of companies leading the next wave of smart phone market. Google, Apple, RIM, Nokia, Microsoft, and HP (with Palm) all have their own operating systems and hardware. It seems almost every three to six months these companies leapfrog each other. Consider this—at the end of 2009, a mobile phone running at 500 MHz with a 3 MB camera was considered screaming fast. Now, you can pick up those same phones for less than $100. It you want something faster you go for 1 GHz with a 1 GB of RAM, an 8 MP camera, front and rear facing cameras, proximity devices up the wazoo, and sophisticated operating systems (OS) that rival, and in some cases exceed, what you can accomplish on your desktop. And in 2011, companies that make the ultra-efficient system-on-chip designs used in mobile phones such as Qualcomm's Snapdragon are headed to 2 GHz with multicore infrastructures housing accelerated GPUs, CPUs, and a ton of RAM.

This is not a mobile phone in your pocket. It is a screamingly fast computer.

With this all said, the smart phone market is still very small. You can take all the iPhones, Android phones (Figure 1.2), and BlackBerrys and you will have less than 300 million devices worldwide. With a global figure of 5 billion mobile users, it is clear that the smart phone market has massive potential for growth.

So, what does it mean to develop for a smart phone? At the end of the day, there are essentially two ways you can develop for a smart phone:

• Develop directly to the software development kit (SDK)

• Develop using an intermediate technology

Each mobile device comes with an SDK that you can use for development. An SDK comes with the development tools, bundling tools, and emulators you need to test your code. When you need access to the latest and greatest technology, you need to use an SDK.

The challenge you have with using core SDKs is that you need to use the native development language. This is different for each SDK. For instance, Apple prefers you use Objective-C whereas Google prefers you use Java.

The second way to develop mobile devices is to use an intermediate technology that allows you to build for multiple devices using only one language. An example of this is the 3D game development technology called Unity 3D. Unity uses JavaScript to let you to script your games and then converts the JavaScript into code that will allow you to build iPhone, Android, and Windows Desktop applications. The downside to using intermediate technologies is that you are dependent on the development company to update their tools to the latest SDKs and technologies. This can be hard work as the SDKs are frequently updated. For instance, Apple has updated its iOS operating system four times in three years, and Google's Android has been updated five times in less than two years.

With that said, it is much easier to develop using intermediate languages. You can leverage skills you already have without having to go through the learning curve of adopting a new language.

In May 2010 at the Google I/O conference, Adobe announced that it would be bringing both the Flash Player and AIR (Adobe Integrated Runtime) to Google's Android 2.2. This is really big news for Flash developers for several reasons:

1. The version of Flash coming to the Android is the latest 10.1 version, not some crippled alternative.

2. AIR gives you an immediate in-road into mobile device development, leveraging the tools and knowledge you already have.

3. Flash is coming to 19 other mobile device companies.

4. Android runs on tablets and TVs as well as phones.

The Flash Player that is now available for all Android 2.2 users, shown in Figure 1.3, is very efficient. There has been a lot of noise from companies such as Apple stating that Flash is a battery hog and will kill your phone's CPU. Is this true? The reality is that it is not. Tests have been conducted showing that the Flash Player on mobile devices is highly efficient and does not cause the CPU-crippling results Apple is stating. The Flash Player works inside the browser in Android. You trigger the use of the Flash Player by tapping on the Flash content in the web page. For instance, you can view a Hulu.com video by tapping on the content in the page.

Adobe's modification of AIR for mobile devices was the really big story at Google's I/O. AIR is a very powerful, mobile technology. It reaches for the same goals that Java set in the 1990s: write once, run anywhere. Unlike Java, AIR really achieves its goal. AIR apps are built in the Flash Professional development environment using Flash technologies you are already used to, such as ActionScript to program your solutions, MPEG video for video, and the same animation techniques you have been using for years.

Adobe's support for Flash on mobile devices will be coming to 19 other mobile development companies. This means that the techniques you learn in this book will be applicable beyond just Android. Other entities that will be adopting Adobe's technologies include RIM's BlackBerry, Nokia, HP/Palm WebOS, and Microsoft's Windows Phones Series 7. Notably absent is Apple, Inc. The year 2010 will go down as the year that Apple drew a line in the sand and said very publicly, "We will not support Adobe's Flash." It is a shame that Apple has made this stance, since Apple's iOS is a very important part of the mobile market. Let's hope it changes its mind.

Earlier I mentioned how rapidly the mobile market is growing. Today, that market is predominantly composed of phones; but there are additional tools joining this market. During 2010, Apple released the massively popular iPad, a tablet computer that is very mobile and very light. Not to be outdone, rival companies, such as Nvidia, Samsung, Dell, and Cisco, are also coming out with their own tablets. The devices range in size from 5 inches all the way up to 11 inches and beyond. What they all share is that they are running Android as their OS. They come prepackaged with support for Flash.

Another device that is coming out of the mobile world is Google TV. At its essence, Google TV is really a modified version of Android that runs directly on your TV. And, yes, your Flash apps will run here, too. Last year you could run your Flash applications only on Windows and Mac computers. Today you can add smart phones, tablets, and TVs. Your Flash can literally go with you wherever you want to go.

It is not all roses, of course. To get your Flash apps running in AIR on all these new devices, Adobe did choose to make one big change: You must develop your solutions using ActionScript 3.0 (AS3). AS3 has been around since 2006. If you have not made the jump to AS3, then I will help you as we step through this book. You can no longer leverage the older AS1 and AS2 scripts that you have been using for years. Time to start fresh.

The first section of the book explains how a Flash designer can set up a Flash CS5 environment to publish Android apps. Later you will step through the process of downloading, installing, and running the Android SDK, necessary for your development. By the end of this section you will have created your first Android application using Flash CS5. At the end of this book you will have the knowledge to build almost any type of Flash-based application for the Android OS 2.2 and greater. How cool is that?

So, let's get started.

Designing and Developing for Android Hardware

Before we get involved with setting up your design and development environment, let's take a little time to review how you should approach developing applications that run on an Android device. There are a number of design considerations you always want to keep in the back of your mind as you work on your apps. They are:

• Different hardware

• Hardware acceleration

• Touch interaction

An Android phone is simply very different than a desktop, and you need to develop your app to take advantage of these differences.

Working with Android Hardware

The Android platform has been available for less than two years. In that time it has gone from being available on a few phones to being installed on dozens of different phones available on almost every mobile carrier. Today there are over 50 different mobile phones running Android OS 1.5 and greater. Flash is supported on all phones that run Android 2.2. Table 1.1 gives you a list of the Android phones that currently support Flash and AIR. The table is broken down by manufacturer, name of the phone, screen display (where available), and additional notes about the phone.

You can see from the devices listed in Table 1.1 that there is a broad range of hardware specifications for Android phones.

The number one hardware difference you will need to keep in mind is screen size. The default screen size for Android development is 320 x 480 ppi (points per inch) but, as you can see from the list, this is not always the case. Screen resolutions range from 240 x 320 for the HTC Wildfire all the way up to 854 x 480 for the Motorola Droid X. How do you design apps for this broad range? The trick comes in how you use Flash to do the work for you. We will be getting into that in more detail as you work your way through the book. Just keep in mind that not all Android phones are created equal.

In addition to screen size, the second feature that you will find different from one device to another is RAM and CPU. The more RAM you have determines how much data can be crunched with active apps. The multitasking feature in Android allows for six core apps to be running simultaneously. But you may have many more utilities running. To run more applications will require more RAM. Current smart phones have 256 MB of RAM, with others having as much as 1 GB of RAM. Future devices will have RAM levels that rival desktop computers. For now, however, develop applications that carefully manage the amount of RAM you use.

The CPU listed earlier is slightly misleading. Almost all smart phones are developed with a system-on-chip design (SOC). An SOC merges the CPU, GPU, RAM, and other systems into one chip. This architecture is typically built on ARM CPUs. The ARM architecture is highly energy efficient, allowing mobile phone batteries to last longer. Intel, Nvidia, and AMD are also starting to join the ultra-efficient mobile chip market. At first, the original Setting up FlASh CS5 For Android development 11 SOCs in the 2007/2008 smart phone market were very slow compared to a PC. Today, however, it is common to have a 1 GHz CPU/SOC with 2 GHz multicore SOCs shipping 2011. For a good Flash/AIR experience you need to be running a 1 GHz CPU/SOC architecture. The Motorola Droid runs at 500 MHz, and can run Flash, but you are better off testing with an HT Evo, Nexus One, or Motorola Droid X, all of which run at 1 GHz or faster.

Android Hardware Acceleration

Phones come loaded with technology in the hardware. This is awesome for you as a developer. Following are some key hardware technologies that you will want to keep in mind as you develop for the Android OS:

• Touch-sensitive screen

• Sound/microphone

• Vibration

• Camera

• GPS

• Accelerometer/compass

The touch-sensitive screen seems like an obvious hardware feature, but it is your main input to your device and you use your finger. More on that in a moment.

Every Android phone supports audio, both to listen through speakers and to record with a microphone. We will cover audio in more detail later in the book, but you will want to keep your audio files in MP3 and WAV format. Unlike desktop computers, where you cannot guarantee if there is a microphone installed by the manufacturer, you can guarantee that there is a mic on every Android device. Why? It's a phone! You need one to speak through when you make calls.

(Continues...)



Excerpted from FLASH MOBILE by MATTHEW DAVID Copyright © 2011 by Elsevier Inc. . Excerpted by permission of Focal Press. All rights reserved. No part of this excerpt may be reproduced or reprinted without permission in writing from the publisher.
Excerpts are provided by Dial-A-Book Inc. solely for the personal use of visitors to this web site.

Read More Show Less

Table of Contents

Section 1 Setting up Flash CS5 for Android Development Project 1: Creating Your First App Using Flash CS5 Section 2 Rapid Android Development in Flash CS5 Project 2: Optimizing Animation, Audio, Video, and Component Use in Your AIR for Android Apps Section 3 Developing Mobile Apps using ActionScript Project 3: Building Sprite's 123

Section 4 Leveraging Custon iPhone and Android Interface Calls with ActionScript Project 4: Building a Gesture-Driven Application

Section 5 Building Games with Flash for the Mobile Market Project 5: Building a Mobile Game

Section 6 Deploying Mobile Apps with Flash CS5 Project 6: Publishing Your Apps into the Many Different App Stores

Companion website: visualizetheweb.com/flashmobile

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously

    If you find inappropriate content, please report it to Barnes & Noble
    Why is this product inappropriate?
    Comments (optional)