Ngcordova camera plugin not returning on Nexus 4


I am using the ngcordova camera plugin on my Nexus 4, but after I select the image the app freezes in a white screen. The same app works in a nexus 5 and the android emulator for the nexus 4.

Did anyone have this problem?

Thank you very much!

Is this on an actual device or emulator? Can you post some code?

The problem just happen in the Nexus 4 actual device. It does not happen in the emulator or in the Nexus 5.

I’m using the code I found in the docs:

$scope.updatePhoto = function() {
	var options = {
	      quality: 30,
	      destinationType: Camera.DestinationType.FILE_URI,
	      sourceType: Camera.PictureSourceType.CAMERA, // Camera.PictureSourceType.PHOTOLIBRARY
	      allowEdit: true,
	      encodingType: Camera.EncodingType.PNG,
	      targetWidth: 100,
	      targetHeight: 100,
	      popoverOptions: CameraPopoverOptions,
	      saveToPhotoAlbum: true,
	      mediaType: Camera.MediaType.PICTURE

	    $cordovaCamera.getPicture(options).then(function(imageURI) {
			$scope.img = imageURI;
	    }, function(err) {
	      // error
	    ); // only for FILE_URI

Thank you!