Download pptx - Android Apps with Adobe AIR

Transcript
Page 1: Android Apps with Adobe AIR

Adobe AIR + Android =

Page 2: Android Apps with Adobe AIR

Adobe AIR vs. Java

VS

Page 3: Android Apps with Adobe AIR

JAVA: PROS

Established platform, widely accepted

Direct access to Android API

Eclipse IDE officially supported and integrates well with Android SDK

Direct debugging and publishing between IDE and Android Virtual Device

JAVA: CONS

Many 3rd-party Java libraries do not work on Android

Inconsistent debugging

Code will not run on iPhone

Page 4: Android Apps with Adobe AIR

ADOBE AIR: PROS

Stable platform, well supported

Much of “desktop” functionality can be ported to mobile device

Easy and fast debugging in Flash IDE

Great for rapid development and prototyping

Same code can be compiled and published to iPhone

ADOBE AIR: CONS

Dependent on a third-party provider (Adobe)

Slower than Java

Pain in the ass to push to device or emulator

Page 5: Android Apps with Adobe AIR

CONFIGURING ANDROID VIRTUAL DEVICE

Page 6: Android Apps with Adobe AIR

Download and unzip Android SDK (http://developer.android.com/sdk/index.html)

Browse to your Android SDK folder and launch Android SDK and AVD Manager: [Android SDK] SDK Manager.exe

Allow SDK Manager to install all updates

Make sure that under “Installed Packages” you have “USB Driver package” installed

Page 7: Android Apps with Adobe AIR

Select “Virtual Devices” option and click “New” to create a new Android virtual device

Page 8: Android Apps with Adobe AIR

Create new Android virtual device. Make sure to select Android 2.2 – API Level 8 in the “Target” field

In Android SDK and AVD Manager, select the newly created virtual device and click “Start”

Page 9: Android Apps with Adobe AIR

Hopefully now you have a running Android emulator

Page 10: Android Apps with Adobe AIR

PREPARING YOUR ANDROID DEVICE

Page 11: Android Apps with Adobe AIR

Enable USB debugging on your phone: Settings Applications Development Check “USB Debugging” to enable it.

If developing/debugging onan HTC phone, you need to download HTC Synchttp://www.htc.com/us/support/

Page 12: Android Apps with Adobe AIR

Connect your Android device to your computer via a USB cable

Launch “Command Prompt” on Windows and browse to [Android SDK]\tools

Run command: adb devices

You should see your device listed below:

Page 13: Android Apps with Adobe AIR

Once your device is connected and recognized by your computer, you can use DDMS tool to monitor what is happening on your physical device: [Android SDK] Tools ddms.bat

You can also view the actual device’s screen: (1) Select your device’s name(2) In the menu, go to Device Screen Capture

Page 14: Android Apps with Adobe AIR

INSTALLING ADOBE AIR ON PHYSICAL AND VIRTUAL

DEVICES

Page 15: Android Apps with Adobe AIR

Download Adobe Air for Android (http://labs.adobe.com/technologies/air2/android/). You would have to sign up to participate in the pre-release program. There are two files to download – AIR Runtime for Device and AIR Runtime for Emulator. To make things easier later on, save these files to [Android SDK]\tools\

Launch “Command Prompt” on Windows and browse to [Android SDK]\tools\

To install on physical device, run command “adb install [downloaded AIR file for device]”. In my case, the full command is adb install Runtime_Device_Froyo_20100930.apk

To install on virtual device, run command “adb install [downloaded AIR file for emulator]”. In my case, the full command is adb install Runtime_Emulator_Froyo_20100930.apk

Page 16: Android Apps with Adobe AIR

PUBLISHING, PACKAGING AND INSTALLING YOUR ADOBE AIR

APPLICATION

Page 17: Android Apps with Adobe AIR

Download AIR for Android Extension for Flash CS5 (http://labs.adobe.com/technologies/air2/android/). You would have to sign up to participate in the pre-release program.

If you just installed Adobe Flash CS5, restart your computer before installing AIR for Android Extension for Flash CS5.

If you are not using Windows 7, launch Adobe Extension Manager CS5 normally, by going to Start Programs Adobe Extension Manager CS5.

Page 18: Android Apps with Adobe AIR

If you are using Windows 7, use Windows Explorer to browse to Adobe Extension Manager installation folder. On my computer, it is C:\Program Files\Adobe\Adobe Extension Manager CS5/. Right-click on Adobe Extension Manager CS5.exe and select “Run as Administrator”. If you skip this step, AIR for Android Extension for Flash CS5 installation will fail.

Page 19: Android Apps with Adobe AIR

In Adobe Extension Manager CS5, click “Install” and browse to the location where you saved the downloaded copy of AIR for Android Extension for Flash CS5. When extension installs, you should see it listed under Flash CS5

Page 20: Android Apps with Adobe AIR

Launch Flash CS5 and load your AIR application (.fla file).

Go to File Publish Settings…

Go to “Flash” tab

Under “Player:”, select “AIR Andoid” option.

Click “Settings…” button

Page 21: Android Apps with Adobe AIR

Complete information under the “General” tab

Page 22: Android Apps with Adobe AIR

Switch to “Deployment” tab

If you do not have a certificate, you can create one (click “Create” button next to “Certificate:” field).

Make sure to select relevant deployment type (Device, Emulator, Debug)

Page 23: Android Apps with Adobe AIR

Switch to “Permissions” tab. Make sure to specify correct permissions for your Android AIR application.

Page 24: Android Apps with Adobe AIR

Publish your application

Note the location of the .apk file created by the publishing process

Make sure that your Android emulator is running

Launch “Command Prompt” on Windows and browse to [Android SDK]\tools\

To install on physical device, run command “adb install [name of .apk published file from Flash CS5]”. In my case, the full command is adb install LearningLog.apk

Page 25: Android Apps with Adobe AIR

CONGRATULATIONS! IF YOU DID EVERYTHING

CORRECTLY, YOUR ADOBE AIR APPLICATION IS NOW RUNNING

ON YOUR ANDROID VIRTUAL DEVICE

Page 26: Android Apps with Adobe AIR

Additional Resources & LInks

Adobe AIR releases: http://labs.adobe.com/technologies/air2/android/

Lee Brimelow’s video tutorial on getting started with AIR for Android: http://gotoandlearn.com/play.php?id=123

Getting started with Adobe Air for Android: http://www.adobe.com/newsletters/edge/august2010/articles/article1/index.html?trackingid=HRTDI

Installing Adobe AIR runtime on Android 2.1 emulator: http://www.inter-fuser.com/2010/05/installing-adobe-air-runtime-on-android.html

Page 27: Android Apps with Adobe AIR

Dmitriy Babichenko

[email protected]

http://www.evillens.com

http://www.wideopenlens.com