flutterlocation
flutterlocation copied to clipboard
Added ability to skip checking access background permission in android
We don't need ACCESS_BACKGROUND_LOCATION permission for most cases (so user can use location tracking without enabling location permission all the time). Application can continue to get location in background mode when location service is started in app:
flutterlocation library works perfectly without ACCESS_BACKGROUND_LOCATION if we skip permission checks in enableBackgroundMode method. In this PR we added a boolean parameter checkBackgroundPermissions. If it is false then permission check is skipped.
@bartekpacia This is very important PR. This plugin with required ACCESS_BACKGROUND_LOCATION permissions is useless in most cases. If this solution is wrong, you need to find another way to solve this problem.