Discussion Board

Results 1 to 2 of 2

Thread: GPS slow start

  1. #1
    Registered User
    Join Date
    Mar 2010

    GPS slow start


    I'm developing my first WRT widget and I need location information from the GPS. I used code (see below) from the sample RouteWidget and it basically works. The problem is that the user has to wait a long time for the GPS fix. I'm testing on a 5800 and to get the GPS up and running quickly I have to start another GPS based app, e.g. Nokia Maps. What might be the difference here, why does Maps get a fast fix from the GPS receiver and my widget does not?

    var locCriteria = null;
    var locDataTimer = null;
    function startLocation(){
        try {
            serviceObj = device.getServiceObject("Service.Location", "ILocation");
        } catch (ex) {
            alert("Service object cannot be found.");
        // The user cancelled the service object initialization
        if (serviceObj.ILocation == null) {
        // Specify that location information need not be guaranteed. This helps in
        // that the widget doesn't need to wait for that information possibly
        // indefinitely.
        var updateOptions = new Object();
        updateOptions.PartialUpdates = true;
        // Initialize the criteria for the GetLocation call
        locCriteria = new Object();
        locCriteria.LocationInformationClass = "GenericLocationInfo";
        locCriteria.Updateoptions = updateOptions;
        // Set the timer to tick (update the location data) at one second intervals
        locDataTimer = setInterval("tick()", 1000);
    // Called when the locDataTimer's interval elapses
    function tick() {
        try {
            var result = serviceObj.ILocation.GetLocation(locCriteria);
        } catch (ex) {

  2. #2
    Nokia Developer Expert
    Join Date
    Mar 2003

    Re: GPS slow start

    Normally it will take about 4-5 secs to get satellite GPS information. When you call GetLocation, it will be a one shot to turn on the GPS to get information then turn it off (safe energy)

    The loop you set is just 1 sec and the worse is that it is called repeatedly.

    If you need the location information updated continuously (like the Maps), it would suggest to call the Trace method and control the update interval accordingly. This will keep the GPS on until you call CancelNotification() or destroy the object.

    + Phong Vu

Similar Threads

  1. GPS Listener - different behavior in emulator
    By neil.young in forum Symbian
    Replies: 4
    Last Post: 2009-12-15, 08:59
  2. Slow script start - what options do I have?
    By neil.young in forum Symbian
    Replies: 2
    Last Post: 2007-08-20, 10:59
  3. N73 firmware with BT GPS.
    By tonyhabayeb in forum Bluetooth Technology
    Replies: 2
    Last Post: 2007-08-19, 07:58
  4. Midlet start very slow
    By mengqb in forum Mobile Java General
    Replies: 6
    Last Post: 2004-09-14, 16:52

Posting Permissions

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