Skip to content
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

[question]: How to remove Android Permission Location from Android Manifest? #1875

Closed
1 task done
herotha opened this issue Oct 19, 2023 · 6 comments
Closed
1 task done

Comments

@herotha
Copy link

herotha commented Oct 19, 2023

How can we help?

When I submit to Play Store, I just noticed my app has extra Android android.permission.ACCESS_COARSE_LOCATION.
Is there anyway to omit that permission from my App Manifest?
I just upgraded OneSignal SDK to version 5.0.3. And I don't want my user know I have this permission inside my app.

Screenshot 2023-10-19 191254

Code of Conduct

  • I agree to follow this project's Code of Conduct
@jennantilla
Copy link
Contributor

Hi @herotha thanks for reaching out!

Did you previously have location sharing enabled?

Adding android.permission.ACCESS_COARSE_LOCATION is part of the location sharing setup but this is not required to use the OneSignal SDK. If you don't want to track location, you can remove this, although I am unsure if any other SDKs or libraries in your app may need it.

Thanks for the additional information!

@herotha
Copy link
Author

herotha commented Oct 19, 2023

Hello @jennantilla

No, I don't enable location sharing in my project.

I just updated OneSiginal SDK from 4.X.X to 5.0.3 and my project got this extra android.permission.ACCESS_COARSE_LOCATION in Android manifest.

When I checked on the merged manifest, I found out that OneSignal library has this permission (screenshot).
Screenshot 2023-10-20 061846
Screenshot 2023-10-20 061929

My current project's scope needs only OneSignal Push Notification Service. Other services, for example, SMS, email, location sharing ... so on, are not in my project scope yet.
So, can I remove that location permission from my Android manifest project? Because it is against my current project user's privacy and policy, which app does not use location permission.

@herotha
Copy link
Author

herotha commented Oct 19, 2023

Oh, @jennantilla this is my Onesignal integration

on App build.gradle
Screenshot 2023-10-20 062917

on Application class
Screenshot 2023-10-20 063050

@brismithers
Copy link
Contributor

Hi @herotha, one possible solution is, rather than include the entire com.onesignal:OneSignal dependency, you can update your App's build.gradle to only specify the individual modules you want included:

dependencies {
  implementation 'com.onesignal:core:[5.0.0, 5.99.99]'
  implementation 'com.onesignal:in-app-messages:[5.0.0, 5.99.99]'
  implementation 'com.onesignal:notifications:[5.0.0, 5.99.99]'
}

@herotha
Copy link
Author

herotha commented Nov 21, 2023

Thanks @brismithers .
This solution works for me.

@nan-li
Copy link
Contributor

nan-li commented Dec 5, 2023

Users of the native OneSignal Android SDK can remove the location module from dependencies. Closing this issue as resolved.

We are investigating how to address this in OneSignal's cross platform SDKs as brought up in the linked issue on Unity above.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants