protected synchronized void stopGps() { if (!isGettingGps) return; Logger.log(Logger.INFO, this.getClass().getName(), "GpsRecorderImpl: stopGps"); if (TnLocationManager.getInstance() != null) TnLocationManager.getInstance().reset(provider); isGettingGps = false; }
protected synchronized void startGps() { if (isGettingGps) return; Logger.log(Logger.INFO, this.getClass().getName(), "GpsRecorderImpl: startGps"); if (TnLocationManager.getInstance() != null) TnLocationManager.getInstance().requestLocationUpdates(provider, 0, 0, 60000, 0, this); isGettingGps = true; }
public void initLocation() { if (TnLocationManager.getInstance() == null) { TnLocationManager.init( new AndroidLocationManager(AndroidPersistentContext.getInstance().getContext())); } }