You Are Here:

Community: Developer Discussion Boards

#1 Old Problem in Disable GPS module on N95? - 2008-02-13, 07:01

Join Date: Aug 2006
Posts: 41
Send a message via MSN to furqankamani
furqankamani
Offline
Registered User
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);
	}
}
Thanks in advance
Last edited by ltomuta : 2008-02-13 at 07:58. Reason: Formatting.
Reply With Quote

#2 Old Re: Problem in Disable GPS module on N95? - 2008-02-13, 08:00

Join Date: Sep 2004
Posts: 7,953
Location: Tampere, Finland
ltomuta's Avatar
ltomuta
Online
Forum Nokia Expert
I like this one: " ... below but it not working properly ...". How improperly does it work?
Reply With Quote

#3 Old Re: Problem in Disable GPS module on N95? - 2008-02-13, 08:16

Join Date: Aug 2006
Posts: 41
Send a message via MSN to furqankamani
furqankamani
Offline
Registered User
hi

i want to disable external GPS Bluetooth, if its enabled.

thnx
Reply With Quote

#4 Old Re: Problem in Disable GPS module on N95? - 2008-02-13, 08:42

Join Date: Sep 2004
Posts: 7,953
Location: Tampere, Finland
ltomuta's Avatar
ltomuta
Online
Forum Nokia Expert
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.
Reply With Quote

#5 Old Re: Problem in Disable GPS module on N95? - 2008-02-13, 08:59

Join Date: Aug 2006
Posts: 41
Send a message via MSN to furqankamani
furqankamani
Offline
Registered User
thanks for ur reply, but what the use of "SetDeviceStatus()".
Reply With Quote

#6 Old Re: Problem in Disable GPS module on N95? - 2008-02-13, 09:28

Join Date: Sep 2004
Posts: 7,953
Location: Tampere, Finland
ltomuta's Avatar
ltomuta
Online
Forum Nokia Expert
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)
but there is no such method.
Reply With Quote
Reply « Previous Thread | Next Thread »
Display Modes
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules

You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump
Similar Threads
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

Rate This

 
Bookmark this page: DeliciousDiggFacebookGoogleYahooStumbleUponRedditDiigoTechnocratiTwitter  Share this page Share this page Print this Page Print this page Invite a friend Invite a friend
京ICP备05048969号    Email Newsletters Press Terms & Conditions Privacy Policy Sitemap Contact Us © 2009 Nokia 
RDF Facets: qdcZidentifierQSxhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomhttpE3aE2fE2fdiscussionE2eforumE2enokiaE2ecomE2fforumE2fshowthreadE2ephpE3ftE3d162470X qdcZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qdcZtypeQUqfntypeZCommunityContentQ qdcZtypeQUqfntypeZE44iscussionQ qdcZtypeQUqfntypeZE44iscussionContentQ qdcZtypeQUqfntypeZE52esourceQ qdcZtypeQUqfntypeZWebpageQ qdcZtypeQUqmarsZManagedE52esourceQ qdcZtypeQUqwebZInformationE52esourceQ qdcZtypeQUqwebZPageQ qdcZtypeQUqwebZE52esourceQ qdcZtypeQUqrdfsZE52esourceQ qfnZtopicQUqfnTopicZlocationQ qfnZtypeQUqfntypeZCommunityContentQ qfnZtypeQUqfntypeZE44iscussionQ qfnZtypeQUqfntypeZE44iscussionContentQ qfnZtypeQUqfntypeZE52esourceQ qfnZtypeQUqfntypeZWebpageQ qfnZuserE5ftagQSxlocationE2dbasedE2dservicesX qmarsZlanguageQUxhttpE3aE2fE2fswE2enokiaE2ecomE2flanguageE2d1E2fenX qrdfZtypeQUqfnZE45E78cludedFromGeneralE4cistingsQ qrdfZtypeQUqfntypeZCommunityContentQ qrdfZtypeQUqfntypeZE44iscussionQ qrdfZtypeQUqfntypeZE44iscussionContentQ qrdfZtypeQUqfntypeZE52esourceQ qrdfZtypeQUqfntypeZWebpageQ qrdfZtypeQUqmarsZManagedE52esourceQ qrdfZtypeQUqwebZInformationE52esourceQ qrdfZtypeQUqwebZPageQ qrdfZtypeQUqwebZE52esourceQ qrdfZtypeQUqrdfsZE52esourceQ