Creating PlayBook apps with Flex and QNX UI Components

I got some requests about how to use both Flex and QNX UI components for building PlayBook apps. In this post I will show you how to do it.

Here are the basic steps.

1. Create a Flex mobile project. Make sure that you enable the project for BlackBerry Tablet OS development.

2. Edit project properties to include the QNX libraries in the project build path (right-click on the project name > Properties). Select BlackBerry Tablet OS section and then select the Include BlackBerry Tablet OS Libraries in Build Path option.

Once you apply these changes your project should be ready for QNX components. Of course you have to add QNX components using ActionScript code; you can’t use QNX components as MXML tags.

You have to remember that the QNX UI components don’t inherit or extend the Flex base UI components. And because of this you can’t add them, for example, directly to a View Flex class using view.addElement(QNX-UI-component); instead you can use an instance of Flex UIComponent as a wrapper. Here is a code snippet that illustrates this technique:

Here is screencast that walks you through the setup and shows a sample app:

Download

You can download the project code from here.

Conqu – one of the coolest Android apps outhere

Yesterday, fellow evangelist, Terry Ryan, showed me  a tablet app for Android called Conqu. After I installed and played with it for about 5 minutes, I said: “Wow! Mate, this is the coolest app for Android tablets ever!”.

The application helps you to “Get the things done” – by managing tasks. Here is a video and screenshots:

And by the way, this application is built using Flex 4.5 (“Hero”) and uses Adobe AIR for Android as a runtime. Now this is something pretty cool. Well done guys!!!

Because they use the Flash Plaform, it isn’t that hard to target other Flash supported devices such as: PlayBook, desktops, or iOS. In fact if you take a look at their roadmap, this is exactly what they are up to.

I really like the fact that they work on a feature that allows synchronization between devices over the cloud. This will facilitate team work and make this app an interesting and appealing choice for small/medium business.

Getting the App

You can install the application from here (for now there is only the tablet version) and here you can check the roadmap and features.

Congratulations to the people behind this project. I’m looking forward to testing their desktop/PlayBook/iPad versions and hope to meet them in person. I’m really curious to talk  about their experience building this app.

Animating QNX components in PlayBook apps

In this post I want to show you how you can use animations/transitions for QNX components to create a better user experience. User experience designers use transitions when they want to highlight or focus user attention to a specific part of the application.

For example, when you add a new component to the screen as a result of user interaction you can do it in two ways:

I think it is easiest to understand the subtle difference between the two approaches by seeing this screencast:

In my application I used the tweener library for animating the container that holds the list. This ActionScript library is one of the most used libraries out there for this task. You can grab it from here.

LATER EDIT: QNX is using Tweener internally. So you don’t have to add this library, is already part of the SDK (qnx-screen.swc). Thanks to Julian Dolce of RIM for pointing this out.

Once you get the SWC file, you have to add it to your ActionScript mobile project. The easiest way, especially if you plan to use more libraries, is to add a folder to the ActionScript build path and configure Flash Builder so that every SWC file you drop in this folder will be added to the project.

The steps are:

How do you use this library? Actually it is pretty simple. There is a static method on the Tweener class called addTween(). You use this method to specify the display object you want to animate, the properties you want to animate (could be the x, y, size, etc), and the animation duration. You can also specify a number of functions to be called for example when the animation is completed or for each step of the animation.

Here is the code for animating the list in the screen:

// rightDock is the container that holds the list
// it is docked to the right-side of the screen
Tweener.addTween(rightDock, {size : 200, time : 1, onUpdate: onUpdateTween});

private function onUpdateTween():void {
    myMain.layout();
}

And this is the code for removing the list from the screen:

Tweener.addTween(rightDock, {size : 1, time : 1, onUpdate: onUpdateTween,
    onComplete: onCompleteTween});

private function onCompleteTween():void {
    myMain.removeChild(rightDock);
}

Why do I call myMain.layout() for each step of the animation? This method is executed in order to reposition and redraw the components on the screen so they account for the width change of the rightDock container.

You can download the project source code from here.

Upcoming webinar: Meet the PlayBook

If you want to find more about the PlayBook, make sure you don’t miss this free webinar: Meet the PlayBook. RIM will host a 60-minute presentation (15 minutes for Q&A). Here is the agenda:

Depending on what works better for you, you can choose the 10AM CET or 4PM CET event,  both on March 23rd.

New BlackBerry Tablet OS SDK for Adobe AIR is out

RIM just released a new beta version of their BlackBerry Tablet OS SDK for Adobe AIR (0.9.4). Here are some of the new features:

By now, you should know the drill: go to the RIM page and download the PlayBook Simulator and BlackBerry Tablet OS SDK.

Two cool community projects: RIAForge.org and Jenkins – CI for AS projects

In case you haven’t heard of RIAForge.org I urge you to take a look. This project is maintained by Raymon Camdem and you will find open source projects built on top of Adobe technologies. Among the usual suspects, like AIR projects (about 95 for now), Flex (153 projects), or Flash (94 projects) you’ll find projects that build upon ColdFusion, Flash Builder, Dreamweaver, Photoshop just to name a few.

The second project I wanted to tell you about is a continuous integration system for Flex and ActionScript projects that uses Jerkins (formerly known as Hudson). This project was launched by the Slovakia Adobe User Group and it is maintained by Michal Gron. Bravo guys!

If you have open source ActionScript or Flex projects you can have them added to this service. So far you’ll find there AS3 Signals, AS3Corelib, Flixel, Mate framework, Parsley, PicasaFlash API, PushButton Engine, Robotlegs, and Swiz.

PS. Thanks to Juraj Michálek for pointing out these goodies :)

Are you building apps for the PlayBook tablet?

I know there are a lot of people from the Flash community who are working on applications for the PlayBook tablet. I’m one of them too :D. And there are many others who are curious about what we are building.

So here I go with a request:

Thanks in advance!

Flash Player 10.3 beta available on Adobe Labs

Last night, we released the beta version of Flash Player 10.3 on Adobe Labs for Windows, Mac, and Linux. You can grab the bits from here and yes, both debug and non-debug players versions are available.

So what’s new in this release? Well, actually, there’s a lot to talk about:

So go to the Adobe Labs page, download the installer, give it a try, and talk back – you can discuss the features on the forum and you can report bugs here.

Wallaby: converting Flash files into HTML

I’m happy to tell you that the technology code named “Wallaby”, which was previewed at Adobe MAX last year for the first time, is now available on Adobe Labs. If you want to try it just go here and download it.

So what does “Wallaby” do? It takes a Flash FLA file as an input and converts it to HTML. And once you have the HTML files, you can edit and tweak them in an HTML editor. Here are some details about its inner workings:

The application itself is created using Adobe AIR (yes!)!

GTUG – Frankfurt, Germany

March 15, 2011toMarch 16, 2011

On March 15th I have the pleasure to present about Developing for Android with Adobe tools to the Frankfurt Google Technology User Group.

Next Page →

Switch to our mobile site