RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX


Make Location Aware Apps Part of the Grind with BREW

Now that handset carriers are rolling out support for location-based services, you can finally use BREW's LBS APIs to effect. Learn how to add this in-demand functionality to your applications.

hile Qualcomm BREW has had support for location-based services (LBS) applications since its inception, only recently have CDMA carriers begun to roll out the back-end support these applications need. Consequently, the BREW LBS interface may be one of the least-used and least-understood interfaces available to handset developers. Yet, in the coming year these may be the most in-demand as application developers race to bring location-awareness to their applications.

Introducing the IPosDet Interface
Since its inception, Qualcomm BREW has provided some form or another of LBS support. Beginning in BREW 1.1, Qualcomm added the IPosDet interface, a versatile asynchronous interface for obtaining both traditional latitude/longitude and cellular base station location information (most applications will use the traditional latitude/longitude based positioning, because this is the easiest way to interface with back-end geocoded databases). This interface provides direct access to the handset's assisted Global Positioning System (GPS) facility gpsOne, in which the handset monitors both the cellular network and GPS satellite signals and offloads expensive processing to location servers on the network, permitting location fixes with as little as one cell site and one GPS satellite's worth of data.

Because BREW handsets use Qualcomm's gpsOne-assisted GPS facility, carriers must upgrade their infrastructure by adding the necessary location servers. Consequently, LBS applications have been slow to appear, because carriers must first pave the way for the applications by upgrading their networks to support these applications. Nonetheless, for many carriers this work is almost complete, and for registered developers, Qualcomm can provide flash updates to specific handsets that enable the IPosDet interface for application testing on many major carriers.

The IPosDet interface provides these methods:

  • IPOSDET_SetGPSConfig and IPOSDET_GetGPSConfig let you set and get the configuration information for the accuracy and kind of position information you seek.
  • IPOSDET_GetSectorInfo returns information about the cellular network and the handset's location in the network, including the cell system ID, network ID, base station ID, and base station class. It's best used for network diagnostic applications when you're working directly with carriers on specific applications and you have access to a database that describes the deployed network.
  • IPOSDET_GetGPSInfo is an asynchronous interface which returns latitude, longitude, altitude, velocity, and heading through a callback you register with the interface.
Because location information is a sensitive topic, with serious repercussions for user privacy, the IPosDet interface requires privileges in the application's Module Information File (MIF). If you're developing an LBS application that will fetch latitude/longitude information, be sure to assert the Position Determination Privilege; similarly, if you're going to be using IPosDet to obtain sector positioning information, you must assert the Sector Info privilege. In the BREW MIF Editor (version 3.0), simply choose the "Privileges" tab and check either the "Position Location" or "Access to Sector Location" items. Don't forget to document this privilege use in your National Software Testing Laboratories (NSTL) submission, too, to ensure there aren't any questions when you apply for True BREW certification of your application. Moreover, as you will see in the section "Obtaining Position Information" later in this article, actually requesting a position causes most handsets to show a dialog telling the user that the application is requesting positioning information, giving them the opportunity to deny the request.

Close Icon
Thanks for your registration, follow us on our social networks to keep up-to-date