Specifying the GPS mode by using BlackBerry extensions to JSR 179

The BlackBerry® extensions to JSR 179 provide an enhanced set of GPS criteria. The net.rim.device.api.gps.BlackBerryCriteria class extends the javax.microedition.location.Criteria class. You can use the methods in the BlackBerryCriteria class to specify the GPS requirements for your application.

Method

Description

setMode(int)

You can use this method to specify an initial GPS mode when you create a BlackBerryCriteria object.

setFailoverMode(int, int, int)

You can use this method to specify a GPS failover mode to use when the initial GPS mode is unsuccessful. This method applies only to the internal GPS functionality on a BlackBerry device.

setSubsequentMode(int)

You can use this method to specify a subsequent GPS mode to use after a successful first GPS fix is retrieved.

setGPSRestartInterval(int, int)

You can use this method to specify an interval to wait before automatically restarting the GPS retrieval process when a GPS fix is not successfully retrieved. You can specify intervals to a maximum of 15 minutes and a minimum of 2 seconds, with a limit of three automatic retries.

setSatelliteInfoRequired(boolean, boolean)

You can use this method to specify whether you want satellite tracking information. The satellite tracking information consists of the number of satellites in view, and their IDs, signal quality, elevation, and azimuth. This applies only to the internal GPS functionality on a BlackBerry device.


Was this information helpful? Send us your comments.