Fix: GPS Access denied when phone in standby

Added ACCESS_BACKGROUND_LOCATION permission to access GPS while phone is in standby. This is necessary for situations where the PublicAPI is triggered to start a record from an external device like a smartwatch.
This commit is contained in:
v_schaefer
2023-08-08 10:35:13 +02:00
committed by Dennis Guse
parent c4235b1961
commit 3910837d1a
3 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -94,8 +94,9 @@ OpenTracks can be used with [Gadgetbridge](https://www.gadgetbridge.org/):
* __No in-app analytics__
* __No use of Google Play Services__
__Only required permission:__
__Only required permissions:__
* _ACCESS_FINE_LOCATION_: required to use the GPS.
* _ACCESS_BACKGROUND_LOCATION_: required to start recording with GPS while phone is in standby. (e.g. when triggered by Public API from an external device)
### Public API
+1
View File
@@ -46,6 +46,7 @@ limitations under the License.
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
<uses-permission android:name="android.permission.VIBRATE" />
<uses-permission android:name="android.permission.WAKE_LOCK" />
@@ -57,7 +57,7 @@ public class PermissionRequester {
locationPermissionRequest.launch(permissions.toArray(permissions.toArray(new String[0])));
}
private static final List<String> GPS_PERMISSION = List.of(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION);
private static final List<String> GPS_PERMISSION = List.of(Manifest.permission.ACCESS_FINE_LOCATION, Manifest.permission.ACCESS_BACKGROUND_LOCATION, Manifest.permission.ACCESS_COARSE_LOCATION);
private static final List<String> BLUETOOTH_PERMISSIONS;