views:

355

answers:

2

In a recent blog post announcing Blackberry Widgets the following was said about getting Java library functionality in a Blackberry Widget (emphasis added by me):

What if RIM doesn't provide me with the JavaScript API I am looking for?

RIM will continue to add new JavaScript APIs for BlackBerry Widgets. Most will not require new BlackBerry Device Software upgrades to be used. Java developers can also create their own custom JavaScript BlackBerry Widget Extension to be packaged with their widget.

They also go on to describe the architecture of a packaged widget with the following diagram:

                                       

How can I implement a "Linked JavaScript Extension" and use it in a Widget?

A: 

You should check out The official Blackberry Widgets site which has some links to the documentation and API that you will been for developing widgets.

I've had a quick run through the demo app from their documentation and you basically write standard HTML, CSS and Javascript. The Javascript can then call API functions, and you setup which 'features' (using/include statements) can be accessed by setting up the config.xml file.

Fermin
yeah, but how to use it with Browser Field? by opening widget locally, just like in BrowserFieldDemo?
Max Gontar
I've looked through every single document on that site. There isn't even a single mention of JS extensions.
Ben S
A: 

The answer to this is in a press release from RIM that came out yesterday.

Use the net.rim.device.api.script package interface.

Ben S