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

[Android] Health apps requirement for accessing the ACTIVITY_RECOGNITION permission #2003

Closed
PaitoAnderson opened this issue Apr 19, 2024 · 5 comments

Comments

@PaitoAnderson
Copy link

Screenshot 2024-04-19 at 3 25 51 PM

Your Environment

  • Plugin version: 4.14.3
  • Platform: Android
  • OS version: N/A
  • Device manufacturer / model: N/A
  • React Native version (react-native -v): 0.72.6
  • Plugin config
PASTE_YOUR_CODE_HERE

Expected Behavior

No issues in Play Store

Actual Behavior

Received this message in the Play Store

Your app uses the android.permission.ACTIVITY_RECOGNITION permission and must meet Health apps policy requirements. If you don't have any health features in your app, remove this permission from your app's manifest.

Steps to Reproduce

  1. Add react-native-background-geolocation to App
  2. Publish on Play Store

Context

Publish on Play Store

Debug logs

Logs
PASTE_YOUR_LOGS_HERE
@christocracy
Copy link
Member

Yes, the plug-in uses the Motion API to automatically triggger location-tracking in the background. The Motion API comes under the umbrella of “Health”. The Play Store has become more strict about this permission, requiring you explain in detail why you’re using the motion API, which is to automatically trigger location-tracking in the background.

This is an accepted exemption for foreground-service launches.

see “Exemptions from background start restrictions“ in the Android Docs

IMG_0770

@christocracy
Copy link
Member

The plug-in can, of course, operate without the motion api (it uses a Geofence around the last known position to detect movement). Your app will take longer distances to engage location-tracking (requiring movement of at least 200 meters)

@PaitoAnderson
Copy link
Author

PaitoAnderson commented Apr 19, 2024

Is there a way to include react-native-background-geolocation without that permission? In our use case requiring a movement of at least 200 meters is OK.

The Play Store Health form isn't great and doesn't let you explain why you need it sadly, it's just an Other checkbox:
Screenshot 2024-04-19 at 3 58 05 PM

Thanks for the quick reply @christocracy

@christocracy
Copy link
Member

See the last paragraph of my blog here to learn how to remove specific permissions from your app.

@christocracy
Copy link
Member

See my latest blog-post about this

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

2 participants