react-native-background-geolocation: Android Update Rejection (New Google Permissions & Location Permissions policies)
Your Environment
- Plugin version: ^3.9.0
- Platform: Android
- Gradle target API:29
- OS version: 10
- Device manufacturer / model: Redmi Note7
- React Native version (
react-native -v
): 0.60.4 - Plugin config
var DEFAULTCONFIG = {
url: BASE_URL + "postagentlocation",
desiredAccuracy: BackgroundGeolocation.DESIRED_ACCURACY_HIGH,
distanceFilter: 10,
stopTimeout: 1,
locationUpdateInterval:30000,//in milliseconds
foregroundService: true,
enableHeadless:true, //Enables "Headless" operation allowing you to respond to events after you app has been terminated with stopOnTerminate false.
heartbeatInterval: 60, //default is 60s
debug: false, // <-- enable this hear sounds for background-geolocation life-cycle.
logLevel: BackgroundGeolocation.LOG_LEVEL_VERBOSE,
stopOnTerminate: false, // <-- Allow the background-service to continue tracking when user closes the app.
startOnBoot: true, // <-- Auto start tracking when device is powered-up.
stopAfterElapsedMinutes:2880, //in minutes, 48 hours
useSignificantChangesOnly:false,
stopOnStationary:false,
schedule: [
"2-6 9:00-19:00" // Mon-Fri: 9:00am to 7:00pm
],
extras: {
"deviceInfo":deviceinfo,
},
headers: { // <-- Optional HTTP headers
"Content-Type": "application/json",
"Access-Control-Allow-Methods": "POST",
"Authorization": "Basic " + token,
},
};
BackgroundGeolocation.ready(DEFAULTCONFIG, (state) => {
console.log("- BackgroundGeolocation is configured and ready: ", state.enabled);
if (!state.enabled) {
////
// 3. Start tracking!
//
BackgroundGeolocation.start(function() {
console.log("- Start success");
});
}
});
Expected Behavior
It is not a bug or installation issue, rather rejection of app update on Google Play Store which I expected to be fine since I just updated same version of the plugin a week ago.
Actual Behavior
App rejected on Play Store.
Steps to Reproduce
Context
Today my new app update submission just got rejected by the Play Store review team. It’s weird because I have never once got rejected on Android before and I updated fine just a week ago. I suspect this is related to the recent crack down on more apps using background location access:
https://arstechnica.com/gadgets/2020/02/google-cracks-down-on-location-tracking-android-apps/ https://support.google.com/googleplay/android-developer/answer/9799150?hl=en
and related to this permission in manifest I suppose:
ACCESS_BACKGROUND_LOCATION
according to:
https://developer.android.com/training/location/background
The reasons given for rejection is as below:
Feature does not meet requirements for background location access Based on our review, your declared feature does not meet the requirements for background location access. Please remove the background location permission requested and submit an update to your app. When declaring a feature for background location access, please note the following: Your selected feature should deliver clear value to the user and be important to the core functionality, or main purpose of the app. Without this core feature, the app is “broken” or rendered unusable. You should also consider if users would expect the app to access their location in the background, and if you can deliver the same experience without accessing location in the background.
You may only request permissions that are necessary to implement critical current features or services in your application. You may not use permissions that give access to user or device data for undisclosed, unimplemented, or disallowed features or purposes. In order for our team to check for compliance, we must be able to review and verify your in-app experience.
They gave two resolution options to allow submission:
Option 1: File an exception and roll out a submission (without making changes) To file an exception in the form, go to the question “Does your app meet the Location permissions policy?” and select “No, this app does not meet the Location permissions policy.” (given until March 29, 2021)
Option 2: Submit a compliant update Once you’re ready to submit a compliant version of your app: -- 1. Make the necessary updates to address the issue(s) identified above. If your app is not eligible to access location in the background or does not meet requirements for accessing location in the background, please remove the permission from your manifest and in-app functionality. 2. Double check that your app is compliant with all other Developer Program Policies.
Debug logs
Logs
PASTE_YOUR_LOGS_HERE
Question
Have anyone encountered this before (or rather around this time)? If so and you succeed resubmitting, what steps have you taken to resolve this?
I tend to prefer Option2 since doing Option1 won’t do much good since March 2021 is a few months away and I still have to resubmit anyway. Also, is there any option in the plugin for Android that would allow only location tracking while in foreground and less ‘intrusive’ according to these Google’s new policies?
I guess with my configs, I have to do enableHeadless:false, stopOnTerminate: true and startOnBoot: false
right?
About this issue
- Original URL
- State: closed
- Created 4 years ago
- Comments: 26 (11 by maintainers)
Release Accepted!
My latest change to
Config.backgroundPermissionRationale
Strings did the trick. My latest submission of demo app is now live (Flutter version). Reviewers are going to be very picky about what you say:DEFAULT_XXX
in the plugin’sbuild.gradle
apply only if you haven’t providedext
overrides in your app’s rootbuild.gradle
.@firdaussoberi the only thing that matters for your root
build.gradle
is:It occurs to me with Google’s new app submission policy, where one must describe to Google how to login to the app and how to trigger the app’s UI to request background permission, that this system is susceptible to being gamed, like VW’s Emissions Scandal, where a developer could detect their app being reviewed and throw up a different
backgroundPermissionRationale
(or different UI altogether) than the one used in the usual production context.Just a thought 😃
Me too, I got the same message recently for an app update that keeps getting rejected
Maybe you just got lucky with the reviewer. We are trying to submit an app with the following purpose:
And the google reviewer just rejects it claiming “Based on our review, your declared feature does not meet the requirements for background location access.”
I have an app that only tracks location in the foreground. My AndroidManifest.xml contains
ACCESS_FINE_LOCATION
andACCESS_COARSE_LOCATION
. I declared to Google Play that my app doesn’t use background location but they’ve rejected the app because they say it does. Is there any way around this or do I have to go ahead and state that my app needs background location even when it doesn’t? Seems like a good path to never getting approval.