Wednesday, 25 May 2011

Flash Builder 4.5 - Deploying an unsigned Playbook application using a Debug Token

In my previous posting I explained how I created and deployed a debug token on the Blackberry Playbook Simulator. In this posting I explain the next step, deploying an unsigned application bar file using the command line procedure (as the Flash Builder UI process isn't working for non US environments - see previous posting).

I avoid to use the command line procedure to package (and deploy) the application bar file as the packaging is perfectly working from the Flash Builder UI. However, a few settings and hacks have to be done so that your FB 4.5 app will run on your Blackberry Playbook:

  1. The Playbook doesn’t support yet the Air SDK 2.6 (according to RIM an upgrade  will be provided around June 2011, which will fix this issue), and as a result of that you have 2 choices: you either use Flash Builder Burrito (with the Air SDK 2.5) or you need to add a little hack to your projects to remove any Air SDK 2.6 dependencies.

    The detailed explanation to this can be found on
    Jason’s Flex Blog.
  2. In addition what is said in the above blog entry, the advanced packaging options should be

    -forceAirVersion 2.5
    –devMode

    The reason for the –devMode option is that the (real) Playbook will otherwise not accept a deployment of an unsigned apps even though a Debug Token has been installed and the device is in Developer mode.

  3. Don’t forget the mentioned compiler option -swf-version=10
  4. Last but not least you need to add the AuthorID as created in the MANIFEST.MF file of the currently used debugtoken.bar file that must be installed on your Playbook device.
    • Open the debugtoken.bar file with for instance 7-Zip
    • In the META-INF folder you find the MANIFEST.MF file
    • Open it with a Notepad
    • Find the tag called Package-Author-Id: and copy the encrypted code into the clipboard
    • Open the blackberry-tablet.xml file of your project
    • Add a tag paste your id code here
    • You also need to add an tag (which is your vendor name as registered with RIM)

<
qnx>
<author>flexdomino.netauthor>
<authorId>gYAAg…siWgauthorId>
qnx>

OK, that’s it, we are half way through. Next step is to run the Export Release Build… function of the Flash Builder to finally use again the command line procedures to deploy the application.bar file on to the Playbook. For this I created a simple batch file:

C:

CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"

blackberry-deploy -installApp -devMode -launchApp -package "D:\BlackberryApps\mobilenotes\mobilenotes.bar" -password xxx -device your_device_ip

The -password must match the password set for the Playbook device and the –device  ip address can be found here…




As shown in the screen shot, do not forget to change your device to Development Mode from the security settings. And as said earlier, you require a valid debug token to be installed on the device.

To remove the app from the device I created yet another batch file:

C:

CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"

blackberry-deploy -uninstallApp -package "D:\BlackberryApps\mobilenotes\mobilenotes.bar" -password xxx –device your_device_ip 
 

Wednesday, 18 May 2011

DNUG Session Journal Application for Blackberry Playbook

Qkom GmbH developed a Session Journal Application for the Blackberry Playbook for the upcoming DNUG (German Notes User Group) event. This application is similar to the Lotusphere Session Journal we published earlier this year for Android devices.

The application accesses a Lotus Notes session journal database using our web service based Domino Data Access API (SoapgateQ!)


Item QR Code
Enjoy :-)

On EDGE with Adobe Flash Builder 4.5

Check this video and you know why I love to be a Flex developer...

Tuesday, 17 May 2011

Flash Builder 4.5 - Problems with installing a Playbook Debug Token

Last week I reported the issues I have with my attempts installing a debug token on the latest Blackberry Playbook Simulator (1.0.1) to Blackberry Dev Support...


"Dear support,

I have been battling with the new debug token feature for the Playbook Simulator and am at a point to give up.

I tried using the Flash Builder 4.5 UI to create the debug token bar file, but get an error message saying "Unable to parse issue date from debug token."

Once I change the system and all Flash Builder / Java configurations to US local settings, the bar file is created. Unfortunately I'm not located in the US and hence keeping my PC on US settings is a no go.

I also tried the command line creation and that works with my UK settings.

However, the deployment is not functioning, UI and command line deployment fail. Well, to be precise, the deployment as such works...

D:\BlackberryApps\DebugToken>deploytoken
D:\BlackberryApps\DebugToken>C:
C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-
1.0.1\bin>CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry
-tablet-sdk-1.0.1\bin\"
C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-
1.0.1\bin>blackberry-deploy -installDebugToken "D:\BlackberryApps\DebugToken\deb
ugtoken.bar" -device 172.16.21.129 -password al....86
C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-
1.0.1\bin>"C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\jre\bin\java" -X
mx512M -jar "C:\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberr
y-tablet-sdk-1.0.1\bin\\..\lib\BarDeploy.jar" -installDebugToken "D:\BlackberryA
pps\DebugToken\debugtoken.bar" -device 172.16.21.129 -password al....86
Sending Install Debug Token request...
Info: Action: Install Debug Token
Info: File size: 2246
result::ok

...but the VM reports an invalid token




This problem has been reported on the developer forum, but no solution has yet been provided.

One observation I made is the following: the device ID reported by the Flash Builder UI is different to the PIN shown in the device:



 

I tried to create the debug token with both ids, but neither works. Any help would be appreciated.

Best regards
Matthias Wille
FlexDomino.net"






And  yesterday I got following response:


Hello,

Thank you for contacting BlackBerry Application Development Support!

In response to your recent email, we would be happy to assist with this issue.

We are aware to this issue in regards to PBDT, and a resolution to this issue is being developed.

Good luck in your future BlackBerry application development and have a great day!

Sincerely,
BlackBerry Application Development Support
devsupport@rim.com
www.BlackBerryDeveloper.com

Friday, 13 May 2011

Playbook Signing Processes - creating and deploying a debug token

Recently I posted about my experience with signing a Playbook application for the Blackberry AppWorld. This posting is a continuation of the saga looking at the steps to create and deploy a debug token. This process was introduced with the latest Playbook SDK and Simulator version 1.0.1 which came along with the official launch of the Playbook, Flash Builder 4.5 and the Air SDK2.6.

Who thought that things might have gotten a bit easier...well, continue dreaming. It got worse :-(

First I tried using the Flash Builder 4.5 UI to create the debug token bar file, but I got an error message saying "Unable to parse issue date from debug token.". Research showed that there seems to be an issue with any environment with non en_US date time settings for either the OS, Flash Builder and or the JRE. Essentially you either setup your system to US date time settings and make sure to find all JRE and Flash Builder config files and change the respective settings (works I have tested it) or you are back to command line batch processing.

Being non US located, I prefer to keep my local settings, hence I'm back to command line…

1.      I copied the client-PBDT-xxx.csj file provided by RIM into the directory where I keep all my signature files and created a batch files to register the .csj file (one time only).

C:
CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"
blackberry-debugtokenrequest -register -cskpass xxx -csjpin xxx "D:\AppCertification\BBRegister\client-PBDT-xxx.csj"

Please refer to my previous posting where I explained a modification to blackberry-debugtokenrequest.bat and all other signing related batch files.

  1. I then created a D:\BlackberryApps\DebugToken directory in my in which I create and store the debug token bar files and from where deploy them to the Playbook Simulator.

    C:
    CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"
    blackberry-debugtokenrequest -cskpass xxx -csjpin xxx  -keystore "D:\AppCertification\flexdominonet-dvl2.p12" -storepass xxx -deviceId 0xFFFFFF "D:\BlackberryApps\DebugToken\debugtoken.bar"

    Note: the device ID (PIN) reported in the Simulator is eventually incorrect. Please go through the process of generating the debug token through the Flash Builder UI. The “Auto Discover…” feature will give you the correct device ID (or PIN). Please refer to the online help of Blackberry for this procedure. Though it did not work out for me, it is explained well.

  2. Finally I created the batch file to deploy the debug token bar file.

    C:
    CD "\Program Files (x86)\Adobe\Adobe Flash Builder 4.5\sdks\blackberry-tablet-sdk-1.0.1\bin\"
    blackberry-deploy -installDebugToken "D:\BlackberryApps\DebugToken\debugtoken.bar" -device 172.16.21.129 -password xxx

    Note: the device IP can received from the Simulator:



  3. Now I started the Simulator and made sure the date and time setting are in sync with my PC. I disabled the Set Date and Time Automatically and then set the date and time. The automatic date time feature sets the Simulator to a past date (at least in my case) and lets the deployment of the debug token fail.

  4. Under Security->Development Mode I enabled Use Development Mode and then clicked Upload Debug Token.

  5. As the last step I ran the 3 batch files (as said above, the first batch file to register the .csj file must only be executed ones).

    Note: from my experience the last batch file to deploy the token will succeed, but hang the waiting upload process in the Simulator. However, after resetting the VM, the token is eventually installed and shows the following:
Removing an existing token is also not straight forward. The Remove Debug Token button doesn’t seem to work. So this is what I came up with:

1.      Reset the VM
2.      Change the Simulator’s date to a future date (year) to render the token invalid
3.      Now the Remove Debug Token button works and you can successfully remove the token.

I have not yet managed to deploy an unsigned application. The Flash Builder UI failed on this one too. Reason being that I could not import the debug token bar file because of the same "Unable to parse issue date from debug token." error I already stumbled over. So now I’m trying to deploy the unsigned application bar file again through command line processing. I will post as soon as I have some results…so stay tuned.

Tuesday, 3 May 2011

Flash or HTML5? Interesting analysis...

http://now.periscopic.com/2011/05/our-research-into-flash-and-html5-which-one-is-right-for-your-project/

The only thing I feel adding to this report is that sometimes the 1% market could be more lucrative than the 99%.

Domino with PHP (PHP Bookstore)

We just posted a complete overhaul of our Domino with PHP demo using SoapgateQ! web services. The source code is of course available and now documented as well.




Ode to Steve...