Android app being rejected due to background location

Hi there,

I don’t know if anyone can give me any pointers. I’m getting stuck with the Google Play store, there’s been some recent change of policy and my app is being rejected for undeclared background location use. My app is Ionic 4, Angular 10 and Capacitor.

I don’t use background location, I don’t have that permission in my manifest, I just use foreground location:

    <!-- Geolocation API -->
    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" />

The email get say that for versions of android 9 and older, I have to ‘review my code’ to ensure I’m not using location in the background. I’m pretty confident I’m not, my location usage is in a singleton service, and I’ve put some code in to watch when the app is going into the background so it stops using location (using Capacitor):

App.addListener('appStateChange', (state: AppState) => {

      if (state.isActive) {
        this.gpsService.startWatchPostion({
          maxFrequencyMs: 1000,
          changeDistanceMeters: 3
        });
      } else {
        this.gpsService.stopWatchPosition();
      }
    });

I think it seems to behave, on an Android 8 device I’ve got, I don’t see the location pin at the top when I background my app.

I’ve appealed several times, I’ve put a video together explaining how I don’t use background location and put it in their declaration doc and they rejected that.

It’s just so opaque, I don’t know the specific reason they’re blocking the app, i.e. how they are detecting background location, so I’m just bashing my head against a brick wall.

I am having the same issue. My app is being rejected from the Google Play Store due to background location access… My manifest also only have foreground access…

    <uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
    <uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
    <uses-feature android:name="android.hardware.location.gps" android:required="true" />

I’m looking through my code to see where the requests for location might be going to the background, but I can’t find itt…

Did you ever get anywhere with Google on this? I tried appealing the decision, but I got stonewalled.

The permission ACCESS_BACKGROUND_LOCATION could also be requested by a plugin that you’re using, e.g. cordova-plugin-ble-central requests ACCESS_BACKGROUND_LOCATION. See this issue.

Thanks for the reply. I have already checked all of the plugins, and none of them request the ACCESS_BACKGROUND_LOCATION permission.

I went as far as grepping for ACCESS_BACKGROUND_LOCATION in the whole project. It doesn’t appear anywhere

Yea, Google don’t give you much of a clue as to what was wrong.

In my case, I went back and updated every channel, alpha, beta etc. to the latest version of my code and that seemed to resolve it.

1 Like

Experiencing the same issue, twice it got rejected, appealed twice, and it is going to happen again, unfortunately, no clear documentation on this issue, looks like the bots are finding Android Manifest settings ACCESS_COARSE_LOCATION, etc & rejecting the release whereas the same required even for getting user location in the foreground, little difficult process