react-native-image-picker: [Android] ShowImagePicker callback not triggered for takePhoto and chooseFromLibrary

Console won’t show any log message for response content when back from take photo session and choose from library session, but only display console log content in cancel and custom button case.

I implementing it on React Native 0.22 and android phone using 4.4.4. Any idea what happened? I followed the guide for Android Installation. I get the npm package via npm install react-native-image-picker@latest --save

I tried launchCamera() and launchImageLibrary() also cannot trigger callback in my development phone. thanks.

About this issue

  • Original URL
  • State: closed
  • Created 8 years ago
  • Comments: 27 (11 by maintainers)

Most upvoted comments

Try to add the super method in it

@Override
public void onActivityResult(int requestCode, int resultCode, Intent data) {
  super.onActivityResult(requestCode, resultCode, data);
  mCallbackManager.onActivityResult(requestCode, resultCode, data);
}

did u override the onActivityResult method,so checkout…and call super.onActivityResult(...),it works for me