×

Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    6110 Navigator and JSR179

    Hi there.
    I'm doing some testings on Location API with this phone.
    I'm facing a strange situation. My midlet shows a simple compass, and actual position information.

    However, after a while the satellite icon that the phone shows when he is accessing the GPS, dissappears.

    No exception seems to be thrown at all. The icon just dissapears, and no provider state changed is notified...

    Anyone had any similar experience with this phone or N95 for example? Or maybe some idea of why Satellite icon may dissapear? Any help or idea would be appreciated.

    Regards

  2. #2
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    Re: 6110 Navigator and JSR179

    That's the inicialization code:

    private void startJSR179() {
    Criteria c = new Criteria();
    c.setSpeedAndCourseRequired(true);
    c.setCostAllowed(false);
    LocationProvider locp=null;
    try {
    locp = LocationProvider.getInstance(c);

    if(locp ==null) {
    Alert a = new Alert("warning", "No location methods meet that criteria",null, AlertType.WARNING);
    this.pantalla.setCurrent(a);
    } else {
    locp.setLocationListener(this, -1, -1, -1);
    }
    } catch (Exception e) {
    Alert a = new Alert("startjsr179", e.toString(),null, AlertType.WARNING);
    this.pantalla.setCurrent(a);
    }

    }


    Does anyone sees any problem or bad inicialization? It seems that midlet runs ok as long as no positions are obtained from GPS. but then, after some true positions the satellite icon on the phone dissapears

  3. #3
    Registered User
    Join Date
    Jul 2005
    Posts
    43

    Re: 6110 Navigator and JSR179

    Well nobody reponded but finally I've found the problem. Anyway, let's put the answer in case it may help somebody sometime in the future

    As usual, it was a small stupid bug
    I was creating a LocationProvider as a method variable not as a class member.
    So when the function ended, the variable goes out of scope, and then after some time-out internal rules, I must suppose that the system shuts down the hardware.

    So, problem solved

Posting Permissions

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