Playbook Air Application cockups

Well hello world. That’s all I was trying for a moment. It ended up being quite a long process. I got interested in the Blackberry Playbook apps around 2 weeks ago and since then I’ve had one headache after the other. Fear not since my definition of an expert is someone who’s committed all the possible mistakes in a field.

I am not an expert yet since I’ve taken only one path along and there is a long road to travel. However, I will continuously post my experiences just to ensure that others, who can STFW, will not have to go through the same pain as I did and thus can save 2 weeks atleast. So here goes…

My background:

I’ve not done much flash development (none on AS3 whatsoever) since I come from the world of console video games. 8 years on it with C/C++ and a host of other languages does things to you when it comes to a new hardware. So I got all interested in this playbook thingy. I decided that I wanted to develop something cool on the playbook. That was where the first hurdle came in. Playbook, atleast for now, only supports AIR apps. Although the good news is that these apps will be rendered using OpenGL ES, it was a bummer for me. Being a fan of Blackberries I said, fine, it is just another language and let me go ahead with it. Before I even got to understanding the language, I needed to write “Hello World”. This was the second bummber and one that took far too much time. The Blackberry website lists very little information on the non Adobe Flash Builder 4 packages. I do not have the money to purchase Adobe FB so I was looking for alternatives. Lo behold the flex SDK and the AIR SDK are open sourced and available for free. This implied that I did not have to purchase Adobe FB  (not Facebook you git). I talked to a bunch of other seasoned flash dudes from the company I work for (Sierra Atlantic). One of them is Sudhir and he helped me out in figuring out how to do this. He has been using Flash Develop + Flex + Air for a while now but never touched the Playbook SDK. I hope the following will help the next developer churn out a cool app.

To start off, let’s keep things simple.

1) Download Flash Develop (http://www.flashdevelop.org/community/viewforum.php?f=11) and while you are at it donate something to this awesome project.

2) Install Flash Develop and let it also download and install Flex for you. That will keep some of the other configurations easy.

3) Download the AIR 2.5 SDK from http://www.adobe.com/products/air/sdk/ Extract it to a location and keep track of this location

4) Extract AIR SDK to a location and take note of it

5) Download and install VMware http://downloads.vmware.com/d/info/desktop_downloads/vmware_player/3_0

6) Download and install the Playbook simulator by following http://docs.blackberry.com/en/developers/deliverables/21877/Configure_the_BlackBerry_PlayBook_simulator_1347134_11.jsp

Note that this works only for 32 bit OSes. For 64 bit OS install by following this link: http://blog.swfjunkie.com/2010/10/getting-started-blackberry-playbook-development-setup/

Ignore anything that refers to Flash Builder. Essentiall you are just extracting the ISO image and installing it using VMWare.

7) Download and install the Playbook SDK by following http://docs.blackberry.com/en/developers/deliverables/21877/Installing_the_SDK_1347128_11.jsp#Install_the_BlackBerry_Tablet_SDK_1347129_11

Again, this won’t work for 64 bit OSes. So I followed this link: http://shanky.org/2010/11/03/first-steps-with-blackberry-playbook-air-sdk/

Okaaaaaaaay, now all of the above links will help you install and get ready for development. However, when it comes to using FlashDevelop with the Playbook SDK, it is extremely hard to find decent links. So this is where my friend Sudhir helped me out.

Using this link I got started. http://www.studiochris.us/2010/flashdevelop-and-blackberry-playbook-development-the-basics/

However the 3rd bummer was just a few feet away since the application would compile and run fine in swf format and in air format. It did not like me whenever I wanted to deploy it to the playbook emulator. Whenever I used the command line tool it would spike on me with “Invalid value ” for Package-Author” stupid error message. At first I thought that I had to enter the author field somewhere but there was no such facility and that got me to think like a regular programmer. What if the Playbook parser was wrong and it was spewing out gunk? It turns out, I might have been correct since the error had nothing to do with the author field.  It had everything to do with the project xml file. In my case it was called “application.xml” and there were two fields missing in it “description” and “copyright”. So I went in, filled those two fields up in the xml file. Then with fingers crossed, I executed the command line statement… and voila I could see my app installed on the playbook vmware image. Brilliant.

Now all I need to do is write a cool programme. Before leaving, I’d request the Playbook support team to fix some of the glaring issues in the SDK. First the lack of support for 64 bit OSes. Second have better support for Linux. Third show me the Playbook appstore already!! Fourth damn it man, all I keep saying nowadays is “Playboy” or “Blackbook”. I’d appreciate a better naming convention ;). Fifth and the most important thing – better tutorials. I will post tutorials on my website regularly but I was hoping to find some right on the Playbook developer website. Sixth and probably hard to come by – how about native C++ support? You are missing out on all those uber cool OpenGL developers because they have to now use AS3.

Advertisements

2 responses to “Playbook Air Application cockups

  1. Thanks for posting about the error you received. I hadn’t seen that one before. I’ll make some updates to the template and put the error on my to-do list for more error checking in the command line tools.

    I agree the error messages could be a lot more helpful (and accurate). Without documentation at the very beginning, the versionNumber field caused strange errors to occur as well. The BAR compiler is very picky about the descriptor.

  2. Ahoy! Wow! I did not know that it would help the author of the post who helped me in the first place :).
    This is what worries me – RIM should be doing a better job at providing good tools for developers. It should not make the entry such a hassle. I hope someone from RIM listens to this and helps us all out. I’d hate to see people move away from building apps just because the documentation/tutorials are not enough.
    Anyway thanks to you, I have my first decent app up and running.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s