mirror of
https://github.com/meshtastic/Meshtastic-Android.git
synced 2026-03-29 03:03:05 -04:00
refactor: change FusedLocationProvider interval to 30s
This commit is contained in:
@@ -36,13 +36,13 @@ class SharedLocationManager constructor(
|
||||
private val _receivingLocationUpdates: MutableStateFlow<Boolean> = MutableStateFlow(false)
|
||||
val receivingLocationUpdates: StateFlow<Boolean> get() = _receivingLocationUpdates
|
||||
|
||||
private val desiredInterval = 1 * 60 * 1000L
|
||||
private val desiredInterval = 30 * 1000L // 30 seconds
|
||||
|
||||
// Set up the Fused Location Provider and LocationRequest
|
||||
private val fusedLocationClient = LocationServices.getFusedLocationProviderClient(context)
|
||||
private val locationRequest = LocationRequest.Builder(desiredInterval)
|
||||
.setMinUpdateIntervalMillis(30 * 1000L)
|
||||
.setMaxUpdateDelayMillis(5 * 60 * 1000L)
|
||||
// .setMinUpdateIntervalMillis(10 * 1000L)
|
||||
// .setMaxUpdateDelayMillis(5 * 60 * 1000L)
|
||||
// .setMinUpdateDistanceMeters(30f) // 30 meters
|
||||
.setPriority(Priority.PRIORITY_BALANCED_POWER_ACCURACY)
|
||||
.build()
|
||||
|
||||
Reference in New Issue
Block a user