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

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!

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

1 Like