I use the standard documentation implementation to obtain a picture from a gallery and show that on the screen.
The platform is android.
- I press a button "picture from gallery"
- A dialog opens from which I choose gallery.
- The gallery opens and I choose a picture
- The onSucces function is called and the picture is shown on the screen.
However,
- I again press the button "picture from gallery" to choose a new picture
- The onFail function is called with message "Selection Cancelled"
- A dialog opens from which I choose gallery
- I choose a picture
- 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?