×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Regular Contributor
    Join Date
    Feb 2009
    Posts
    188

    find GPS location every after 5 minites

    hi..

    I want to find GPS latitude and longitude every after 5 minites. i am referring following example

    http://wiki.forum.nokia.com/index.ph...60_3rd_Edition
    http://wiki.forum.nokia.com/index.ph...Api_in_Symbian

    HTML Code:
    void CGpsPositionRequest::ConstructL(const TDesC& aAppName)
    	{
    	iAppName = aAppName.AllocL();
    	// connect to location server
    	User::LeaveIfError(iLocationServer.Connect());
    	// open positioner
    	User::LeaveIfError(iPositioner.Open(iLocationServer));
    	// set our application as location requestor
    	User::LeaveIfError(iPositioner.SetRequestor(
    	CRequestor::ERequestorService, CRequestor::EFormatApplication, *iAppName));
    	// set maximum allowed time for a location request
    	TTimeIntervalMicroSeconds timeOut(30000000); // 30 sec
    	TPositionUpdateOptions updateOptions;
    	updateOptions.SetUpdateTimeOut(timeOut);
    	User::LeaveIfError(iPositioner.SetUpdateOptions(updateOptions));
    	}
    
    void CGpsPositionRequest::FetchCurrentPostionL()
    	{
    	// cancel previous request (just in case)
    	Cancel();
    	SetActive();
    	}
    
    void CGpsPositionRequest::RunL()
    	{
    	// request ended, store error code
    	iError = iStatus.Int();
    
    	// process result
    	if (iError == KErrNone)
    		{
    		
    		//////display result---successfully received
    		--
    		-- 
    		}
    	} 
    so i have to wait wait 5 minites in the RunL() then i have to call FetchCurrentPostionL(). how can i wait ?

    void CGpsPositionRequest::RunL()
    {
    // request ended, store error code
    iError = iStatus.Int();

    // process result
    if (iError == KErrNone)
    {

    //////display result---successfully received
    --
    --
    wait 5 mins
    FetchCurrentPostionL();

    }
    }

  2. #2
    Super Contributor
    Join Date
    Mar 2004
    Location
    Singapore
    Posts
    9,968

    Re: find GPS location every after 5 minites

    Check timer example in wiki.

Similar Threads

  1. find gps location in console application
    By kuddy_abc in forum Symbian Networking & Messaging (Closed)
    Replies: 9
    Last Post: 2010-07-28, 09:45
  2. Replies: 3
    Last Post: 2010-07-24, 15:03
  3. Replies: 8
    Last Post: 2009-11-12, 10:28
  4. Replies: 0
    Last Post: 2007-09-17, 14:26
  5. Find the location of your mobile phone without GPS??
    By Priju Jacob Paul in forum Symbian C++
    Replies: 2
    Last Post: 2006-11-18, 22:57

Posting Permissions

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