mirror of
https://codeberg.org/OpenTracksApp/OpenTracks.git
synced 2026-09-30 16:52:21 +02:00
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:
@@ -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
|
||||
|
||||
|
||||
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user