Exemplo n.º 1
0
  public void startGPS() {
    if (locationProvider == null) {
      createLocationProvider();

      Thread locationThread =
          new Thread() {
            public void run() {
              createLocationListener();
            }
          };
      locationThread.start();
    }
  }
Exemplo n.º 2
0
  public void locationUpdated(LocationProvider provider, final Location location) {
    // get new location from locationProvider

    try {
      Thread getLocationThread =
          new Thread() {
            public void run() {
              sendLocationToWebsite(location);
            }
          };

      getLocationThread.start();
    } catch (Exception e) {
      midlet.log("GPS.locationUpdated: " + e);
    }
  }