Possible Cordova/KitKat Bug with Camera Plugin. Anyone Else?


#1

Hi All,

I am using <img ng-src="{{data_url}}" /> to display an image. It can be updated in 2 ways:

  • using Cordova’s navigator.camera.getPicture with sourceType=Camera.PictureSourceType.PHOTOLIBRARY
  • using Cordova’s navigator.camera.getPicture with sourceType=Camera.PictureSourceType.CAMERA

When the image returns from the camera app, it updates in the view properly. When I return from the gallery after choosing an image, the image doesn’t change unless I click it again and hit cancel. I am returning a base64 encoded url in either case.

Does anyone else have any insight? I’m using Cordova 3.3 and Ionic 0.9.26.

Thanks!


How to integrate Cordova/Phonegap plugins within Angular/Ionic the right way?
#2

Looks like I just needed to call $scope.$apply() after i replaced the src with the new Base64 url.