Extending AIR for Android

*** The following is totally unsupported by Adobe ***

*** UPDATE: Adobe has officially added native extensions to AIR. I highly recommend you use that approach instead of mine. ***

Adobe AIR provides a consistent platform for desktop and mobile apps. While consistency is very important there are times when developers need to extend beyond the common APIs. This article will walk you through how to integrate AIR for Android applications with other native APIs and functionality in the Android SDK. It covers three common use cases for native extensibility: System Notifications, Widgets, and Application Licensing.

Introducing Mixing Loom – Runtime ActionScript Bytecode Modification

At this year’s 360|Flex conference in Denver, Mike Labriola and I unveiled a new project we’ve been working on called Mixing Loom. Our presentation was called “Planet of the AOPs” because Mixing Loom lays the foundation for true Aspect Oriented Programming (AOP) on the Flash Platform. Mixing Loom provides Flex and ActionScript applications the hooks they need to do bytecode modification either before runtime or at runtime. Through bytecode modification an application can apply a behavior across hierarchies of objects. There are a number of behaviors in a typical Flex application (such as logging, security, application configuration, accessibility, and styling) that could be represented as Aspects. Today these behaviors must either be included in every class that needs them or included way down the object hierarchy (i.e. UIComponent). With Mixing Loom a compiled SWF can be modified (applying necessary behaviors) after it’s been compiled or as it’s starting up.

Using an Embedded WSDL with Flex’s WebService API

Recently I was helping a customer figure out how to use an embedded WSDL with Flex’s WebService API. One scenario in which this is needed is when the actual WSDL is not available at runtime. In this case the application must contain the WSDL instead of request it at runtime. The Flex WebService API today only supports loading the WSDL over the network at runtime. Beginning in Flash Builder 4 the Service wizard generate code that internally use the WebService API. So no matter how you integrate with a SOAP Web Service in Flex, you need the WSDL accessible via a URL at runtime. This wasn’t possible for the customer I was working with so we figured out a way to actually embed the WSDL into the application. Here is what we did…

Tour de Mobile Flex on iOS

Flex support for iOS apps is coming in June 2011!!! Here’s a little sneak peak of the Tour de Mobile Flex app running on iOS:

These are exciting times for developers! With Flex we will be able to use one technology and one code base to build apps for iOS, Android, Playbook, Windows, Mac, Linux, IE, Firefox, Chrome, Safari, etc! Fun times!

Next week in Denver: 360|Flex and Flex Camp 2011

Next week I’ll be presenting at two great Flex events here in Denver, Colorado. On Sunday April 10th, Greg Wilson and I will be presenting an “Intro to Building Mobile Apps” at 360|Flex. Then on Tuesday April 12 Mike Labriola and I will leave the world of Flex bewildered and befuddled when we present “Planet of the AOPs” (also at 360|Flex). And on Thursday April 14 I’ll be presenting “Building Cross-Device Apps with Flex” at the Denver Flex Camp. It’s going to be a really fun week and I hope to see you there!

Planet of the AOPs at 360|Flex

This year at 360|Flex in Denver I’ll be co-presenting a session with Mike Labriola called “Planet of the AOPs”. What is the Planet of the AOPs? Let me give you a little hint…

public class Foo {
  private function getPrivateBar():String {
    return "private bar";
  }
}
var foo:Foo = new Foo();
foo['getPrivateBar']();

Yup! It’s gonna be fun! The session will be on Tuesday April 12th at 2:50pm. Hope to see you there!

Also, Mike and I are doing a 360|Flex speaker chat today at 11am (MDT).

My Upcoming Flex Sessions in Atlanta – DevNexus and Atlanta Flex User Group

In a few weeks I’ll be speaking in Atlanta at DevNexus and at the Atlanta Flex User Group. On March 21, 2011 at DevNexus I have two sessions:

On March 22, 2011 at the Atlanta Flex User Group I will be presenting about Flex 4.5 - The Non-Mobile New Features.

I hope to see you at DevNexus and at the Atlanta Flex User Group!

Integrating Flex and Java EE with JBoss

Flex and Java have always fit together very nicely. Connecting from Flex to a Java back-end is pretty straightforward whether you are using plain old Java beans, Spring beans, or EJB session beans. I’ve created a video and some sample code that shows you how to connect Flex to a Java EE system using BlazeDS. This video walks though a real-time collaborative Whiteboard application that runs in the browser, on the desktop, and on mobile devices. Check out the video and let me know what you think.

Testing Flex Apps with FlexMonkey Reloaded

Whether or not you use a tool to test your Flex apps, you are repeatedly testing your application. Doing this by hand is a pain: start the app, click through some stuff, verify the result is what you expected, makes some changes to your code and then do it all again. The open source FlexMonkey tool automates that process so you don’t have to keep doing those steps manually. FlexMonkey works with Flex applications that run in the browser (Flash Player) as well as on the desktop (Adobe AIR). Jon Rose has just finished a complete overhaul of FlexMonkey that makes automating your Flex testing process uber-simple and much more robust than the previous version.