Skip to content

Ripple behaviour for WebWorks APIs

dansilivestru edited this page Aug 26, 2011 · 9 revisions

Below is a description of the behaviour of Ripple when emulating the WebWorks APIs. This will describe the UI behaviour, if any, as well as any interaction points available to modify the retuned values of the APIs.

To get the definitive API documentation for WebWorks, please go to the official documentation site:

http://www.blackberry.com/developers/docs/webworks/api/

Data Storage

Ripple relies on the underlying HTML5 implementation in Chrome for all data storage support. There is no User Interface Panel provided in Ripple to explore the Data Storage. However, The "Resources" tab in Chrome's Web Inspector offers full visibility into both the Local Storage and Databases used in your application.

GPS

Ripple allows the developer to change the devices GPS location using the Geo Location Panel. The developer can change the following:

  • Latitude
  • Longitude
  • Altitude
  • Call Id
  • Accuracy
  • Altitude Accuracy
  • GPS Delay
  • Simulate GPS timeout

Anyone of the values above can be changed through the Geo Location UI Panel in Ripple. The end result is that the application being run in Ripple will be give the values set whenever it requests its Geo Location values.

GPS Delay, will delay the return of the GPS coordinates by the amount of time specified in the delay control.

Simulate GPS timeout, will cause the platform to return values for a GPS call that will be return by the emulated device when the GPS request fails.

Identity

When calling any of the blackberry.identity APIs, Ripple will return the set values. Ripple has default values stored for the majority of these APIs. It is importan to note that some of the values can be changed by accessing the Device Settings UI Panel in Ripple.

Invoke

When invoking a native application by executing the blackberry.invoke Ripple will raise a notification screen. The notification will include the name of the application that has been invoked as well as detailing the parameters that were passed in. Should the application being invoked require a set of arguments that were not supplied, Ripple should warn the developer.

Message

The Message API consists of Message and SMS.

In the case of Message, Ripple provides all of the APIs for programatic access, there is no UI Panel for interacting with the Message API.

Ripple does provide a UI for interacting with the SMS API. Using the Messaging UI Panel in Ripple, the developer can set the value for phone number of the incoming message (the "From" field) as well as the content of the message. Pressing the "Send SMS" button will raise the appropriate event so that the developer can simulate an incoming SMS message.

Phone

Ripple provides the Phone UI Panel to allow the developer to interact with the Phone API. The UI Panel allows the developer to specify the Phone event name from a drop down list as well as the phone number associated with said event. Clicking on the "Fire Event" button will result in the event being raised. Ripple also does some deductive reasoning to properly create the PHone Logs associated with the event that was just triggered.

A "Clear Logs" button is also provided to allow the developer to clear all of the phone logs that were created by the previous actions.

PIM

Ripple provides full emulation of the entire PIM APIs. There are a set of default contacts stored in Ripple, however, Ripple does not provide a UI Panel for interacting with the PIM data. The developer can access the default contacts in their application by making the appropriate programatic calls to the appropriate APIs

Push

Ripple provides a UI Panel to allow the developer to trigger Push events. The developer simply enters the data that they want to push and clicks the "Push" button. A "Port" also needs to be selected, however it is important to note that the port numbers available are driven by the developer having started to listen to specific ports in their application. Only the ports that have been registered in the mobile application will show up in the "Port" drop down box.

Note: Ripple only supports text based push at this time. Blob is not currently supported.

System

Ripple provides the ability to change some of the system values that are accessible through the System API through the "Device Settings" UI Panel in the sub-section named "System". Ripple supports all of the APIs listed under System, as well as the HTML5 implementation of Web Workers

Touch

Ripple emulates touch events, however Ripple does not at this time support multi-touch events.

User Interface

Ripple currently supports a subset of the User Interface APIs. Currently supported are:

  • Dialog
  • Menu
  • Menu Item
  • Canvas
  • 2D Canvas Context

Ripple does not provide a UI Panel for interacting with these APIs, however, Ripple will display a modal dialog when the Dialog API is invoked. Ripple will also render the BlackBerry menu when the menue API is invoked or when the BlackBerry menue button is clicked on the emulated phone.

Utilities

Ripple supports the Utilities APIs, however, Ripple does not provide a UI Panel for these APIs. They are only accessible programmatically.

Config

Ripple will parse the config.xml file if it is available. Ripple uses the Config UI Panel to display the validation results for config.xml, informing the developer if any items are malformed or missing.

Should a config.xml file be available, Ripple will use the feature information in the config.xml file to restrict access to the WebWorks APIs. Only features (i.e. APIs) that have been whitelisted in the config.xml file will ba available to the developer in their mobile application.