Unable to load image when selected from the gallery on Android 4.4 (KitKat) using PhoneGap Camera Plugin

后端 未结 6 438
小蘑菇
小蘑菇 2020-12-01 06:15

I\'m trying to set the source of an img tag in my app based on the image chosen from the device image gallery using the PhoneGap/Cordova Camera Plugin.

It has worked

6条回答
  •  不知归路
    2020-12-01 06:49

    Something broke in Android 4.4 with the URI encoding of images.

    A bug has been filed against Cordova here: https://issues.apache.org/jira/browse/CB-5398

    In the docs for getPicture, under the Android Quicks section, it discusses this problem and points to a StackOverflow question with a workaround (edit the Camera plugin java code to force it to open the Gallery app instead of the Storage Access Framework app.)

    It seems another thing you could do is set the destination type to DATA_URL.

提交回复
热议问题