2

I use the standard documentation implementation to obtain a picture from a gallery and show that on the screen.

The platform is android.

  1. I press a button "picture from gallery"
  2. A dialog opens from which I choose gallery.
  3. The gallery opens and I choose a picture
  4. The onSucces function is called and the picture is shown on the screen.

However,

  1. I again press the button "picture from gallery" to choose a new picture
  2. The onFail function is called with message "Selection Cancelled"
  3. A dialog opens from which I choose gallery
  4. I choose a picture
  5. the dialog of 3. is still shown

Looking for solutions I checked and tried what I found on related topics:

  • The Manifest.xml has android:launchMode="singleTop"
  • I removed the camera plugin and android platform and re-added them
  • I use Cordova 5.0.0
  • I test it on a Samsung S4 mini

Update 1

I found a solution for Android, but I feel it is very ugly, so if anyone has a better solution please suggest:

After processing the 1st succesfull callback, reload the app:

location.reload(); //only for android i guess?

Boris Kingma
  • 261
  • 2
  • 6

0 Answers0