By Andrei Vanahel – Consultant
Recently RIM confirmed that Android apps will eventually run on the BlackBerry PlayBook device (last time I checked it should be at some point this summer). But there are currently some extra steps required in order to get AIR apps for Android running on the PlayBook.
I know that your Android app has a nice descriptive name but let’s call it “MyApp.apk”
1. Unzip the MyApp.apk file with any ZIP tool (if .apk extension is not recognized by the tool rename the file to MyApp.zip)
2. After unzipping you will get a structure similar to this one:
3. “assets” is the folder where the AIR app is located
The second step is to package the AIR application for PlayBook using the blackberry-airpackager utility from BlackBerry SDK.
4. Navigate to the “assets” folder from the command line window and run the following command:
“C:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-1.0.1\bin\blackberry-airpackager” –package MyApp.bar META-INF/AIR/application.xml MyApp.swf assets/ data/ images/
NOTE: Change the path to the BlackBerry SDK if it’s different from the default. MyApp.swf assets/ data/ images/ are the resources you want to be included in your PlayBook app.
If you want to package and deploy your app on the PlayBook simulator to test it, first run the following command from the same location:
“C:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-1.0.1\bin\blackberry-airpackager” –package MyApp.bar -installApp -launchApp META-INF/AIR/application.xml MyApp.swf assets/ data/ images/ -device <yourSimulatorIP> -password <yourSimulatorPassword>
The next step is to sign a .bar application in order to run it on a real PlayBook device using the blackberry-signer utility from Blackberry SDK.
NOTE: I am assuming you already have a) Signing Keys from RIM (if not, order them from here: https://www.blackberry.com/SignedKeys/) and b) P12 certificates.
5. Run these two commands to sign your .bar file:
“C:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-1.0.1\bin\blackberry-signer” -verbose -cskpass <your CSK password> -keystore <your P12 file> -storepass <your P12 file password> <BAR_file.bar> RDK
“C:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-1.0.1\bin\blackberry-signer” -keystore <your P12 file> -storepass <your p12 file password><BAR_file.bar> author
Finally, install the signed app directly on the PlayBook device using the blackberry-deploy utility from BlackBerry SDK.
6. Run this command:
“C:\Program Files\Adobe\Adobe Flash Builder Burrito\sdks\blackberry-tablet-sdk-1.0.1\bin\blackberry-deploy” -installApp -password <yourPlayBookPassword> <yourPlayBookIP> MyApp.bar