| Reply | « Previous Thread | Next Thread » |
|
hi
i want to know how to Disable GPS module .... i used the code below but it not working properly. Code:
TUint zTotalModules = 0;
zError = iPositionServer.GetNumModules(zTotalModules);
if(zError != KErrNone)
return;
for(TInt zLoop=0; zLoop<zTotalModules; zLoop++)
{
TPositionModuleInfo zPositionModuleInfo;
zError = iPositionServer.GetModuleInfoByIndex(zLoop, zPositionModuleInfo);
if(zError != KErrNone)
continue;
TBuf<256> zModuleName;
zPositionModuleInfo.GetModuleName(zModuleName);
TPositionModuleId zPositionModuleId;
zPositionModuleId = zPositionModuleInfo.ModuleId();
TPositionModuleInfo::TDeviceLocation zDeviceLocation = zPositionModuleInfo.DeviceLocation();
if(zDeviceLocation == TPositionModuleInfo::EDeviceExternal)
{
TPositionModuleStatus zPositionModuleStatus;
zError = iPositionServer.GetModuleStatus(zPositionModuleStatus,zPositionModuleId);
if(zError != KErrNone)
continue;
zPositionModuleStatus.SetDeviceStatus(TPositionModuleStatus::EDeviceDisabled);
}
}
Last edited by ltomuta : 2008-02-13 at 07:58.
Reason: Formatting.
|
| furqankamani |
| View Public Profile |
| Find all posts by furqankamani |
|
I like this one: " ... below but it not working properly ...". How improperly does it work?
|
|
hi
i want to disable external GPS Bluetooth, if its enabled. thnx |
| furqankamani |
| View Public Profile |
| Find all posts by furqankamani |
|
Too bad, the API only provides methods for retrieving the current status not for changing it. It is the user who has the power of enabling/disabling a positioning module through phone's settings UI.
|
|
thanks for ur reply, but what the use of "SetDeviceStatus()".
|
| furqankamani |
| View Public Profile |
| Find all posts by furqankamani |
|
SetDeviceStatus is a property of the zPositionModuleStatus object, not of the positioning module. What you would need is something like
Code:
zPositionModuleStatus.SetDeviceStatus(TPositionModuleStatus::EDeviceDisabled); iPositionServer.SetModuleStatus(zPositionModuleStatus,zPositionModuleId) |
| Reply | « Previous Thread | Next Thread » |
| Thread Tools | Search this Thread |
|---|---|
| Rate This Thread | |
| Thread | Thread Starter | Forum | Replies | Last Post |
|---|---|---|---|---|
| N95 Gps Problem | Marceloabo | Location Based Services and Navigation | 1 | 2007-12-05 21:11 |
| Problem enumerating camera sizes on N95 | rvogt | Symbian Media (Graphics & Sounds) | 10 | 2007-11-29 23:53 |
| Accessing the N95 GPS | snogge | General Discussion | 2 | 2007-02-11 22:11 |
| Problem with the Evaluation Module Controller Application example | mabu_pggb | Nokia M2M | 2 | 2002-11-25 21:41 |
| Problem with the Evaluation Module Controller Application example | mabu_pggb | Nokia M2M | 0 | 2002-10-29 13:51 |