I try to post my app on google play store, but they say I can't because I use location, but I never use it..
If I make an app-bundle and I open it with Android Studio, I find this on Manifest :
[...]
<uses-permission android:name="android.permission.ACCESS_COARSE_LOCATION" />
<uses-permission android:name="android.permission.ACCESS_FINE_LOCATION" />
[...]
<uses-permission android:name="android.permission.ACCESS_BACKGROUND_LOCATION" />
[...]
How I'm suppose to delete it? and how to know where this is use ?
My package.json :
"dependencies": {
"@react-native-community/masked-view": "0.1.10",
"@react-native-community/netinfo": "5.9.2",
"@react-navigation/drawer": "^5.9.0",
"@react-navigation/material-bottom-tabs": "^5.2.16",
"@react-navigation/native": "^5.7.3",
"@react-navigation/stack": "^5.9.0",
"@types/react-native-snap-carousel": "^3.8.2",
"expo": "~38.0.8",
"expo-barcode-scanner": "~8.2.1",
"firebase": "7.9.0",
"react": "~16.11.0",
"react-dom": "~16.11.0",
"react-native": "https://github.com/expo/react-native/archive/sdk-38.0.2.tar.gz",
"react-native-barcode-builder": "^2.0.0",
"react-native-circular-progress": "^1.3.6",
"react-native-gesture-handler": "~1.6.0",
"react-native-paper": "^4.1.0",
"react-native-reanimated": "~1.9.0",
"react-native-safe-area-context": "~3.0.7",
"react-native-screens": "~2.9.0",
"react-native-snap-carousel": "^3.9.1",
"react-native-svg": "^12.1.0"
},
"devDependencies": {
"@babel/core": "^7.8.6",
"@types/react": "~16.9.41",
"@types/react-native": "~0.62.13",
"typescript": "~3.9.5"
},
ACCESS_COARSE_LOCATION , ACCESS_FINE_LOCATION , and FOREGROUND_SERVICE permissions are automatically added. In order to use background location features, you also must add the android. permission. ACCESS_BACKGROUND_LOCATION and submit your app for review and request access to use the background location permission.
To limit the permissions your managed workflow app requires, set the android. permissions property in your app. json file to list only the permissions you need, and Expo will also include the minimum permissions it requires to run. See the Permission types below to learn about which Android permissions are added.
Geolocation is enabled by default when you create a project with react-native init . In order to enable geolocation in the background, you need to include the 'NSLocationAlwaysUsageDescription' key in Info. plist and add location as a background mode in the 'Capabilities' tab in Xcode.
I ran into the same problem and the Play Store changed their policy on location permissions effective Mar 29, 2021. Here's what I've found:
1. For managed Expo:
Modify app.json to add "permissions" and specify only those that you want. This will override Expo's default set of permissions. An empty array is fine if you require no permissions.
android: {
permissions: ["READ_CONTACTS", "WRITE_SETTINGS"]
...
Ref: https://docs.expo.io/versions/latest/config/app/#permissions
Note that Expo includes some manufacturer permissions by default. You may want to add these in:
"com.google.android.c2dm.permission.RECEIVE",
"com.anddoes.launcher.permission.UPDATE_COUNT",
"com.majeur.launcher.permission.UPDATE_BADGE",
"com.google.android.providers.gsf.permission.READ_GSERVICES",
"com.sonyericsson.home.permission.BROADCAST_BADGE",
"com.htc.launcher.permission.READ_SETTINGS",
"com.htc.launcher.permission.UPDATE_SHORTCUT",
"com.sec.android.provider.badge.permission.READ",
"com.sec.android.provider.badge.permission.WRITE"
2. For bare Expo:
Remove specific permissions by using tools:node="remove" in your AndroidManifest.xml
Ref: https://docs.expo.io/versions/latest/sdk/permissions/#excluding-android-permissions-in-bare-workflow
3. expo-location
If you have expo-location installed, it will automatically request ACCESS_COARSE_LOCATION and ACCESS_FINE_LOCATION (seems like ACCESS_BACKGROUND_LOCATION as well). I had expo-location installed at one point, and had to remove it from node_modules and package-lock.json manually.
Ref: https://docs.expo.io/versions/latest/sdk/permissions/#permissions-on-android
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With