Welcome to the Official BlackBerry® Support Community Forums. This is your resource to discuss support topics with your peers, and learn from each other. New to the forum? Please visit the ‘Getting Started’ link below.
inside custom component

Web and WebWorks Development

Reply
Developer
cassidyd
Posts: 25
Registered: 07-24-2008
Accepted Solution

Widget API Help

Hi

 

Where can I get documentation on all the availabale APIs for widgets and how to use them?

 

Thanls

 

Davy

Please use plain text.
Developer
cassidyd
Posts: 25
Registered: 07-24-2008

Re: Widget API Help

I have been looking here but it seems out of date:

 

http://docs.blackberry.com/en/developers/deliverables/11850/index.html?name=API+Reference+-+BlackBer...

 

Iit says to use the features below but the blackberry message doesn't exist.  I

 

<feature id="blackberry.message" version="1.0.0"/>
<feature id="blackberry.identity" version="1.0.0"/>
<feature id="blackberry.find" version="1.0.0"/>

 

I tried the code below and it failed on the first line.

 

 var message = new blackberry.message.Message();   //fails here
  message.toRecipients = "1-555-555-5555";
  message.subject = "Hello";
  message.body = "World";
  message.send();

 

Any help appreciated

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: Widget API Help

[ Edited ]

Hi There,

 

The Widget API documentation is up to date.  Can you specify which Web Plug-in you are using? (Eclipse or Visual Studio)

 

There is an XML file that was distributed with the tooling that is not up to date.  You need to add a couple entries into the XML file and then the tooling will recognize it.

 

You need to add these sub elements to the <features> element found in the "library.xml" file.

 

 

<feature id="blackberry.find" version="1.0.0.0" required="true">The find feature allows for searching PIM data</feature>
<feature id="blackberry.message" version="1.0.0.0" required="true">The message feature allows for accessing the Email message store</feature>

 

 

In the Visual Studio Web Plug-in, this "library.xml" file can typically be found in the default install path of "C:\Program Files\Research In Motion\BlackBerry Widget Packager\docs\library.xml"

 

In the Eclipse Web Plug-in "[Install Path]\plugins\net.rim.browser.tools.wcpc_1.0.0.xxxxxxx\wcpc\library.xml"

 

Once you add these entries, "blackberry.find" and "blackberry.message" should appear in the tooling.

 

Turns out that that bug was my fault :smileysad:

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
cassidyd
Posts: 25
Registered: 07-24-2008

Re: Widget API Help

Thanks, that did the trick.

 

Any more of these I should look out for/ :smileywink:

 

Davy

Please use plain text.
BlackBerry Development Advisor
tneil
Posts: 3,555
Registered: 10-16-2008
My Carrier: Rogers

Re: Widget API Help

The other items that I know of are all listed in the known issues/release notes that were posted.. :smileyhappy:

 

Cheers,

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Please use plain text.
Developer
cassidyd
Posts: 25
Registered: 07-24-2008

Re: Widget API Help

ha ha - Yeah, I suppose I should read that.

 

Thanks

Please use plain text.
New Developer
chrisdoehring
Posts: 2
Registered: 11-09-2009

Re: Widget API Help

Hi there.  I'm toying with the Push Demo Widget example, but I'm having trouble running it.  I get it packaged up and installed in a simulator just fine, but at runtime blackberry.push is undefined.  I've doublechecked that the <feature/> elements in config.xml are correct.  Do I need to do something on the device (simulated) to enable/allow use of the blackberry.* APIs?  BTW, I get a similar result when I run other Widget examples (ex. PIM widget example).

 


Here are some environment details:

Windows 7 32-bit

Widget Packager version 1.0.0.5.

MDS 4.1.4 simulator

9500 simulator with OS version 5.0.0.252.

 

Any ideas?

 

Thanks for the help,
CD

Chris
Please use plain text.
Developer
csibbdev
Posts: 67
Registered: 09-23-2010
My Carrier: T-Mobile

Re: Widget API Help

Did you ever get past this and if you did could you post the solution?

 

Thanks

Please use plain text.