fix multiple poster starts

storage_ts_index
Georg Lukas 2011-04-12 15:47:22 +02:00
rodzic 7e6d95f723
commit dfc3d75cb5
1 zmienionych plików z 6 dodań i 3 usunięć

Wyświetl plik

@ -100,10 +100,11 @@ class AprsService extends Service with LocationListener {
} else
showToast(getString(R.string.service_start).format(upd_int, upd_dist))
running = true
// the poster needs to be running before location updates come in
startPoster()
if (!running) {
running = true
startPoster()
}
// continuous GPS tracking for single shot mode
requestLocations(singleShot)
@ -114,6 +115,8 @@ class AprsService extends Service with LocationListener {
}
def startPoster() {
if (poster != null)
poster.stop()
poster = AprsIsUploader.instanciateUploader(this, prefs)
poster.start()
}