diff --git a/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesService.java b/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesService.java index cb82f82..c9a2fe1 100644 --- a/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesService.java +++ b/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesService.java @@ -107,9 +107,9 @@ public class LocationUpdatesService extends Service { Log.i(TAG, "Requesting location updates. Every " + requestInterval + "ms with priority of " + priority); mLocationRequest.setPriority(priority); mLocationRequest.setInterval(requestInterval); - if (priority == 102 && requestInterval > 60000) { + /*if (priority == 102 && requestInterval > 60000) { mLocationRequest.setFastestInterval(30000); - } + }*/ startForeground(LocationUtils.SERVICE_NOTIFICATION_ID, LocationUtils.getNotification(this, null, LocationUtils.SERVICE_NOTIFICATION_CHANNEL_ID)); try { mFusedLocationClient.requestLocationUpdates(mLocationRequest, diff --git a/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesWorker.java b/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesWorker.java index e69c930..04f3bec 100644 --- a/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesWorker.java +++ b/android/app/src/main/java/com/keyboardcrumbs/hassclient/LocationUpdatesWorker.java @@ -102,9 +102,9 @@ public class LocationUpdatesWorker extends ListenableWorker { int accuracy = LocationUtils.getLocationUpdatesPriority(getApplicationContext()); locationRequest.setPriority(accuracy); locationRequest.setInterval(5000); - if (accuracy == 102) { + /*if (accuracy == 102) { locationRequest.setFastestInterval(1000); - } + }*/ try { fusedLocationClient.requestLocationUpdates(locationRequest, callback, Looper.myLooper());