Components of the BlackBerry 10 WebWorks SDK

The BlackBerry 10 WebWorks SDK provides the tools and plugins you need to configure and build a WebWorks app. You create web assets using your preferred tools, and then use the SDK to package the assets into a .bar file that can be installed onto a BlackBerry device.

Installing the BlackBerry 10 WebWorks SDK gives you:

  • tools to help you create, build, test, and sign your apps
  • the complete set of BlackBerry and Cordova plugins

The BlackBerry 10 WebWorks SDK is built on Apache Cordova, an open-source development framework that lets you create applications using web technologies. This lets you take the resources that you used to create an app for one platform, and, with some slight modifications, port that app to other platforms, such as Android or iOS.

The BlackBerry 10 WebWorks SDK web tool

The BlackBerry 10 WebWorks SDK web tool is a UI that allows you to:

  • create an app
  • specify configuration settings
  • add plugins
  • build and deploy your app for testing
  • build and sign your app for production

By default, the UI displays only the projects you created with the web tool in your current browser. If you have a project that was created outside the web tool or in a different browser, you can import it at any time. For more information about importing projects, see Importing a WebWorks 2.0 project into the SDK web tool.

To use the The BlackBerry 10 WebWorks SDK web tool, your browser must accept cookies. All WebWorks project content that appears in the tool is stored in browser cookies. Deleting these cookies removes the project data from the web tool, but leaves the project folders intact. No project information is lost, but you have to import your projects to work with them in the web tool.

BlackBerry 10 WebWorks SDK command-line interface

The BlackBerry 10 WebWorks SDK command-line interface provides a number of commands that allow you to create projects, add plugins, and build and test your app.

The available commands are:

Command Description

Global commands (may be used from within any folder)

create

Creates a WebWorks project.

create-headless

Creates a WebWorks project with a headless service component.

target

Manages devices and simulators for testing.

help

Describes the usage of the WebWorks commands. Entering webworks help <command> provides usage information about that command.

Project-based commands (may be used within a project folder)

build

Packages the app into a .bar file. You can choose to package the app for testing (debug mode) or to package and sign the app for production (release mode).

run

Builds the app and deploys it onto a BlackBerry device. You can choose to deploy the app for testing (debug mode) or sign and deploy the app for production (release mode).

emulate

Builds the app and deploys it onto the simulator for testing.

plugin

Manages the app's plugins.

serve

Serves the app so you can preview it in your local browser.

Plugins installed with BlackBerry 10 WebWorks SDK

The BlackBerry 10 WebWorks SDK includes all the standard WebWorks and Cordova plugins.

Plugins represent the layer that connects JavaScript to the native C/C++ layer of the BlackBerry 10 OS. They allow you to access the native functionality of the device (for example, accessing accelerometer data, or using the camera) without the need to code in the device's native language.

To use a plugin to access native functionality, you must:

  • Use the methods, properties, and events for an API in your JavaScript code as described in the API Reference.
  • Add the appropriate plugins to your app to bind your JavaScript code to the native C/C++ code.

Some plugins require you to add certain permissions to the app configuration in order to access native functionality. In most cases, when you add a plugin that requires a permission, the permission is added automatically to the configuration by the tools. In some cases, however, the permission is only required to access a subset of the native functionality. In these cases, the permission is not added automatically; you must add the permission yourself. For more information about adding permissions, see Adding and removing app permissions.

BlackBerry WebWorks plugins

Plugin ID Name Description
com.blackberry.app Application Provides basic app support.
com.blackberry.bbm.platform BBM Platform Lets you access the social features and functionality of BBM.

Required permission: bbm_connect

com.blackberry.connection Connection Lets you access the cellular and Wi-Fi connection information for the BlackBerry device.
com.blackberry.display Display Allows you to control whether the screen dims while the app is in the foreground.
com.blackberry.identity Identity Provides information about the user's identity and accounts.

Required permission: read_device_identitying_information

com.blackberry.ui.input Input Lets your app respond to user events on a touch-enabled keyboard. This is a new input event layer for use with touch-enabled keyboards beginning with BlackBerry 10.3. It is unrelated to DOM mouse events or HTML5 touch events on the screen.    
com.blackberry.invoke Invoke Lets your app invoke and interact with other apps on the device.
com.blackberry.invoke.card Card Lets your app invoke a screen of another app on the device.
com.blackberry.invoked Invoked Lets your app be invoked by other apps on the device.
com.blackberry.io IO Provides access to the unsandboxed file systems.
com.blackberry.io.filetransfer File Transfer Lets your app upload and download files to/from a remote server.
com.blackberry.notification Notification Lets your app to provide notifications to the user.

Required permission: post_notification

com.blackberry.payment Payment Lets you sell digital goods in your app.
com.blackberry.pim.calendar Calendar Lets you access and manage entries in the Calendar application.

Required permission: access_pimdomain_calendars

com.blackberry.pim.contacts Contacts Lets you create and find contacts.

Required permission: access_pimdomain_contacts

com.blackberry.push PushPayload

PushService

Lets you access the BlackBerry push architecture to receive push content in your app.
Required permissions:
  • sys_use_consumer_push
  • run_when_backgrounded
com.blackberry.screenshot Screenshot Lets you to capture an image of the device screen.
com.blackberry.sensors Sensors Lets you get access to system level sensors and attributes of the BlackBerry device.
com.blackberry.system System Lets you access system level functions and attributes of the BlackBerry device.
com.blackberry.ui.contextmenu Context Menu Lets you control whether context menus are enabled, listen to events, add items to appear based on the context, and set the theme of the context menu.
com.blackberry.ui.cover Window Covers Lets you modify the app's window cover, which is displayed when the app is in thumbnail mode.
com.blackberry.ui.dialog Dialog Lets you manipulate system dialog boxes.
com.blackberry.ui.toast Toast Lets you display system toasts in your app.
com.blackberry.user.identity User Identity Lets you access the user's personal information stored in the identity provider's account system, and provide user authentication/authorization to access the identity provider's apps and services.

Cordova plugins installed with BlackBerry WebWorks SDK

Plugin ID Name Description
org.apache.cordova.battery-status Event (Battery Status) Provides an implementation of an old version of the Battery Status Events API.
org.apache.cordova.camera Camera Provides access to the device's default camera application.
org.apache.cordova.contacts Contacts Provides access to the device's contact database.
org.apache.cordova.device Device Describes the device's hardware and software.
org.apache.cordova.device-motion Device Motion (Accelerometer) Captures device motion in the x, y, and z directions.
org.apache.cordova.device-orientation Device Orientation (Compass) Obtains the direction that the device is pointing.
org.apache.cordova.dialogs Notification (Dialogs) Lets your app create visual, audible, and tactile notifications.
org.apache.cordova.file File System Provides the functionality to read, write, and navigate file system hierarchies.
org.apache.cordova.file-transfer File transfer Lets you upload and download files.
org.apache.cordova.geolocation Geolocation Provides access to location information based on the device's GPS sensor or inferred from network signals.
org.apache.cordova.inappbrowser InAppBrowser Provides a browser view that displays when calling window.open(), or when opening a link formed as <a target="_blank">.
org.apache.cordova.media Media Lets your app play back audio and video files on a device.
org.apache.cordova.media-capture Media Provides access to the device's audio, image, and video capture capabilities.
org.apache.cordova.network-information Network Information (Connection) Provides information about the device's cellular and Wi-Fi connection.
org.apache.cordova.splashscreen Splashscreen Lets your app hide and show the splash screen.
org.apache.cordova.vibration Notification (Vibration) Lets your app create visual, audible, and tactile notifications.

Last modified: 2014-10-09



Got questions about leaving a comment? Get answers from our Disqus FAQ.

comments powered by Disqus