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.

[Android] Bug cannot show alert after pick image

See original GitHub issue

Hello. This repo is great, until I found a glitch on my use-case, which I need to show confirmation after pick image.

ImagePickerManager.showImagePicker(options, response => {
      const { didCancel, error, ...data } = response
      alert('foo bar')            // Not show
      Alert.alert('foo', [ ... ]) // Not show
     console.log('foo bar baz') // Show on console

Tested on RN Image Picker version 0.23 & 0.24.1 with RN 0.39 (Android Genymotion)

Edit: It show alert & console if I click cancel on popup. But when I pick image, it just show console later. Tested on showImagePicker and launchCamera

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

3reactions
pewhcommented, Dec 19, 2016

setTimeout is working, either value is 5000 or 1. So I can make it work on:

ImagePickerManager.showImagePicker(options, response => {
  setTimeout(() => {
    // show your alert
  }, 1);
});

I’ close this issue as I get it working, although it seems a hack way. Thanks so much, bro 🍻

0reactions
vasuchawlacommented, Sep 11, 2020

I know its old but Same happening for me.

After i pick the image, app wide alerts stop working. Not sure about the reason but after app restart, alerts work, then i pick an image, no alerts are working now.

Read more comments on GitHub >

github_iconTop Results From Across the Web

[Android] Bug cannot show alert after pick image #418 - GitHub
I've pick an image, and after that, it shows output on console, but still no alert dialog. All reactions.
Read more >
Android Notifications Not Showing Up? 10 Fixes You Can Try
Not seeing notifications show up on your Android phone? Try these fixes to get Android notifications working again.
Read more >
How do I display an alert dialog on Android? - Stack Overflow
4. We don't need to use both create() and show() , as show() already creates the dialog with the content described. According to...
Read more >
Capture and read bug reports - Android Developers
Select the type of bug report you want and tap Report. After a moment you get a notification that the bug report is...
Read more >
Known issues with Android Studio and Android Gradle Plugin
To work around this issue, do the following: Open the Settings window by clicking File > Settings; Navigate to Appearance & Behavior >...
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