Skip to content

Commit

Permalink
Update BgLocationAccessScreen interval
Browse files Browse the repository at this point in the history
Fixes: #90
  • Loading branch information
marcelpinto authored Sep 11, 2023
1 parent b7bbd79 commit f9b2e6f
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ private fun BackgroundLocationControls() {
val enqueued = workerState?.find { !it.state.isFinished } != null
if (enqueued) {
ControlsState(
text = "Check the logcat for location updates every 2 min",
text = "Check the logcat for location updates every 15 min",
action = "Disable updates",
onClick = {
workManager.cancelUniqueWork(BgLocationWorker.workName)
Expand All @@ -95,12 +95,12 @@ private fun BackgroundLocationControls() {
text = "Enable location updates and bring the app in the background.",
action = "Enable updates",
onClick = {
// Schedule a periodic worker to check for location every 2 min
// Schedule a periodic worker to check for location every 15 min
workManager.enqueueUniquePeriodicWork(
BgLocationWorker.workName,
ExistingPeriodicWorkPolicy.KEEP,
PeriodicWorkRequestBuilder<BgLocationWorker>(
2,
15,
TimeUnit.MINUTES,
).build(),
)
Expand Down

0 comments on commit f9b2e6f

Please sign in to comment.