AIR 3.2 & Flash Player 11.2 Release Candidates Available on Adobe Labs

AIR 3.2 and Flash Player 11.2 release candidates are now available for download on Adobe Labs. These latest versions have some exciting new features, including Stage3D for mobile devices, broader Stage3D support on desktop machines, multi-threaded video decoding, and better mouse support for gaming scenarios.   Get ready for some incredible mobile and desktop experiences powered by Adobe Flash & AIR.

You can read more about what’s new in Flash Player 11.2 and AIR 3.2 on the Adobe Digital Media blog, or check out the videos below to see some of the new features in action.

AIR 3.2

Flash Player 11.2

Download AIR 3.2 and Flash Player 11.2 release candidates today!

You can also check out additional examples of AIR 3.2 features from fellow Adobe Evangelists:

Slides from “Introduction to Mobile Development with PhoneGap”

As promised, here are the slides from my presentation “Introduction to Mobile Development with PhoneGap” from the MobileDev@TU meetup last night. Many thanks to Towson University for hosting the event and inviting me to speak!

You can download the slides here: Intro To PhoneGap

Introduction to Mobile Development with PhoneGap

Here are quick links from the presentation:

Get started with PhoneGap today!

Join PhoneGap Google Groups

…and most importantly… HAVE FUN!

Adobe Roadmap for Flash Runtimes

To complement the white paper released last week covering the future of Flex and the transition to Apache, Adobe has released a white paper covering the the roadmap for the Flash and AIR runtimes. Flash is very much alive and well, and is continuing to evolve to be able to bring uncompromising rich experiences to the web, desktop, and mobile devices. You can read the white paper online at:

Or download a PDF version to read later.

Here is an excerpt; be sure to read the entire white paper for a clear outline of the future of Flash runtimes.   The future is going to be awesome.

Summary

For the past decade, Flash Player and, more recently, Adobe AIR have played a vital role on the web by providing consistent platforms for deploying rich, expressive content across browsers, desktops, and devices. Beginning as a platform for enabling animation, the Flash runtimes have evolved into a complete multimedia platform, enabling experiences that were otherwise not possible or feasible on the web.

Looking forward, Adobe believes that Flash is particularly suited for addressing the gaming and premium video markets, and will focus its development efforts in those areas. At the same time, Adobe will make architectural and language changes to the runtimes in order to ensure that the Flash runtimes are well placed to enable the richest experiences on the web and across mobile devices for another decade.

PhoneGap on Windows Phone via OSX

I am embarking on a new PhoneGap project that will have to run on many platforms… iOS, Android, BlackBerry, and Windows Phone.  This will actually be my first foray into modern Window Phone development. (I did some experimental work with the Windows Mobile platform many years ago, but a lot has changed since then.)

One of the caveats with Windows Phone development is that it has to be done from Windows, just like iOS development has to be done from OS X (normally, although some cross platform technologies enable development via other OS/platforms).

Of course, I did not want to give up OS X, so here’s how I have my environment setup…  I have a virtual machine running Windows 7, in which I can run the Visual Studio development tools.   I am able to deploy to a physical Windows Phone device using the USB connection.

Windows Phone Development with PhoneGap, on OS X

However, with this configuration you will NOT be able to use the Window Phone emulator, which is a part of the Windows Phone development SDK.   The Windows Phone emulator is not supported inside of a VMWare virtual machine because the emulated operating system environment does not meet the minimum requirements (specifically the graphics drivers are not WDDM 1.1 compliant).   If you try to use the phone emulator inside the virtual machine, you will just get a blank screen.   I spent a few hours trying to find a workaround, to no avail.   You can use the Windows Phone emulator if you boot your Mac into Windows using Bootcamp, but I wanted to keep OS X as my primary operating system.

Being able to deploy directly to a device works for me, and is (in my opinion) better than being able to deploy to an emulator, thus I am happy with this workflow.   I have heard that other people have had trouble deploying to Windows Phone devices through a VMWare emulator, so here are the details on how I have my environment setup and a few “getting started” links for PhoneGap development on Windows Phone:

Note: All of the project setup work will be done through the Windows virtual machine instance.

There is a detailed “Getting Started” guide for PhoneGap and Windows Phone available at http://phonegap.com/start#wp.  This will provide you with all the information that you need to get started with PhoneGap applications for Windows Phone.

As a part of the setup process, you will need to download and install the Windows Phone SDK from http://www.microsoft.com/download/en/details.aspx?displaylang=en&id=27570.   This will include a copy of Visual Studio Express 2010 for Windows Phone, as well as additional tools for Windows Phone development.

To be able to deploy an application to a physical Windows Phone device, you will need to register as a Windows Phone developer on MSDN App Hub at http://create.msdn.com/en-US/home/membership.   This is a very similar model to Apple’s iOS developer program.  There is a $99 annual fee, and once you are registered, you will be able to debug on devices and distribute applications via the Windows Phone Marketplace.   However, debug provisioning is much easier.   Instead of signing each application with a debug certificate, you just have to register your device as a development device.   Once the device is registered, you will be able to deploy to it without any other special steps; this is very similar to the provisioning model for Nook devices.

When linking my AppHub account to my Windows Live account (a required step), I ran into a vague error message “There’s a temporary problem with the service.  Please try again.  If you continue to get this error message, try again later.”   After scouring the web for this error message, I found a few threads that mentioned this error is likely the result of an incomplete profile for your Windows Live account. Sure enough, I went into live.com and filled out my profile (including contact information), and this error went away.

My Setup

Below are the specifics for my setup; I did not have any issues connecting a Windows Phone device with this configuration.

Device Registration

To deploy an application to a Windows Phone device, you just have to use the Windows Phone Developer Registration Tool, and walk through a few simple steps to associate your phone with your developer account.  This tool is installed when you install the Windows Phone SDK.   You can read full details about debugging Windows Phone applications on MSDN.

As I mentioned above, I have heard that others have encountered problems when trying to deploy applications to Windows Phone devices via a virtual machine on OSX, but I have not had any problems with this configuration.

Repurposing PhoneGap Apps as Desktop Apps

I was inspired to write this post by several recent conversations.  I was in a debate about whether with the Flex/Flash platform you could easily repurpose content to the desktop using Adobe AIR (and vice-versa), but that you couldn’t easily do that with PhoneGap applications. (My stance was that yes, you could repurpose content.)

I wanted to make sure that people were aware that you can repurpose your content, and here’s an example of how.

A while back, I wrote a sample PhoneGap application that allows you to browse information from the 2010 US Census.  You can read more about this application and download the source code here. This application supports lots of platforms… iOS, Android, BlackBerry, and web (everything except IE because I was targetting WebKit browsers).

While this application is a mobile app wrapped in the PhoneGap container, I actually didn’t use any PhoneGap-specific libraries, so it was very easy to repurpose as a desktop application.   I created an AIR version of this application, which you can download at:

US Census Browser in OSX

You can build complete AIR applications using HTML and JavaScript, even with full access to AIR APIs (network, file access, etc.).   You can read more about building AIR apps with HTML and JavaScript at: http://help.adobe.com/en_US/air/build/WS5b3ccc516d4fbf351e63e3d118666ade46-7ecc.html

I had to use my Android 2.x branch of the US Census Browser code because the WebKit instance inside of AIR doesn’t support SVG.  I also changed the container scrolling to use normal CSS “overflow: auto” instead of using iScroll for touch-based scrolling. There were a few other one-off CSS changes to tweak the layout in the AIR web container, but otherwise the code is identical.

You just need to create an AIR application XML file and point it to your HTML content, and then package it using ADT.

Here’s my AIR application XML:

<?xml version="1.0" encoding="UTF-8"?>
<application xmlns="http://ns.adobe.com/air/application/3.1">
    <id>com.tricedesigns.USCensusBrowser</id>
    <versionNumber>1.0</versionNumber>
    <filename>USCensusBrowser</filename>
    <name>US Census Browser</name>
    <initialWindow>
        <content>www/index.html</content>
        <visible>true</visible>
        <width>1024</width>
        <height>768</height>
        <minSize>800 600</minSize>
    </initialWindow>
    <icon>
		<image16x16>icons/icon16.png</image16x16>
		<image32x32>icons/icon32.png</image32x32>
		<image48x48>icons/icon48.png</image48x48>
		<image128x128>icons/icon128.png</image128x128>
	</icon>
</application>

Notice that the “content” node just points to my “index.html” file.

Here’s the command to package it:

adt -package -storetype pkcs12 -keystore sampleCert.pfx HelloWorld.air HelloWorld-app.xml *

You can read more about this process in the Adobe AIR documentation.

If you were using PhoneGap APIs, you would have to migrate your code to take advantage of AIR APIs, but all other HTML/CSS/JS could be reused with minimal changes.

Even though I used AIR for this example, AIR isn’t the only game in town for HTML-based desktop applications…   There’s an open source project called MacGap, you can use HTA for Windows, and it’s not hard to write a HTML/Web View wrapper for any platform. It’s even been reported that you are going to be able to write apps for Windows 8 purely using HTML & JS, and you would be able to repurpose your code for this as well.

You can check out the AIR version of the US Census Browser at:

Enjoy!