Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Apk generated with expo does not ask for permissions when it is installed

My problem is that my application when I am testing it with a yarn start or expo start asks me for camera permissions and permissions to use other phone credentials such as fingerprint. However, when I generate an apk with expo build: android, when installing it it does not ask for the permissions to the resources, and in the information of the app from the phone it notifies me that the application did not ask for permissions to use any resource.

{
  "expo": {
    "name": "Page",
    "slug": "Page",
    "privacy": "public",
    "sdkVersion": "34.0.0",
    "platforms": [
      "ios",
      "android",
      "web"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/5_5_R-icon.png",
    "splash": {
      "image": "./assets/splash1.png",
      "resizeMode": "cover",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true
    },
    "android":{
      "permissions":["CAMERA_ROLL"],
      "package":"com.ivanzapata.page"
    }
  }
}
like image 556
ivanzapata Avatar asked Dec 22 '22 21:12

ivanzapata


1 Answers

Your permissions in app.json need to be the Android permission names, not the expo ones. See https://docs.expo.io/versions/latest/sdk/permissions/#android-permissions-equivalents-inside-appjson

So your app.json should be

    "android":{
      "permissions":["READ_EXTERNAL_STORAGE", "WRITE_EXTERNAL_STORAGE"],
      "package":"com.ivanzapata.page"
    }
like image 143
azundo Avatar answered Dec 26 '22 00:12

azundo