Finding the location of a mobile device

The Location Acquisition API allows applications to access the location information of a mobile device regardless of the location technology used.

Typical use cases include:

  • Finding the location of a mobile device by GPS

  • Finding the location of a mobile device by network based positioning

  • Basic calculations using location information such as distances, bearing, and timestamp (see TPosition and Extended location information in the API reference guide.)

Important implementation considerations include:

  • Applications should close their RPositioner when they don't need positioning for an extended period of time. Also, when staying in background for more then a minute.

  • The system automatically selects an appropriate positioning method, based on the type of the class given as input for Open (RPositionServer &aPosServer) method. The system tries all available methods until it succeeds. Generally applications use this method. For special cases, applications can use Open (RPositionServer &aPosServer, TPositionModuleId aModuleId) to force system to use specified positioning method. In that case system does not fallback in case of failure

Note: The S60 3rd Edition, S60 3rd Edition Feature Pack 1, and S60 3rd Edition Feature Pack 2 SDKs do not have a Map API. You need to have a third party API to display the location information you receive on a map.

Getting the location of a device

To find the location of a mobile device:

  1. Use the methods of the Location Acquisition API to construct your application.

    The RPositionServer and RPositioner classes are particularly relevant in getting the location of your device, which is typically stored in the TPositionInfo class.

    For information on some detailed uses of the API, see the Location Acquisition API Usage section for:

  2. Make sure lbs.lib is accessible to your linker when compiling your application by including it in your mmp file or by editing the project properties in your IDE, depending on your build environment.

  3. Make sure you have the correct capabilities information set for your application, depending on your application you need at least Location.

Additional information on locating your device

For more information, see:

Related S60 APIs

The S60 platform also offers the following related services: