GeolocatorPlugin icon indicating copy to clipboard operation
GeolocatorPlugin copied to clipboard

Notes for Android Q

Open chrisfoulds opened this issue 5 years ago • 0 comments

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.

chrisfoulds avatar Nov 12 '19 10:11 chrisfoulds