×
Namespaces

Variants
Actions

Archived:RPositioner API - Detecting that user has canceled Bluetooth device selection

From Nokia Developer Wiki
Jump to: navigation, search

Archived.pngArchived: This article is archived because it is not considered relevant for third-party developers creating commercial solutions today. If you think this article is still relevant, let us know by adding the template {{ReviewForRemovalFromArchive|user=~~~~|write your reason here}}.

Article Metadata
Tested with
Devices(s): All S60 3rd Edition devices
Compatibility
Platform(s): S60 3rd Edition
S60 3rd Edition (initial release)
Article
Created: User:Technical writer 1 (01 Nov 2007)
Last edited: hamishwillee (31 May 2013)

Description

When an application uses the GPS capabilities to get the position information, an error is returned from the GPS Requestor if no GPS position method is set. However, if Bluetooth GPS is available but the user cancels the connection request when prompted, there seems to be no response from the Requestor.

Solution

When the Bluetooth GPS is enabled and the Bluetooth selection dialog is canceled, the KPositionQualityLoss error in the RunL of NotifyPositionUpdate method is returned. If the device status is now requested using the RPositionServer GetModuleStatus API, EDeviceError is returned, and this indicates that the dialog has been canceled.

The code snippet for getting the device status is

    TPositionModuleId iModule;
TPositionModuleStatus iModuleStatus;
iPosServer.GetDefaultModuleId(iModule);
iPosServer.GetModuleStatus(iModuleStatus,iModule);
TInt err = iModuleStatus.DeviceStatus();
//err contains EDeviceError in this case.
This page was last modified on 31 May 2013, at 02:45.
43 page views in the last 30 days.