Symbian
Symbian Developer Library

SYMBIAN OS V9.4

Feedback

[Index] [Previous] [Next]


Location Acquisition API overview

[Top]


Purpose

This document describes the Location Acquisition API. Client applications use the API to obtain the location of the mobile device and to discover the type and status of the available positioning modules.

[Top]


Introduction

The Location Acquisition API defines the client application view of the LBS Location Server. The API is a standard Symbian OS client/server implementation. Applications use the API to:

[Top]


Key concepts

Location Server

The Symbian OS server used by client applications to get location information. The Location Server is part of the Location Framework. The Location Server can use multiple positioning technology modules to obtain location information. Location information can be obtained from the network and from A-GPS hardware.

Location Framework

The part of the LBS subsystem that handles requests for location from client applications and from the network. Components within the Location Framework interact with positioning technology modules to get location information.

Positioning module

A software component that handles requests for location information and interfaces with the underlying positioning technology hardware or the network.

[Top]


API summary

Figure 1 illustrates the client interface classes of the Location Acquisition API including the data classes that hold basic location information. The classes shown are defined in the header file lbs.h. See Location Acquisition API reference for a full list of all the API header files.

The following is a brief description of some of the most important API classes:


Platform security capabilities

Applications must have the Location capability to use the Location Acquisition API.

Figure 1. RPositionServer and RPositione...


Figure 1. RPositionServer and RPositioner with basic position data classes

[Top]


Typical uses

Client applications use the API in three ways:

1. To get location information

The main purpose of the Location Acquisition API is to provide location information to client applications.

See How to get location information for examples of how to get basic location information using the API.

2. To get positioning technology module information

The API provides functions to allow discovery of the capabilities and quality of information provided by the set of positioning technology modules.

See Positioning technology modules for a description of the positioning technology module information which is accessible to client applications using the API.

See How to use module information for an example of how to obtain information about the available modules.

See Positioning technology module selection criteria for an explanation of module selection criteria.

See How to use module selection criteria for an example of how to use these criteria to get location information of the required accuracy.

3. To receive notification of positioning technology module status changes

An application may wish to be informed when a module becomes available or unavailable. For example, an application may want to know when GPS becomes available as this may increase its capabilities and so change its behaviour. The API provides a way for client applications to receive notification of module status changes.

See Positioning technology module status for a description of positioning module status and events.

See How to get module status change notifications for an example of how to get notification of module status changes.

[Top]


The Location Acquisition API and the S60 platform

An early version of the Location Acquisition API was first introduced in the S60 platform version 2.6. Although this was based on Symbian OS version 8.x the API was not supported on other UI platforms. The first version of the API that was available on all UI platforms was introduced in Symbian OS version 9.2.

Although the two versions of the interface have a common set of classes and use the same header files, it is necessary for developers to link their application against different libraries:

There are also some other minor differences that should be noted and are described in the table below. Further details are documented in How to get location information.

LBS behaviour Client library is lbsselflocate.dll Client library is lbs.dll

Application is for non-S60 platform

Link application code with lbsselflocate.lib

Do not link with this library

Application is for S60 platform

Do not link with this library

Link application code with lbs.lib

Support for class HPositionGenericInfo

Not supported (do not use)

Supported

RPositioner::CompleteRequest()

Supported

Not supported (returns KErrNotSupported)

Calls to RPositioner::SetRequestorL()

Optional - calling this method is not required

Method call is required

[Top]


See also

Position data and info classes

Position data

Positioning technology modules

Positioning technology module status

Positioning module selection criteria

How to get location information

How to use module information

How to get module status changes

How to use module selection criteria

Location Acquisition API reference