Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions .changes/geolocation-android-timeout.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
geolocation: patch
geolocation-js: patch
---

On Android, use the `timeout` value for `setMinUpdateIntervalMillis`, `setMaxUpdateDelayMillis` and `setIntervalMillis` instead of just `minUpdateInterval`.
4 changes: 2 additions & 2 deletions plugins/geolocation/android/src/main/java/Geolocation.kt
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,9 @@ public class Geolocation(private val context: Context) {
val lowPrio = if (networkEnabled) Priority.PRIORITY_BALANCED_POWER_ACCURACY else Priority.PRIORITY_LOW_POWER
val prio = if (enableHighAccuracy) Priority.PRIORITY_HIGH_ACCURACY else lowPrio

val locationRequest = LocationRequest.Builder(10000)
val locationRequest = LocationRequest.Builder(timeout)
.setMaxUpdateDelayMillis(timeout)
.setMinUpdateIntervalMillis(5000)
.setMinUpdateIntervalMillis(timeout)
.setPriority(prio)
.build()

Expand Down