public void startGPS() { if (locationProvider == null) { createLocationProvider(); Thread locationThread = new Thread() { public void run() { createLocationListener(); } }; locationThread.start(); } }
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); } }