title: setLocationListener not working in Blackberry gps programming
body: <p>I am working on gps based application. I am using LocationProvider and calling setlocationListener through it  code is like</p>
  
  <hr>
  
  <pre><code>   LocationProvider lp = LocationProvider.getInstance(null);
          if (lp != null) {
              lp.setLocationListener(new LocationListenerImpl(), 2, 1, 1);
          } else {
              Dialog.alert("GPS NOT SUPPORTED!");
              retval = false;
          }
      } catch (LocationException e) {
          System.out.println("GPS Error: " + e.toString());
      }
  
      return retval;
  }
  
  private class LocationListenerImpl implements LocationListener {
      public void locationUpdated(LocationProvider provider, Location location) {
          if (location.isValid()) {
              heading = location.getCourse();
              longitude = location.getQualifiedCoordinates().getLongitude();
              latitude = location.getQualifiedCoordinates().getLatitude();
              altitude = location.getQualifiedCoordinates().getAltitude();
              speed = location.getSpeed();
              System.out.println("Current latitude:"+latitude);
              System.out.println("Current longitude:"+longitude);
              System.out.println("Current speed:"+speed);
  
              // This is to get the Number of Satellites
              String NMEA_MIME = "application/X-jsr179-location-nmea";
              satCountStr = location.getExtraInfo("satellites");
              if (satCountStr == null) {
                  satCountStr = location.getExtraInfo(NMEA_MIME);
              }
  
              // this is to get the accuracy of the GPS Cords
              QualifiedCoordinates qc = location.getQualifiedCoordinates();
              accuracy = qc.getHorizontalAccuracy();
          }
      }
  </code></pre>
  
  <hr>
  
  <p>it doesnt give an error but dont even work out so help with the same.the control dont get transferred to LocationListenerImpl()...
  I am using BlackBerry_JDE_PluginFull_1.0.0.67 with eclipse-java-galileo-SR1-win32 on Blackberry 8800 simulator..
  Any assistence is grately appreciated....
  Thanking you in advance.</p>