question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nothing happens on Android 7

See original GitHub issue

Hi,

I’m almost sure I read something about my issue before, but here it is:

  • on React Native 0.43.3
  • using last react-native-image-picker version
  • on my Android devices (Nexus 5x, Android 7 and Nexus 7, Android 6)
  • I can open the “Select a Photo” modal
  • whether a touch Take photo… or Choose from Library, it closes the modal but triggers no callback.
ImagePicker.showImagePicker(options, (response) => {

  let responseObj = {};
  console.log(response);
  if (response.didCancel || response.error) {
      responseObj = {
        success: false,
        errorMessage: response.error,
        uri: response.uri,
        data: response.data,
        path: response.path
      };
      dispatch(receiveImageFromLibraryErr(responseObj));
  }

  else {

    responseObj = {
      success: true,
      uri: response.uri,
      data: response.data,
      path: response.path
    };
    dispatch(receiveImageFromLibrary(responseObj));
    // let source = { uri: 'data:image/jpeg;base64,' + response.data };


  }

});

Here’s how I did that, it works well in iOs, not on my Android (physical) device. My console.log() returns nothing when I click on Take photo… or Choose from Library, but it returns {didCancel: true} when I choose Cancel on the modal.

Any idea on what’s happening here?

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8

github_iconTop GitHub Comments

1reaction
stale[bot]commented, Jun 18, 2019

Closing this issue after a prolonged period of inactivity. Fell free to reopen this issue, if this still affecting you.

0reactions
stale[bot]commented, Jun 11, 2019

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. You may also mark this issue as a “discussion” and I will leave this open.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Fix an installed Android app that isn't working - Google Support
Try the following steps if an app installed on your phone has any of these problems: Crashing. Won't open. Won't respond. Isn't working...
Read more >
Unable to download and update apps from Play store
Hello I'm (still) using a Galaxy A5 with Android 7, and I can't install anything on the google store, or even update the...
Read more >
Your Android Phone or Tablet Won't Turn On? 6 Ways to Fix
Your Android Phone or Tablet Won't Turn On? 6 Ways to Fix · 1. Charging Issues · 2. Perform a Power Cycle ·...
Read more >
Why Won't My Android Update? How to Fix Updating Issues
If your Android device won't update, it might have to do with your Wi-Fi connection, battery, storage space, or the age of your...
Read more >
App Won't Open on Android? 10 Ways To Fix - Online Tech Tips
But that's not much help if you tap them and nothing happens. If an app won't open on your Android device, here are...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found