Skip to content


Subversion checkout URL

You can clone with
Download ZIP
Latest commit 8c4b872 WalklineWang update license again.....
Failed to load latest commit information.
AboutScreen update license again.....
Analytics Updates Readme with End of Life notice
Barcode Added a sample project for the barcode extension.
CalendarListener CalendarListener: Initial check-in
DeviceInfo USBConnection state was not returning the correct JSON format. Thanks…
EmailListener Update Smartphone/EmailListener/webworks/message/email/impl/EmailList…
FilePicker Update Smartphone/FilePicker/
FileUploader updated to add server example
GlobalEvent added copyright info
LED Update Smartphone/LED/library.xml
Locale updated issues links and removed UploadDownload that wasn't ready
LocationPicker Changed copyright to 2012.
MailAttachment fixed typo
MessageList Updating instructions based on issue description
NFC Updated. New features and new sample application.
SendMenu Reset menu reference when remove() call is made
Sleep updated issues links and removed UploadDownload that wasn't ready
SpinnerControl updated image link
Storage added delete functionality
TEMPLATE updated QUnit to v1.4
TransportCoverage updated
Vibrate Update Smartphone/Vibrate/src/webworks/bbalert/vibrate/VibrateNamespa…
systemlog A little more copyright reconection.
.gitignore initial loading of source initial loading of source

Contributing A Smartphone API

When building an API for the BlackBerry WebWorks SDK for Smartphones, you will start by creating a sub-directory within this Smartphone directory. Pick a name that suits your extension and try not to use spaces in your directory name. It just plain makes things easier.

As a recipe for building your API you can use the SpinnerControl as a good example. In your API directory you will want to create a source code directory called src where your actual API code will reside. You will also need to create a library.xml file at the root of this directory. More information on the library.xml can be found below in this README.

A file also needs to be created at the root of your directory where you can place all the information about how to use and configure your API. The SpinnerControl is a good example of what type of information to include in your file. This file uses Markdown wiki formatting.

Smartphone API Tutorial

You can find a very detailed tutorial on creating Smartphone JavaScript API extensions on the BlackBerry Developer Resource Center. This Tutorial is slightly out of date when it comes to writing your library.xml file but the information below on library.xml will show you the correct way of contributing an API to this repository.

library.xml Formatting

The below example uses the Spinner Control details to show what information needs to be added to your library.xml file:

<library isWhitelist="true">

  <extension id="blackberry.ui.Spinner">

    <platform value="JAVA">
      <target version="default" config="JAVA" />

    <configuration name="JAVA">
      <src type="text/java" path="blackberry" comment="API implementation in Java" />

    <feature id="blackberry.ui.Spinner" version="">Popup Spinner control</feature>


library.isWhiteListed Should be set to true. This means that your API will be injected into JavaScript when the whitelisted feature ID is used in the applications config.xml file.

library\ This is the feature ID of your JavaScript extension that will be used in an app's config.xml file

library\extension\entryClass This value is the fully qualified name of the Class that exposes the net.rim.device.api.web.WidgetExtension Java interface.

library\configurations\configuration\src.path This is the name of the root directory that is found in your extensions src directory

library\features\ This is the feature ID of your JavaScript extension that will be used in an app's config.xml file. Yes... it is in here twice!

library\features\feature.version This attribute is required but doesn't serve any meaning. Leaving it at is all you need to do.

Testing Your API

You can test your API with an existing installed WebWorks SDK for Smartphones by following the below steps:

  1. Locate your BlackBerry WebWorks SDK for Smartphone extensions directory using your File Explorer. Default path is C:\Program Files\Research In Motion\BlackBerry WebWorks Packager\ext

  2. Create a new directory for your API in the ext directory. Make sure that this new directory is the same as your feature id blackberry.ui.Spinner

  3. Copy your library.xml file into to your new ext\blackberry.ui.Spinner directory

  4. Copy your root code directory(specified in the library\configurations\configuration\src.path) to your new ext\blackberry.ui.Spinner directory

  5. Create a WebWorks Application using your API and create a feature element specifying the ID of your API. <feature id="blackberry.ui.Spinner" />

  6. Build your application using the bbwp.exe command line and test your application on the desired simulator

Something went wrong with that request. Please try again.