Blackberry Widget dialog and menu conflict issue for OS 6.x

If you have developed a Blackberry Widget app that uses features blackberry.ui.menu and blackberry.ui.dialog in the same application, you’ve noticed that your application won’t work on devices that have OS version 6.x (like the Torch 9800 -6.0.0.227).

To fix this I’ve developed an Javascript Widget Extension that actually does the same as blackberry.ui.dialog but that uses another namespace( to avoid conflict with blackberry.ui.menu).

To use this Widget you should do this:

  • Download the blackberry.ui.dialoger and put this file in projects directory “ext”;
  • Go to applications “config.xml” and replace “blackberry.ui.dialog” for “blackberry.ui.dialoger”
  • Then replace all occurrences of  “blackberry.ui.dialog” for “blackberry.ui.dialoger” in your widget source code
  • And it’s Done!

Now your application can run in both OS 5.x and OS 6.x, and supports dialogs and menu items!

Best regards,

Daniel Botelho

Blackberry Widget with Google Analytics

This is another weird thing! Actually I’ve tried to use Asynchronous Snippet but soon I realise that it didn’t work properly in the widget since it would only track the pageView for the first time the widget loaded.

So I’ve decided to use the same code that I use in this website, and everything works!

To track a pageView I use this code:

pageTracker._trackPageview(‘<page_name>’);

To track an event I use this:

pageTracker._trackEvent(‘<category>’, ‘action’, ‘label’);

If you still can’t use Google Analytics in your BB Widget is because maybe you forgot to add :

<access subdomains=”true” uri=”http://www.google-analytics.com”/>
<access subdomains=”true” uri=”https://ssl.google-analytics.com”/>

to your widget permissions!

Blackberry simulator JVM Error 545

“JVM Error 545 incompatible or corrupt file system”

I’m getting this all the time when starting Blackberry simulator from the Eclipse. Usually to solve this I reinstall the JDE and everything is fine, but now I realised that is only needed to remove the “.dmp” files from the simulator directory!