Developers

Local Navigation

Home > Developers > Developers Knowledge Base

Back

How To - Define criteria to retrieve a GPS fix

Last Updated: 08 May 2006
Article Number: DB-00461

Summary

This article applies to the following:

  • BlackBerry® wireless devices based on Java™
  • BlackBerry Device Software 4.0 and later

Description

The BlackBerry device implements JSR-179, which is a Location application programming interface (API) for Java 2 Platform, Micro Edition (J2ME™). To determine the location of a device, this Java API provides the following two ways of getting a Global Positioning System (GPS) fix:

  • LocationProvider.getLocation() method for acquiring a fix on demand.
  • LocationListener method for acquiring a fix at set intervals.

The different types of fixes are:

  • Cellsite, which is the least accurate but the fastest location mode, uses cellsite towers that attempt to provide triangulated GPS information.
  • Assisted, which is more accurate than the Cellsite fix but not as fast, uses the network in an assisted search.
  • Autonomous, which yields the most accurate fix but provides the first fix the slowest, uses the on-board GPS chip.

The information provided in the Criteria object determines the type of fix needed.

Note: Some carriers do not support Cellsite and, or Assisted modes.


Horizontal Accuracy Vertical Accuracy Cost Power Consumption Resulting Mode
Required Required Not allowed N/A Autonomous
Required Required Allowed Low, Medium, or No Requirement Autonomous
Required Required Allowed High First Fix: AssistedSubsequent Fixes: Autonomous
Not Required Not Required Not allowed Medium or High or No Requirement Autonomous
Not Required Not Required Allowed Medium or No Requirement Assisted
Not Required Not Required Allowed High First Fix: AssistedSubsequent Fixes: Autonomous
Not Required Not Required Allowed Low Cellsite


Additional Information

The BlackBerry API supports all combinations of the method to acquire a fix and the types of fixes, except the LocationListener method with Cellsite. This combination is not supported as the Cellsite fix uses distant towers. This is of little value unless you are moving rapidly from tower to tower, for example, in an airplane. As a result, the returned fixes are not much different. The LocationListener method is aimed at applications that perform regular polling of locations. However, if you decide to combine LocationListener and Cellsite fixes, schedule a TimerTask that acquires Cellsite fixes via LocationProvider.

Note: The LocationListener will be extended to Cellsite fixes in a future release.


Keywords

LocationListener, LocationProvider, GPS, Cellsite, tower