Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User kbelcon's Avatar
    Join Date
    Feb 2009
    Posts
    7
    Hi, I am currently retrieving coordinates from the GPS and storing the value in a global variable called GLOBAL_QC. After the coordinates are stored I set the Location Listener for the Provider. However when the location has been updated it changes the value of my global variable to the new coordinates even though I did not say to do so. Only one function call is made to the method in which i set the global variable.

    // 1. Retrieving coordinates and setting it to a variable GLOBAL_QC
    --------------------------------------------------------------------
    try{
    location = locProvider.getLocation(-1);
    if(location.isValid())
    {
    GLOBAL_QC = location.getQualifiedCoordinates();
    }
    locProvider.setLocationListener(new LocationListenerImpl(),1, 1, 1);

    }catch(Exception e){
    e.printStackTrace();
    }

    //2. Location Updated method does nothing
    -----------------------------------------------------------------
    private class LocationListenerImpl implements LocationListener
    {
    public void locationUpdated(LocationProvider provider, Location location)
    {}
    }

  2. #2
    Registered User kbelcon's Avatar
    Join Date
    Feb 2009
    Posts
    7
    Anyone. Please help?

  3. #3
    Super Contributor mahbub_s60's Avatar
    Join Date
    Mar 2008
    Posts
    1,481
    Hi,

    If I have understood your question clearly, the answer is yes. Once you start listening location you get update.

Similar Threads

  1. Getting the location of a Nokia Series 60, N80 phone
    By xgamerx in forum Mobile Java General
    Replies: 12
    Last Post: 2008-02-15, 05:01
  2. Location Provider API?
    By oasisfeng in forum Geolocation and Navigation
    Replies: 1
    Last Post: 2007-11-21, 21:43
  3. where is python location on mobile phone
    By lb213_2000 in forum Python
    Replies: 1
    Last Post: 2007-11-05, 08:56
  4. questions about location
    By will8552 in forum Symbian
    Replies: 4
    Last Post: 2006-11-06, 11:37
  5. Location to select Network Provider
    By jose_79 in forum Mobile Java Networking & Messaging & Security
    Replies: 0
    Last Post: 2006-04-27, 12:15

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Nokia Developer aims to help you create apps and publish them so you can connect with users around the world.

京ICP备05048969号  © Copyright Nokia 2013 All rights reserved