Supported Gears APIs

The following table lists the Gears™ APIs that the BlackBerry® Browser supports.

Gears API

Description

Permission required?

Factory

This API is used to instantiate all Gears objects.

no

Blob

This API provides access to binary data in web applications.

no

Database

This API provides a client-side database, built on SQLite®, that provides your web application with a persistent store for user and application data. You can use SQL statements (as supported by SQLite) to access the data.

The BlackBerry Browser attempts to create a data store in one of the following locations:
  • On a media card, if one is installed, the database files are stored in the /BlackBerry/system/appdata/rim/gears/ folder.

  • On the internal media card, if it exists on the BlackBerry device, the database files are stored in the /home/user/appdata/rim/gears/ folder.

When Mass Storage Mode is enabled on the BlackBerry device and the device is connected to the BlackBerry® Desktop Manager, access to the media card is not available. As a result, there might be instances when your database operations are unsuccessful because the database location on the media card is unavailable.

The BlackBerry Browser implementation of this API includes the SQLite full text search extension FTS3, which differs from the Gears specification. The Gears specification describes support for FTS2. FTS2 has been deprecated by SQLite.

yes

Desktop

This API allows you to place an icon on the Home screen of the BlackBerry device. This icon acts as an entry point to your web application. When the user clicks the icon, the browser opens and displays the content associated with the URL of the web application. The BlackBerry Browser supports multiple file selection by using the openFiles() method.

The BlackBerry Browser implementation of this API does not support referencing an image for the icon with a URL (as defined in the Gears Desktop API specification). You must provide the icon image file.

no

Geolocation

This API allows for access to location information for the BlackBerry device. You can use the Geolocation API only for high-accuracy position requests.

This API provides more functionality than the blackberry.location object, but using the Geolocation API might be a costlier option, in terms of time and battery life. Since only high-accuracy position requests are possible, response time can be slow. The browser maintains an open network connection while it waits for the location information, so repeated high-accuracy requests can drain the BlackBerry device battery.

yes

HttpRequest

This API provides functionality that is similar to the XMLHttpRequest object. Unlike the XMLHttpRequest object, the objects of the HttpRequest API can function within the context of a WorkerPool.

The BlackBerry Browser implementation does not support incremental progress for the HttpRequest.onprogress and HttpRequestUpload.onprogress event handlers. Instead, each include a start event and an end event.

no

LocalServer

This API is designed to provide a client-side web server so that web pages can be served from the cache while the BlackBerry device is offline.

This API is not yet implemented, but is stubbed out in BlackBerry® Device Software 5.0. If you use this API, your web application will function, but it will not cache and serve pages as intended.

Timer

This API allows you to set window timer functions for scripts running in workerpools.

no

WorkerPool

This API enables the browser to asynchronously run multiple JavaScript® functions in parallel. You can run a script in a worker pool so that the script does not block access to the web page.

yes

Index


Was this information helpful? Send us your comments.