Remove ACCESS_COARSE_LOCATION permission #1949
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description
One Line Summary
Removes ACCESS_COARSE_LOCATION from the location module
Details
Motivation
Fixes
This change was made to avoid the location permission requirement for those who use the com.onesignal:OneSignal package like our wrapper SDKs and do not use location with OneSignal.
Scope
Requires developers to add ACCESS_COARSE_LOCATION to their AndroidManifest themselves if they would like to use OneSignal location. This change reverts back to the player model behaviour.
Testing
Manual testing
Tested calling location request permission with location sharing on, app build with Android Studio 2022.1.1 of the OneSignal example app on an emulated Pixel 4 with Android 12.
Calling OneSignal.Location.requestPermission() without ACCESS_COARSE_LOCATION(or other location permissions) logs and does not crash the app.
Affected code checklist
Checklist
Overview
Testing
Final pass
This change is