Me on the Android Central Podcast

I did a quick semi-informal podcast today with the guys from Android Central on Flash Player and Android. It was a lot of fun to do and special thanks to Phil and Jerry for having me on.

The feedback after the Android Summit we had has been great and I have to say, I think the Android community is as great as the Flash community when it comes to smart, passionate and fun people.

Slides and Demos from FITC San Francisco

FITC was an absolutely awesome event. Props to Shawn, Rick and team for another great event. I’m looking forward to them coming back to San Francisco next year. Thanks to everyone who attended my talk. I got some great questions and as I said in the sessions, if you have anything cool you’re doing with mapping and Flash, drop me an email.

Below are the slides I used and I’ve also posted all of the code for the demos I did. I haven’t really cleaned them up at all, but if you have any questions, let me know.

Hands-On Review of Android Multi-touch Tablet

At Web 2.0 Expo this year in the Adobe booth we’re showing off some devices and tablets running Android with full Flash Player and AIR on them.

It runs Adobe’s Flash and Air apps flawlessly. That was the first time I saw Adobe’s Air apps running on a tablet and totally impressed by how it ran. And now I can understand why Apple wants to ban Flash and other Adobe products completely from their iPhones and iPads, because it’s rather incredible technology.

It’s been a bit of a long haul, but we’re really close to putting the runtimes in your hands so you can see it for yourself.

Using NativeProcess in AIR 2 with GPSBabel

GPSBabel is one of the coolest projects on the Internet. It takes basically any geolocation format and quickly lets you convert it into any other format. And the world of geodata is a wild west of various formats so it makes it super easy to bring all of that together in a handy command line tool.

Because it has a command line tool I figured it would make a pretty good (and easy) demo for AIR 2′s NativeProcess APIs. And it does! In fact, I started work on an ActionScript 3 wrapper that (should) make it easy to call GPSBabel from an AIR application and make it do your bidding. It’s in really, really rough shape, but here’s the beginning of it.

Getting Started

The first thing you need to do to use the NativeProcess API is to alter your app-xml file. After the initialWindow tag are a bunch of commented lines that talk about supportedProfiles. The NativeProcess API only works in the extendedDesktop profile so you need to enable it with this line.

<supportedProfiles>extendedDesktop</supportedProfiles>

With that, you can start testing the NativeProcess API.

Calling GPSBabel

Using the NativeProcess API is pretty simple. You first create a NativeProcessStartupInfo object, which is where you point to the executable binary as well as pass in any arguments. Then you set up event listeners on the NativeProcess object, and finally you call the start() method and pass in your startup object.

To convert one file type from another, GPSBabel takes a series of command line arguments. This is the command to convert a GPX file into a KML file.

gpsbabel -i gpx -f /tmp/myroute.gpx -o kml -F /tmp/myroute.kml

So to replicate this with the NativeProcess API, first create the startup object and pass in those arguments. The -i is the format of the original file, -f points to the original file, -o is the format to convert to, and -F is the converted file. All of those are pushed to the arguments property of the startup object.

var npsi:NativeProcessStartupInfo = new NativeProcessStartupInfo();
// The location of GPSBabel (a file object)
npsi.executable = _gpsBabelLocation;
var args:Vector.<String> = new Vector.<String>;
args.push("-i");
args.push("gpx");
args.push("-f");
args.push("/tmp/myroute.gpx");
args.push("-o");
args.push("kml");
args.push("-F");
args.push("/tmp/myroute.kml");
npsi.arguments = args;

The next step is to add event listeners to the NativeProcess object. Most of the time, GPSBabel just sends standard messages in UTF, so handling responses is easy. In the case of a conversion, the only event listener that really matters is the error listener.

_process = new NativeProcess();
_process.addEventListener(ProgressEvent.STANDARD_ERROR_DATA,onStandardErrorData);

Dealing with NativeProcess events was a little odd to me, but because GPSBabel just returns text, this is pretty easy. If it errors out, it dumps text to the screen. That text becomes part of the NativeProcess object. Depending on what the context is (if it’s an error, or just regular data output) it goes into a different variable. In this case, the event listener just reads the error data from the standardError property and traces it out

private function onStandardErrorData(event:ProgressEvent):void
{
trace(_process.standardError.readUTFBytes(_process.standardError.bytesAvailable));
}

The last thing to do is to go back up and start the process off by calling the start method and passing in the startup options that were created before.

_process.start(npStartupInfo);

And that’s it. I’ve got an example on GitHub as part of the GPSBabelOnAIR project. The mxml file in the examples folder uses the library, which has all of the NativeProcess code. The combination of those should provide a working basic example of using NativeProcess and GPSBabel.

AIR 2 Multitouch Gestures and the 3D Google Maps Flash API

I took some time over the weekend to dive into the multitouch APIs on AIR 2 and built a basic example with the Google Maps 3D API. I wired up the out of the box gestures in AIR 2 to some specific manipulations so that it goes beyond the typical move and pinch gestures that most of the multitouch mapping apps use. You can see the YouTube clip below and grab the source over on GitHub to see how easy it is to use the gesture events in AIR 2.

A couple of great places to look for more multitouch info is Christian Cantrell’s blog and Matt Legrand’s Multitouchup.com. I’m also working on an Android version of the app but there are a couple of kinks to work out.

AIR and Flash Player coming for Android and Mobile Devices

If you’ve been a member of the Adobe/Macromedia community you’ve heard a lot about Flash on mobile devices over the years. After seeing what’s coming, I think this is what you’ve been waiting for. We talked a bit about Flash Player 10.1 for mobile devices at MAX, and having played with a working version on the Nexus One, I think it’s going to be great for people that want to consume bits of Flash content here and there, especially games and video. But what we haven’t talked much about is AIR for mobile devices.

Cross-device Applications

AIR has been a big success on the desktop partly because being able to create an application with native hooks and having it run cross-platform is a big benefit to developers and to end-users who jump around different operating systems. But the mobile landscape is an even bigger minefield. Apple’s phone gets all of the attention, but you’ve got Android out there, RIM’s BlackBerry, Palm Pre, Windows 7, and others. If you come up with a great idea for an application, you have to write it for all of those platforms. Or watch as someone takes your idea and copies it on one of those platforms after you invest all of your time building it for a single platform. AIR for mobile is going to let you use the language and the tools you know to create applications across all of those mobile devices much more easily. We’re starting with AIR mobile for Android and BlackBerry and Kevin Hoyt has a demo video up that shows it in action on the Motorola Droid. And with AIR for mobile you’ll get access to multi-touch, accelerometer, GPS, creating your own gestures, screen orientation, and other device-specific APIs.

Introducing the Mobile RIA

One of the things that’s going to become very important for developers is creating content specifically for the small screen. Tools like Flash CS5 are going to make it very easy to reuse assets and workflow to create both applications and in-browser mobile Flash content. With AIR for mobile you can take the same application and run it on Android, compile it as an application for the iPhone, or deploy it on Mac, Windows, and Linux on the desktop. Depending on the device, you may want to make some small modifications, but you’ll be able to reuse your assets and a bulk of the code to quickly create cross-platform mobile applications with AIR mobile.

Because of the screen size and the very different specifications of each device, it’s going to be critical to customize content as much for a single device as possible and make sure you’re following best practices. There is a good article on creating mobile RIAs over on the Developer Center and Thibault Imbert has put together a great beta paper on optimizing mobile content for mobile devices.

Flash Platform Tools and Workflow

There is always a lot of talk about the future of Flash and which devices it’s on. But the ecosystem of Flash has gone way beyond an animation engine that’s limited to the web browser. No matter what you’re doing, the tools and workflow of the Flash Platform are going to give you the ability to deploy the most creative applications across the most used devices. Some of those applications will be mobile RIAs in the browser and some will be AIR mobile applications that take advantage of native APIs across mobile operating systems. For developers it really is one web, any device, and any kind of application. So get ready to go nuts and show every other developer how mobile applications are supposed to look.

AIR 2 Beta 2 Available – Much Improved Printing Support

If you missed it yesterday, AIR 2 beta 2 is now available on Adobe labs. This release includes some bug fixes, some optimizations, and a few new features including support for TLS/SSL socket communication and much improved support for interacting with printers. I sat down with the engineer who did a lot of the work on the new printing API and interviewed him about it. He also walked me through a demo of the new features. The APIs let you have complete control over printing and customize the experience. It’s worth checking out.

Discussing New Printing Features in the AIR 2 Beta 2 from Ryan Stewart on Vimeo.

AIR 2 and Flash Player 10.1 Betas now Available

Tonight we’ve released the AIR 2 and Flash Player 10.1 betas on Adobe Labs (direct download links for Flash Player and AIR). This is the first time we’ve simultaneously released the desktop (AIR) and browser (Flash Player) runtimes for all three platforms (Mac, Windows, Linux) at once, which is a great milestone for the Flash Platform. So what is this release and why should you care? One thing to note is that this is just the desktop runtimes, not any mobile runtimes. Those will be coming later. Luckily a lot of the work we did for mobile in terms of adding new APIs and optimizations are all in these releases so you’ll still get a lot of the benefits.

Flash Player 10.1

Lots of new stuff in Flash Player 10.1 including the multi-touch APIs, the performance gains, and some new networking APIs. The biggest thing (IMHO) with this release is the huge, huge memory improvements. Kevin showed the slide at MAX but it’s worth mentioning again. Without any code changes you’ll see significant improvements in memory with Flash Player 10.1.

flash_player_mem_footprint

AIR 2

air_logo_cloudsThe AIR team has been kicking all kinds of ass and I think AIR 2 is going to be a great release. One of the things we heard over and over again after AIR 1.0 was that people wanted more access to the native APIs of the operating system. AIR 2 brings a lot of that. Now you can open up a file with its default application as well as invoke native commands with the new NativeProcess API. We’ve also added the ability to create a socket server inside an AIR application and monitor changes to mounted drives. Plus a lot more. And you get all of the performance enhancements (and more) from Flash Player 10.1 so it should be a lean, mean AIR experience for end users as well.

Developing with the new Runtimes

(Update Christian has a list of AIR 2 resources that will help.) We won’t have a new Flex SDK for these runtimes yet so it’ll take a tiny bit of manual work to add support for the developer tools and the new runtime. Nick Kwiatkowski has a great screencast up for using the AIR 2 SDK in Flash Builder. It basically involves creating a copy of the Flex 4 SDK and then manually copying over the AIR SDK so it overwrites the AIR 1.5 SDK that ships with Flex 4. On the Flash Player side you’ll have to grab the playerglobal.swc and replace it in your Flex SDK.

I’m pretty excited about this particular set of runtimes. Talking to developers it seems like AIR 2 hits the mark and helps them accomplish more. Seeing the foundation put in on Flash Player 10.1 to create really great mobile experiences is also exciting. As always make sure to provide any feedback or any issues you run into over on the forums.

Enterprise Apps in the Cloud Just Got Better: Salseforce/Adobe Partnership

Today we announced an interesting partnership between Salesforce.com and Adobe. As Tim Anderson noted, there has always been a surface integration because Flash Builder could consume WSDL’s and Salesforce.com has always exposed them. But this goes quite a bit deeper. One, we’re working with the Salesforce.com team to make sure their IDE is completely integrated into ours. You’ll be able to get a combined Force.com and Flash Builder tool so you never have to switch environments to create Flex applications on top of the Force.com platform. The new tool exposes a new project type, the Force.com stratus type, and lets you automatically connect to the Force.com platform using a WSDL file. Then you can use the data features of Flash Builder to connect your data in the cloud with Flex components. It also has support out of the box for creating AIR applications that support online/offline synchronization.

The new tool and the partnership really simplify the process to connect to the Force.com platform so that you can focus more time on building a really great user interface that exposes those services. A “consumer-link” user experience is becoming more and more prevalent in the enterprise and is seeing a lot more demand. As ReadWriteWeb notes this is going to do a lot to help merge the consumer world of Flash with the enterprise back end of Force.com as well as some of our enterprise functionality in the form of LiveCycle Data Services. I think there are also some cool use cases here for integrating LiveCycle Collaboration Services. And of course the Force.com platform now gets access to over a million Flash developers who can target the cloud.

You can check out the video below for some getting started information. There is also a fantastic Force.com quickstart on Adobe’s Developer Connection and a lot of other information on the Force.com section of Devnet. Finally there will be a live webinar on November 3rd with James Ward and Markus Spohn where you can get a demo and then ask questions about how it all fits together.