[SOLVED] Detached App: ImagePicker always return cancelled true

I’m using ImagePicker in Expo, and following the official docs in https://docs.expo.io/versions/v17.0.0/sdk/imagepicker.html.

At development mode, it works like a charm.
But when i detach my app (exp detach), run my app with Android Studio, and exec ImagePicker ( launchCameraAsync() function) on my Android device, ImagePicker result always return cancel true like this :

{
    cancelled: true
}

I’ve tried both on Android Device and Genymotion, but still return the same results.
How to solve that ? Any suggestion ?

btw, i’m using:

Node: 7.10.0
Expo CLI : 41.0.0
Expo: SDK 17
React Native: SDK 17 (Expo forked)
Android Studio : 2.3.1
Xiaomi Red Mi 2 Android 5.0
Genymotion - Android 5.0

You may have to add the relevant permissions in AndroidManifest.xml.

@nikki Nope. Following on @omerdn1 (one of member on Expo Developer Slack) solutions, just set allowsEditing: false on ImagePicker and it should work.

Looks like there is a bug on SDK 17 and should be fixed in next SDK update

1 Like

Hmm that’s weird. AFAIK allowsEditing isn’t looked at on Android – anyways I’ve added the base64 option and it’ll be available in next SDK.

Get the same problem on SDK 19 and resolve it with the allowsEditing: false too