Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

React Expo app needs permissions in play store

React beginner here, I built my react native app using expo build:android -t app-bundle and I tried to upload it to the google play store and I got this error message:

Error
Your app has an APK with version code 1 that requests the following permissions: android.permission.READ_CONTACTS, android.permission.READ_PHONE_STATE, android.permission.RECORD_AUDIO, android.permission.CAMERA. Apps using these permissions in an APK are required to have a privacy policy set.

My app is just a weather app so i dont see why it would need contacts and recording audio.

app.json:

{
  "expo": {
    "name": "WeatherApp",
    "slug": "WeatherApp",
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "contain",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    },
    "android": {
      "adaptiveIcon": {
        "foregroundImage": "./assets/adaptive-icon.png",
        "backgroundColor": "#FFFFFF"
      },
      "package": "com.company.weaher"
    },
    "web": {
      "favicon": "./assets/favicon.png"
    }
  }
}
like image 220
pleasedontdownvote Avatar asked Oct 23 '25 17:10

pleasedontdownvote


2 Answers

As per https://docs.expo.dev/versions/latest/config/app/#permissions, if you do not specify a permissions key under android in app.json (which is the case for any newly created Expo apps), Expo will use all the permissions supported by default.

Start by setting it to an empty array, as they state in the docs, and you will be fine.

like image 131
Rares Avatar answered Oct 26 '25 05:10

Rares


Sometimes the Libraries you are using automatically requests for the permissions you mentioned. You just need to update your policies in the play store. Or If you don't use a library that requests for these permissions, then remove that library from your package.json file.

like image 41
srd Avatar answered Oct 26 '25 05:10

srd



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!