Welcome!

Welcome to the official BlackBerry Support Community Forums.

This is your resource to discuss support topics with your peers, and learn from each other.

inside custom component

Web and WebWorks Development

Reply
Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

NEW VIDEO: How to create your own JavaScript Extension

Hi Everyone,

 

Some of you may have followed Adam Stanley's Lab for how to create a JavaScript extension with the Beta widget SDK.  Adam has now created a video that will walk you through the process of creating your own JavaScript extension.  This will allow you to expose any of the 20,000+ Java APIs into your BlackBerry Widget.

 

Our development and testing teams are working hard at coming out with more and more widget APIs and we are actually using the exact same method for creating these APIs as shown in Adam's video.  Yes, the good old "eat your own dog food" approach so that our internal developers are on the exact same footing as our external 3rd party developers Smiley Happy

 

The latest released version of the BlackBerry Widget SDK has a much more elegant way for creating JavaScript extensions.  At the 11:00 minute mark in Adam's video you start to see the major difference in creating these extensions compared to the Lab for the Beta version of the SDK.  

 

But don't worry, if you have already written a JavaScript extension for the Beta SDK,  you will be able to re-use all of your code.  Smiley Happy There is simply one extra step and one extra XML file you need to add to your JAR.

 

Adam also then goes on to show how you are able to use your extension in the Widget tooling.

 

Adam's now working hard to update the Lab so that it follows this new method.... No pressure Adam Smiley Very Happy

 

Take a look at the video and let us know what you think:

http://www.blackberry.com/DevMediaLibrary/view.do?name=WritingJavaScriptExtensions

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
New Developer
Posts: 32
Registered: ‎10-07-2009
My Device: Not Specified

Re: NEW VIDEO: How to create your own JavaScript Extension

how much more latency is there when using a widget to access a java api compared to using a native java application?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: NEW VIDEO: How to create your own JavaScript Extension

There really isn't that much more latency at all.  The main difference is that the JavaScript that contains the extension needs to first be compiled.  Executing the extension is quite fast.

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
New Developer
New Developer
Posts: 32
Registered: ‎10-07-2009
My Device: Not Specified

Re: NEW VIDEO: How to create your own JavaScript Extension

is RIM working on creating any audio api specific extensions for the widget platform?  Or would this be the kind of thing that RIM would like to see come from the developer community?

Retired
Posts: 3,708
Registered: ‎10-16-2008
My Device: Z10
My Carrier: Rogers

Re: NEW VIDEO: How to create your own JavaScript Extension

Hi hp3,

 

Yes we are planning to work on an Audio API for Widgets in an upcoming release.

 

Tim Neil
Director, Application Platform & Tools Product Management
Follow me on Twitter
Highlighted
Retired
Posts: 1,382
Registered: ‎07-02-2009
My Device: BlackBerry Bold 9900
My Carrier: Bell

Re: NEW VIDEO: How to create your own JavaScript Extension

Good news!

 

The developer lab on writing your own JavaScript Extension has been updated with the following changes:

 

  • Instructions reflect current version of the BlackBerry Web Plug-in tooling.  Developers no longer have to manually configure the widget packager to include extensions in their applications.  You can now simply add a JAR file containing the source code of your extension to your BlackBerry Widget project.
  • Starter and solution sample code has been updated to include both Visual Studio and Eclipse samples.
  • Lab demonstrates how to use both Eclipse and Visual Studio to build a BlackBerry Widget application using a custom JavaScript Extension.

 

This document can be found in the "Labs" section of the BlackBerry Widget SDK page.

 

Sincerely,

Adam

 

Follow me on Twitter: @n_adam_stanley
-------------------------------------------------------------------------------------------------------------------------
Your app doesn't work? Use BlackBerry remote web inspector to find out why.