Namespaces
Variants
Actions

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

Jump to: navigation, search
Archived.png
Archived: 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

Article
Created: User:Technical writer 1 (01 Nov 2007)
Last edited: hamishwillee (21 Jun 2012)

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 21 June 2012, at 09:08.
151 page views in the last 30 days.
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved