Yesterday, RIM released version 0.9.2 of their BlackBerry Tablet OS SDK for Adobe AIR. This was just one of the bits announced yesterday – my fellow evangelist, Renaun Erickson, already wrote about this.
So what’s new for AIR development for PlayBook? Here is a list of what caught my eye:
- New tablet simulator. If you don’t have a physical device you can use this simulator (this is just a virtual machine) to test and debug your application. This new version brings support for screen orientation (you just swipe up from the bottom-right corner to rotate the screen). You enable the support for screen orientation support by adding <autoOrients>true</autoOrients> in the application descriptor file.
- Application control permissions. If you want to use the camera, then you have to explicitly opt in by adding <permission>use_camera</permission> in the blackberry-tablet.xml descriptor file.
- Support for splash screens, SSH connection to the tablet simulator, and development on Linux.
- New APIs and .
- A number of bugs fixed, like the infamous: “Dialog boxes moved when users typed text in a text input field”.
Updating your environment to 0.9.2
If you want to try all these new goodies the first thing is to go here and download the BlackBerry Tablet OS SDK Beta3 for Adobe AIR and BlackBerry PlayBook Simulator Beta2 – make sure you select the versions for your operating system.
If you have Flash Builder 4 or Flash Builder “Burrito” (the preview version we’ve made available last year at Adobe MAX) then you can enable PlayBook development for your Flash Builder installation. On my machine I have installed “Burrito” and the previous version (0.9.1) of the BlackBerry Tablet OS SDK. To update the version I just unzipped the BlackBerryTabletSDK-Air-Installer-0.9.2-Mac.zip file, started the installer, and followed the steps (specifying the “Burrito” location, AIR 2.5 SDK, and so on).
Once the installation has finished, if you, open Flash Builder, go to “About Flash Builder”, and click the “Installation Details” button. You should see an entry for BlackBerry Tablet OS Platform features with a version like 0.9.2.XXX.
Although you could use the previous simulator version, I recommend upgrading the BlackBerry PlayBook simulator to the most recent version. So grab the BlackBerryPlayBookSimulator 2 for your operating system and start the installation process.
I used the default options and after the installation finished on my Mac, I got a new ISO file inside of my user folder: BlackBerryPlayBookSimulator-0.9.2.iso. The next step is to configure a new virtual machine using this file. So I started VMWare Fusion and chose New Virtual Machine. This will start a wizard. On the first page, just click the “Continue without disk” button.
On the second page of the wizard choose the “Use operating system installation disk image file” option, select the BlackBerryPlayBookSimulator-0.9.2.iso file from your hard disk, and then click Continue.
In the third step just make sure you’ve selected Other for both options (Operating System and Version) and click Continue. On the last step of the wizard if you click the “Customize Settings” button you can set up the amount of memory and support for 3D (I advise you to do so). Also you can change the name of the virtual machine (by default it will be named “Other” or “Other 2”).
The next step is to start this new virtual machine. After a couple of seconds you will be presented with the screen below – type Y and press Enter (don’t worry, this is not deleting your files, it is just preparing the virtual machine files). This process will take some time, so be patient. After a couple more minutes you’ll be prompted to press Enter to reboot the virtual machine.
Once the virtual machine has rebooted (this process that can take couple of minutes too) you are ready to use it.
Before being able to deploy applications from Flash Builder, you have to set up the device password, enable development mode, and retrieve the virtual machine IP address (don’t worry this is a one-time operation). Click the top-left icon and choose Security from the left list on the left. First set up a password, and then in the same screen enable development mode. You’ll be asked to enter a password, so enter the password you’ve just provided in the previous step.
Finally, choose the About entry from the left menu and scroll down to retrieve the VMWare Network Address. You’ll use this information to configure the run configuration in Flash Builder.
If you want to test screen orientation just swipe with your mouse cursor (holding the left button) from the bottom-right corner towards the center of the screen.
If you want to test the whole setup (Flash Builder and Simulator) the easiest way is to create the PlayBook example project (choose File > New > Project expand Examples > BlackBerry Tablet OS Examples, and select the BlackBerry Tablet OS Example AIR Project).
Once you have the HelloWorld project created, choose the “Run Configurations…” option from the Run icon. This will open a configuration window. Choose Mobile Application from the left list and then click the “New launch configuration” icon (from the top-left). Then select the HelloWorld project (if it isn’t already selected), choose the “On device” option, and fill in the device IP address and password you set up earlier.
If you click Run you should have the application compiled, installed on the device, and opened in a matter of seconds. Now you have a working development environment for PlayBook AIR development.