Skip to content

Updates afp with manifest permission. #1706

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
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
4 changes: 4 additions & 0 deletions geolocator/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
## 14.0.1

- Fixes PlatformException in example app for Android 14 (API level 34) versions and newer by updating manifest permissions.

## 14.0.0

- **BREAKING CHANGE:** for Flutter `3.27.0` and below. Make sure you'll upgrade Flutter to `3.29.0` or above before using this version.
Expand Down
7 changes: 7 additions & 0 deletions geolocator/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ Starting from Android 10 you need to add the `ACCESS_BACKGROUND_LOCATION` permis
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
```

Starting from Android 14 SDK 34 you need to add the `FOREGROUND_SERVICE_LOCATION` permission (next to the `ACCESS_COARSE_LOCATION` or the `ACCESS_FINE_LOCATION` or the `ACCESS_BACKGROUND_LOCATION` permission) if you want to continue receiving updates even when your App is running in the foreground:
[FOREGROUND_SERVICE_LOCATION](https://developer.android.com/reference/android/Manifest.permission#FOREGROUND_SERVICE_LOCATION)

``` xml
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION"
```

> **NOTE:** Specifying the `ACCESS_COARSE_LOCATION` permission results in location updates with an accuracy approximately equivalent to a city block. It might take a long time (minutes) before you will get your first locations fix as `ACCESS_COARSE_LOCATION` will only use the network services to calculate the position of the device. More information can be found [here](https://developer.android.com/training/location/retrieve-current#permissions).


Expand Down
2 changes: 2 additions & 0 deletions geolocator/example/android/app/src/main/AndroidManifest.xml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@

<!-- Permissions options for the `location` group -->
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.FOREGROUND_SERVICE_LOCATION" />

<application
android:name="${applicationName}"
Expand Down
4 changes: 2 additions & 2 deletions geolocator_android/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
## 5.0.1+1
## NEXT

- Bump `androidx.core:core` to version 1.16.0
- Bump `androidx.core:core` to version 1.15.0

## 5.0.1

Expand Down
2 changes: 1 addition & 1 deletion geolocator_android/android/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ android {

dependencies {
implementation 'com.google.android.gms:play-services-location:21.2.0'
implementation 'androidx.core:core:1.16.0'
implementation 'androidx.core:core:1.15.0'

testImplementation 'junit:junit:4.13.2'
testImplementation 'org.mockito:mockito-core:5.1.1'
Expand Down
2 changes: 1 addition & 1 deletion geolocator_android/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: geolocator_android
description: Geolocation plugin for Flutter. This plugin provides the Android implementation for the geolocator.
repository: https://github.com/baseflow/flutter-geolocator/tree/main/geolocator_android
issue_tracker: https://github.com/baseflow/flutter-geolocator/issues?q=is%3Aissue+is%3Aopen
version: 5.0.1+1
version: 5.0.1

environment:
sdk: ^3.5.0
Expand Down