Creating native extensions for BlackBerry 10
Although a BlackBerry WebWorks application has a wide range of functionality, that functionality is limited to the resources that the application contains. By creating a custom extension, you can extend the functionality of your application to include the features and functions provided by core native APIs that are available to BlackBerry 10 OS applications.
- BlackBerry 10 WebWorks SDK 184.108.40.206 Beta or later
- BlackBerry 10 Native SDK 10.0.06 Beta 2 or later
- BlackBerry 10 device or simulator
Using a sample to create an extension
To illustrate how to create an extension for a BlackBerry 10 application, we'll use a sample extension named "memory extension". This extension uses the Memory API to retrieve the amount of free memory available on a BlackBerry 10 device.
You can download the Memory extension sample from GitHub at: https://github.com/blackberry/WebWorks-Community-APIs/tree/master/BB10/Memory.
The following resources are included in the sample:
This folder contains a basic BlackBerry WebWorks application that uses the memory extension to retrieve the amount of free memory on the device.
This folder contains the native source files for the memory extension.
This folder contains a sample file structure for a completed extension that you can copy into your BlackBerry 10 WebWorks SDK extension folder.
This folder contains a sample file structure for a native extension project, which you can use to build the native portion of the extension.
Creating a BlackBerry WebWorks extension involves two parts:
After you create an extension, you can add it to the BlackBerry WebWorks installation so that it's available when you build your BlackBerry WebWorks applications. See Make the extension available to your app for more details.
Last modified: 2014-03-10