GeolocatorPlugin
GeolocatorPlugin copied to clipboard
Notes for Android Q
Not a bug, but an information piece that probably needs to go in the docs. On Android Q the way apps requesting location updates when not in the foreground has changed and without making changes even if you are using a foreground service your app will ask to monitor location updates always, which users will reject as you have no good reason to do so. It's all listed here : https://developer.android.com/about/versions/10/privacy/changes
But basically it is switch to using SDK29 as target and update your service such as this. Foreground services in Q+ require type <service android:name=".MyAwesomeService" android:enabled="true" android:exported="true" android:foregroundServiceType="location" />
Note the foregroundservicetype is the change.