Camera not working in standalone app

Hi there,

I’m developing an app which uses the phone’s camera. Everything si working properly locally using expo and after installing the .apk on my phone as well.
But when I publish my app on Google Play and download it, my failure message “No acces to camera” always display in the app. Which means camera permission has not been granted.
In fact, it doesn’t even show the popup which is supposed to ask camera permission to the user.

Here is my app.json file :

{
  "expo": {
    "name": "MyApp",
    "slug": "MyApp",
    "privacy": "public",
    "sdkVersion": "31.0.0",
    "platforms": [
      "ios",
      "android"
    ],
    "version": "1.0.0",
    "orientation": "portrait",
    "icon": "./assets/icon.png",
    "splash": {
      "image": "./assets/splash.png",
      "resizeMode": "cover",
      "backgroundColor": "#ffffff"
    },
    "updates": {
      "fallbackToCacheTimeout": 0
    },
    "assetBundlePatterns": [
      "**/*"
    ],
    "ios": {
      "supportsTablet": true,
      "bundleIdentifier": "com.local.myapp"
    },
    "android": {
      "package": "com.local.myapp",
      "permissions": ["camera"],
      "versionCode": 5
    }
  }
}

I really don’t know where the problem come from, as everything is ok until I upload the file on the store. Maybe I missed something in my app’s configuration in Play Console ?

Thank you for your answers !

Update : I checked the app’s information in my phone’s parameter, it says it doesn’t need any permissions, even if I specified camera permission in the app.json file.

Do you prompt for the permission?

await Permissions.askAsync(Permissions.CAMERA)
1 Like

This topic was automatically closed 15 days after the last reply. New replies are no longer allowed.