Supporting BlackBerry Widgets on BlackBerry 6

Announcements

With the exciting news of the upcoming BlackBerry® 6 release, we wanted to make sure that everyone had a chance to preview the latest WebKit rendering engine with their BlackBerry Widgets leading up to the availability of the BlackBerry® Torch™ 9800 smartphone. To do this, we are making available an early patch for the BlackBerry Widget SDK that will allow you to build your widgets so that they are both compatible with BlackBerry Device Software v5.0 and the new BlackBerry 6.

We are all very excited about the power that the new WebKit engine brings to the BlackBerry platform, and with such a major change, there were changes in the inner workings of our Widget packaging that needed to be taken into account. We also wanted to make sure that we provided developers with a mechanism so that they didn’t have to manage different sets of code to target both v5.0 and BlackBerry 6 devices.

This early patch synchronizes the two versions to the point where you don’t have to worry about it. This means is that in order to have your BlackBerry Widget run the best on both v5.0 and BlackBerry 6, you will want to apply this patch and rebuild your Widget using the Widget SDK. We will also be releasing a full upgrade of the BlackBerry Widget SDK and the BlackBerry Web Plug-ins for Eclipse® and Visual Studio® shortly.

NOTE: This patch is only for the standalone version of the BlackBerry Widget SDK and will not work with the existing versions of the BlackBerry Web Plug-in v2.0.

Details on how to acquire the BlackBerry 6 Widget SDK patch and how to apply it can be found in the following Developer Resource Center article.

What about the compatibility between Gears and HTML5?

RIM® is looking to strongly support the HTML5 standard moving forward. As such, BlackBerry 6 no longer supports Gears functionality since that same functionality is now found in HTML5 standard.

To ease the work involved in supporting two code lines for BlackBerry Device Software v5.0 and BlackBerry 6, we have created a JavaScript toolkit that you can load into your BlackBerry Widget to provide HTML5 capabilities in Widgets running on 5.0 device software.

The JavaScript toolkit provides the following HTML5 interfaces as a simple layer over top of the Gears capabilities currently available in 5.0:

- Geolocation
o Position
o PositionOptions
o PositionError
o Coordinates

- Database
o SQLTransaction
o SQLResultSet
o SQLResultSetRowList
o SQLError

- Worker

The toolkit is smart enough to know if it needs to be loaded or not, so when a page with the toolkit is loaded in the WebKit browser on BlackBerry 6, it doesn’t add these interfaces since they already exist natively. This toolkit will allow you to construct your code so that it is standards compliant and it will work on both operating systems with a single source base.

The details of how to use and retrieve this HTML5 JavaScript toolkit can be found in the same Resource Center Article which has the details on the BlackBerry Widget SDK patch for BlackBerry 6. Check it out, then come back and let us know what you think!

About Tim W.

Tim works on the Developer Relations team at BlackBerry, focusing on WebWorks, HTML5, and Open Source.

Join the conversation

Show comments Hide comments
+ -
blog comments powered by Disqus