Discussion Board

Results 1 to 2 of 2

Thread: Timer ro GPS

  1. #1
    Registered User
    Join Date
    Jul 2011

    Timer ro GPS

    hello ,
    iam beginner in symbian , want to ask about how can get GPS every specific time , iam try to do this (important code from class only)

    this to get GPS

    TBool CGpsPositionRequest::GetCurrentPostionL(TReal& aLatitude, TReal& aLongitude)
    // cancel previous request (just in case)
    // request current location
    iPositioner.NotifyPositionUpdate(iPositionInfo, iStatus);
    // start wait note and wait for request end
    // ShowWaitNoteL();
    // process result
    if (iError == KErrNone)
    // success, return given position
    TPosition pos;
    aLatitude = pos.Latitude();
    aLongitude = pos.Longitude();
    return ETrue;
    // fail
    return EFalse;


    and this function to wait 2 hour

    void ControlPos::WaitThisTime()
    RTimer iTimer;
    TRequestStatus iSocketStatus;
    TRequestStatus iTimeOut;
    TTime CurrentLocalTime;
    TTime tt;
    TTimeIntervalHours hour=2;
    User::WaitForRequest(iSocketStatus, iTimeOut);
    question here if i use while loop to get GPS every 2 hour will work good without stop another task which application do it until this time end or what can i do to solve this prb ?

    while ()
    //call WaitThisTime()
    //call GetCurrentPostionL(TReal& aLatitude, TReal& aLongitude)

    thnx for reply

  2. #2
    Nokia Developer Champion
    Join Date
    Dec 2008

    Re: Timer ro GPS

    did you actually tried this method, cause if you use while() loop it will keep on calling WaitThisTime() and will keep on increasing the time here iTimer.At(iTimeOut,tt);, i am curious to know the timer will expire. please correct me if I am wrong.
    Last edited by somnathbanik; 2011-07-15 at 06:29. Reason: added

Similar Threads

  1. How ro read the list of files in a folder
    By jameskittu in forum Symbian
    Replies: 4
    Last Post: 2010-05-19, 07:09
  2. Replies: 3
    Last Post: 2009-09-24, 10:34
  3. How ro provide call transfer in VoIP
    By raj_rr7 in forum VoIP
    Replies: 1
    Last Post: 2008-06-28, 17:23
  4. RaceChrono - GPS lap timer for Series 60
    By alammi in forum News and Announcements
    Replies: 0
    Last Post: 2007-07-23, 11:07
  5. is it possible ro download a midlet using GPRS
    By ferozekadamapuzha in forum Mobile Java General
    Replies: 2
    Last Post: 2003-05-20, 09:21

Posting Permissions

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