×

Discussion Board

Results 1 to 6 of 6
  1. #1
    Registered User
    Join Date
    Mar 2013
    Posts
    14

    location updating problem

    i am developing an application in which i need to send the co -ordinate of application to our server, i set the update interval as 60 second, but i am getting the co ordinate at 2 to 5 second sometime twice in 1 second. so help me. my application in j2me

  2. #2
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: location updating problem

    please note that we have different sections here for different technologies, thus I moved this query to here from the general feedback section. In future, please follow the categories and subcategories and try posting in most appropriate place for your query.

    And then to the question, How exactly are you telling to use the 60 seconds internal ?

  3. #3
    Registered User
    Join Date
    Mar 2013
    Posts
    14

    Re: location updating problem

    sorry sir from next time i will surely do what you said, i m passing 60 as a parameter to Location l = lp.getLocation(60) method

  4. #4
    Super Contributor
    Join Date
    Jun 2003
    Location
    Cheshire, UK
    Posts
    7,395

    Re: location updating problem

    The parameter to getLocation() is the timeout... it's the longest it will wait before giving you a location, not the shortest.

    If you want locations at a specific interval, you might be better to use a LocationListener. See LocationProvider.setLocationListener().

    Graham.

  5. #5
    Nokia Developer Moderator
    Join Date
    Mar 2003
    Location
    Lempäälä/Finland
    Posts
    29,165

    Re: location updating problem

    Also if the timeout is for sending the data to the server, you would not need to sent the data every time you get the location, instead you could use separate timer for the sending process, and simply use the last gotten location. Of course you might want to also check whether you got new locations during the sending delay.

  6. #6
    Super Contributor
    Join Date
    Apr 2007
    Posts
    2,708

    Re: location updating problem

    simply save the location you receive in locationupdated() into a variable, then have a thread (which is a must anyways whenever you want to do any networking) which picks up this variable (which is updated to the latest known position) and sends its data to the server...
    Note: please don't send private questions to me, as I don't have time to provide private support. All such questions should be posted on public forums, where I and others can see and answer them.

Similar Threads

  1. [moved] help please, problem when updating my N8
    By razan.mohty in forum General Development Questions
    Replies: 1
    Last Post: 2011-12-23, 06:58
  2. LocationListener Interface OR loop with Thread.sleep for updating device location?
    By roryoflynn1@gmail.com in forum Mobile Java Networking & Messaging & Security
    Replies: 2
    Last Post: 2010-07-28, 12:43
  3. updating help file problem
    By the_king2008 in forum Symbian
    Replies: 1
    Last Post: 2009-05-21, 10:37
  4. Problem updating .mmp using .Net IDE
    By rushj in forum Symbian Tools & SDKs
    Replies: 2
    Last Post: 2005-08-18, 11:13

Posting Permissions

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