kopia lustrzana https://github.com/ge0rg/aprsdroid
require update_distance AND update_interval to be fulfilled
The Android API allows to specify a distance and a time interval, after which the app will be notified. Now, the check in APRSdroid is matched to this behaviour and the documentation.remotes/nogy/update_90
rodzic
05a4162136
commit
753034a26b
|
|
@ -113,8 +113,8 @@ class AprsService extends Service with LocationListener {
|
|||
val upd_int = prefs.getString("interval", "10").toInt * 60000
|
||||
val upd_dist = prefs.getString("distance", "10").toInt * 1000
|
||||
if (lastLoc != null &&
|
||||
location.getTime - lastLoc.getTime < upd_int &&
|
||||
location.distanceTo(lastLoc) < upd_dist) {
|
||||
(location.getTime - lastLoc.getTime < upd_int ||
|
||||
location.distanceTo(lastLoc) < upd_dist)) {
|
||||
Log.d(TAG, "onLocationChanged: ignoring premature location")
|
||||
return
|
||||
}
|
||||
|
|
|
|||
Ładowanie…
Reference in New Issue