AIR for Android

Canceled: AdobeCamp San Diego!



Due to issues beyond our control, we had to cancel this event. We hope to reschedule it later this year.

San Diego AdobeCamp
The San Diego Flash User Group, the San Diego Adobe Developer User Group and the San Diego Photoshop User Group are hosting a 4 hour deep dive into Adobe’s Creative Suite 5.5!

Join us at the Adobe Camp where we will share with you how Adobe Creative Suite tools have evolved to dramatically enhance your workflow and keep your skills fresh. You’ll learn how to work faster and stay ahead of the latest trends, especially the rapid proliferation of mobile devices and the vast array of screen sizes.

Tickets available now!


Saturday, June 25, 2011 from 9:00 AM – 1:00 PM (PT)


Art Instute of San Diego
7650 Mission Valley Road
San Diego, CA 92108

You will discover how to:

Design and develop rich browser-based content for desktops or devices with the leading HTML5 authoring tools.
Develop rich interactive applications for Android, Blackberry, and iOS with Adobe AIR, Flash Professional and Flash Builder.
Learn about the new iPad applications available for Photoshop


Welcome & Overview – 10 minutes
Flash Professional – 30 minutes
Dreamweaver – 30 minutes
PhotoShop – 30 minutes
Flash Catalyst – 30 minutes
Flash Builder – 30 minutes
CF Builder – 15 minutes
Community Showcase – 30 minutes
Wrapup and Prizes – 10 minutes
(lunch is included)


Chris Griffith – Adobe Community Professional / Manager San Diego Flash User Group
James Polanco – Founding Partner / Web Application Architect at DevelopmentArc
Stephen M. Burns – Manager San Diego Photoshop User Group
Darius Fattahipour – Manager Adobe Developer User Group
Demian Borba – Adobe Community Champion / CEO at Action Creations

We are capping attendance to 50 campers, so get your tickets now. Tickets are $20, which includes lunch and raffle entry. The raffle prize will be a copy of an Adobe Creative Suite (sorry, no Master Collection).

Designing Great Mobile Apps

I had the extreme pleasure of speaking at the recent 360|Flex Denver conference. The conference was incredibly well done, John, Nicole, and their assistants did a fantastic job!

Besides working on the mobile apps for the show ( we are still trying to figure out the session survey upload issues), I presented on “Designing Great Mobile Apps” on Tuesday afternoon. I had a lot of fun giving the presentation, even with two Adobe evangelists and one Adobe product manager in attendance (and the great Dee Sadler as well)…

I hope these slides are useful, the session was recorded by the folks at ZaaLabs, so I will let you know when it is ready. Please feel free to ping with questions or comments.

Now go build something!


If you are interested in some resources on mobile design I would also suggest they following books:

360|Flex 2011 mobile apps

360 Flex 2011 DenverThe annual 360|Flex conference is right around the corner, and we have your mobile conference apps ready to go! You will have easy access to the full schedule, speaker bio, the ability to submit session surveys, and more.

For the iPhone users you can download the free app from the App Store.

For the Android users you can download the free app from the Android Market.

Note: But there is a small bug that snuck into to the iOS app :(. I introduced a issue around data updates. With the long approval processes, there is no solution for a rapid fix. The app will properly update for the first time, but if there are more updates, you will need to delete the app, then reload it. I am hoping we don’t have any more changes between now and the end of the show. If James Talbot is listed in the speaker list, you have the latest information. Sorry about that.

Speaking @ Bay Area Mobile Meetup Tomorrow

Bay Area Mobile MeetupI have the pleasure of speaking at the Bay Area Mobile Meetup tomorrow night (April 7th) at the Hacker Dojo on Developing with AIR for Android with Flash Professional.

This presentation will walk you the entire development process of the AIR for Android application from design to deployment. I plan to cover some of the new features in AIR 2.6, and their might be a special surprise.

Hope to see you there!

360|Flex Session Change

Some of you might have noticed that my session topic at the upcoming 360|Flex conference has changed. I initially had to planned to talk about the new features and capabilities in Flash Catalyst, like I had done in my recent Ask A CS Pro session.  But the team at Adobe has decided to bring Jacob Surber, Product Manager for Flash Catalyst, and Peter Flynn, an engineer on Flash Catalyst out to Denver to introduce the latest features and capabilities. Trust me, you will want to attend their lunch session on Tuesday. 😉

After several conversation with John and Jacob, we decided that having two “Intro” level talks on Flash Catalyst did not make sense. So, back to the drawing board. As you might know I am also a mobile app developer, so instead I am going to presenting on Designing Great Mobile Applications. This talk is going to cover a lot of mobile UX principles, common design patterns and general observations form the trenches.

I hope to see you there!


Developing AIR for Android using Flash CS5

I am presenting to the Hawaii Flash User Group on February 22, 2011 via Adobe Connect at 5:00 PM Hawaii Time. This presentation will be done over Adobe Connect, so anyone is welcomed to join in! The Connect URL is

Hope to see you there!

This is an expanded version of the talk I gave at the FiTC unconference.

Error #3132 in AIR and SQLite

I recently working on an AIR for Android application, I encountered this error while trying to save a suer setting:

SQLError: ‘Error #3132: Data type mismatch.’, details:’could not convert text value to numeric value.

I looked over the SQL query I was making, and it seemed correct. So I began the process of trying to isolate the cause. I traced out the variables and they were correct. So, I replaced the variables with static values, and tried yet again. No luck, the same error. A quick search on Google did not seem reveal a clue as to what was going on.

I open the database I was working with using SQLite Database Browser 1.3. I tested the SQL query, and no errors were reported.  I was extremely puzzled. I trying to update a NUMERIC column with the value 0. I try forcing the variables before I ran the query in my app. But still I would get the same error.

Then I looked over all the columns in that row, and noticed that in one column set to NUMERIC, there was a dash. It seems that SQLite Database Browser had allowed an invalid entry into that column. Mind you this was not the column I was trying to update, so I did not notice it. I changed the value from the dash to a number, saved the database, recompiled the application, and it worked! WooT!

It seems that the SQLite engine use in AIR is very strict (or SQLite Database Browser is not), it will check that all the columns have legal values in them for an UPDATE query. This was not something I expected.

I have since switched to Lita ( Since it is built on Adobe AIR, I can feel confident that my queries will run in my AIR applications.

Understanding Bundled SQLite databases in AIR for Mobile

Quite often you will want to ship your mobile application with a prepopulated SQLite database. However there are a few things you need to do to before you can fully use them in your application. This article will walk you through the steps you need to take to use a SQLite database on your mobile device.

The first thing we need to do is include our prepopulated SQLite database in our AIR application. For applications built with Flash Professional CS5, go to File > AIR for Android Settings…, then select the General tab . Click the plus icon above the Include Files section, then select your .db file. If you are building your AIR application using Flash Builder, you just need to include the database in src directory.

Now, when you publish your application for your favorite mobile device, the prepopulated database will be automatically included when the application is installed. Here is where things can get a little tricky if you don’t understand the various application directories and permissions.

Without doing anything our application will read the data from our database using this ActionScript snippet:

var sessionDBConn:SQLConnection;
var sessionDBFile:File;
var selectStmt:SQLStatement;
sessionDBConn = new SQLConnection();
sessionDBConn.addEventListener(SQLEvent.OPEN, openSessionSuccess);
sessionDBConn.addEventListener(SQLErrorEvent.ERROR, openSessionFailure);

var embededSessionDB:File = File.applicationDirectory.resolvePath("demo.db");

The issue will be when we try to perform any create/update/delete functions on the database, as they will fail. Although we can read from the NativeApplication.applicationDirectory, we are not allowed to write to this directory. We need to find a solution to transfer the database to a location that we can have write access to. Thankfully, AIR also has another custom directory just for this type of use; NativeApplication.applicationStorageDirectory.

The first thing we need to check for is if we have already copied our database to the writable directory. We can check the exists property on the File reference to database in the writable directory to test this condition.

var writeSessionDB:File = File.applicationStorageDirectory.resolvePath("demo.db");
if (!writeSessionDB.exists) {

Since we have not copied our database to a writable location, the exists property will be false. Now to need to perform our file copy from the applicationDirectory to the applicationStorageDirectory using copyTo method:


If the database is large, you might want to consider using the copyToAsync method instead.

As with all read and write methods, make sure you include event listeners for both IOErrors and SecurityErrors.

With that, our prepopulated database has been copied to a writable directory and is ready for use.

sessionDBConn = new SQLConnection();
sessionDBConn.addEventListener(SQLEvent.OPEN, openSessionSuccess);
sessionDBConn.addEventListener(SQLErrorEvent.ERROR, openSessionFailure);
var embededSessionDB:File = File.applicationDirectory.resolvePath("demo.db");
var writeSessionDB:File = File.applicationStorageDirectory.resolvePath("demo.db");
if (!writeSessionDB.exists) {
sessionDBFile = writeSessionDB;

Hopefully this article will help you as you start developing mobile applications that use prepopulated databases.