×

Discussion Board

Results 1 to 2 of 2
  1. #1
    Registered User
    Join Date
    Nov 2011
    Posts
    66

    How to get gps value in correct periodic interval

    Hi nokia forum,
    I am now get gps (latitude and longitute) values . now i want update the , getting location fixes in a periodic intervals. that is, once in 10 mins.

    I am use the setLocationListener(listener,600,-1,-1);

    But, some time it give output in different time(1 min once or 20 sec once ). sometime only it give correct periodic time(10 min once).
    i need to get gps in correct periodic interval(only 10 min once).

    How to i get it?
    Please anyone guide me?

  2. #2
    Nokia Developer Champion
    Join Date
    Feb 2009
    Location
    Noida, India
    Posts
    3,073

    Re: How to get gps value in correct periodic interval

    Quote Originally Posted by DileepKumar View Post
    Hi nokia forum,
    I am now get gps (latitude and longitute) values . now i want update the , getting location fixes in a periodic intervals. that is, once in 10 mins.

    I am use the setLocationListener(listener,600,-1,-1);

    But, some time it give output in different time(1 min once or 20 sec once ). sometime only it give correct periodic time(10 min once).
    i need to get gps in correct periodic interval(only 10 min once).

    How to i get it?
    Please anyone guide me?
    As per the API document :

    When the listener is registered with a LocationProvider with some update period, the implementation shall attempt to provide updates at the defined interval. If it isn't possible to determine the location, e.g. because of the LocationProvider being TEMPORARILY_UNAVAILABLE or OUT_OF_SERVICE or because the update period is too frequent for the location method to provide updates, the implementation can send an update to the listener that contains an 'invalid' Location instance.

    The implementation shall use best effort to post the location updates at the specified interval, but this timing is not guaranteed to be very exact (i.e. this is not an exact timer facility for an application).

    The application is responsible for any possible synchronization needed in the listener methods.


    Hence you can keep a track of last time when you consumed a location changed event and ignore all others till it does not cross your required time interval of 10min.
    thanks,
    ~Amitabh
    (Champion of the Month -Aug'13)
    Follow me on my blog for Innovative Mobile Apps

Similar Threads

  1. Need help with periodic objects
    By gigglie in forum Symbian C++
    Replies: 4
    Last Post: 2008-09-15, 09:10
  2. periodic http connetion
    By perthachy in forum Python
    Replies: 2
    Last Post: 2007-07-16, 07:51
  3. Periodic freezes of Carbide 1.1 pro
    By essoess5705 in forum Carbide.c++ IDE and plug-ins (Closed)
    Replies: 0
    Last Post: 2006-10-19, 11:32
  4. stoping periodic timer
    By plmanikandan in forum Symbian Tools & SDKs
    Replies: 1
    Last Post: 2005-02-12, 20:32
  5. About the periodic timer interval in Graphics example
    By ThreeSixFiveOh in forum Symbian C++
    Replies: 0
    Last Post: 2003-11-17, 12:24

Posting Permissions

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