Google Play Expo w/ React - What is the plist equivalent for Android in Expo's app.json file?

Viewed 761

I am in the process of getting an app release approved by Google play but have been rejected for the collection of sensitive information, in this case background location. I am running react native with expo and I can see that in ios there is a plist configuration in app.json that seems to address some of these issue, but I am unsure what is the android equivalent so I can make the necesarry changes.

Google claims the following:

App Bundle:15, App Bundle:14    Prominent disclosure not found
Your app must display a prominent disclosure through a pop-up alert before your app’s location runtime permission. Based on our review, a prominent disclosure did not appear before the runtime permission.

Remember, your prominent disclosure must:
Appear before your app’s location runtime permission.
Include at least the following sentence, adapted to include all the relevant features requesting access to location in the background in the app that are readily visible to the user: “This app collects location data to enable ["feature"], ["feature"], & ["feature"] even when the app is closed or not in use.” If you extend permitted usage to ads, please also include: “This data is also used to provide ads/support advertising/support ads.”

I am assuming I can insert into the app.json something like the plist for ios?

app.json

 ...
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.blah,blah",
      "buildNumber": "1.1.0",
      "infoPlist": {
        "NSLocationWhenInUseUsageDescription": "Allow VolleyPal to use your location. Your location is used to check you in at the appropriate playground. Your location data are not used or stored in any other way or for any other purpose."
      }
    },
    "android": {
      "package": "com.blah.blah",
      "versionCode": 16
    },
    "description": ""
  }
}
 
2 Answers

There are serveral things you need to do with this permission backgroud for android. I try to explain to you spearately.

The part of coding

Based on what you described, your application requested a permission for location, and this service will used as backgroud. I don't know it's an essential process you need to do or not, if the answer is yes, I suggest you take a look at the link here https://developer.android.com/training/location/background, in this page it tells you what kind of permission you need to put in AndroidMainfest.xml. In you case I think it's propably all these permissions ACCESS_COARSE_LOCATION ACCESS_FINE_LOCATION ACCESS_BACKGROUND_LOCATION(this is for background location in your case) need be put in this xml.

Again I don't know how you code exactly to request a permission, I assume it's probaly use a react native library to do it. If not, take a look at this page https://reactnative.dev/docs/permissionsandroid

The part of respecting process in google play

After you have done apart coding, you need to make permissions declaration form, this link told you how to do it https://support.google.com/googleplay/android-developer/answer/9888170.

Once you have all these things, there are two more things you need to do.

1.Provide a video demonstration you must provide a link to a short video that demonstrates the location-based feature in your app that requires access to location in the background (while the app is not in use).

https://support.google.com/googleplay/android-developer/answer/9799150?hl=en#zippy=%2Cstep-provide-prominent-in-app-disclosure%2Cstep-provide-a-video-demonstration

2.Provide prominent in-app disclosure This step normally is a verified step, however there are strict rules about how you share the location data. You need to verfiy all the process about asking permission is correct and wording has been well-explained when you ask permission. Also take this example it'll help you to have clear vision about it. https://support.google.com/googleplay/android-developer/answer/9799150?hl=en#zippy=%2Cstep-provide-prominent-in-app-disclosure

try adding this in your app.json under android

"permissions": ["ACCESS_COARSE_LOCATION", "ACCESS_FINE_LOCATION", "ACCESS_BACKGROUND_LOCATION", "Permissions.LOCATION"],

here is the link from where I got this information.

Also did you fill out a form or something like that, regarding why do you want the location of the user. (the play store asked me after uploading the apk and before submitting it to review)

Also add an alert when the user first launches the app, where you are asking for the permission. (In think this is why your app got rejected)

Related