cordova-plugin-camera icon indicating copy to clipboard operation
cordova-plugin-camera copied to clipboard

allowEdit not working when sourceType is PHOTOLIBRARY

Open Carlosps opened this issue 6 years ago • 12 comments

Hello,

cordova-android": "7.0.0" OS version 7.1.2 Device Redmi 4x

The editing works fine when source type is camera, but nothing happens when we select PHOTOLIBRARY.

const options: CameraOptions = { allowEdit: true, quality: 70, destinationType: this.camera.DestinationType.DATA_URL, sourceType: useAlbum ? this.camera.PictureSourceType.PHOTOLIBRARY : this.camera.PictureSourceType.CAMERA, encodingType: this.camera.EncodingType.JPEG, mediaType: this.camera.MediaType.PICTURE }

Any idea what that might be? Thank you.

Carlosps avatar Dec 06 '18 17:12 Carlosps

What Cordova platform? What platform version? What OS version? What device?

janpio avatar Dec 06 '18 17:12 janpio

Just updated the question with that information, thanks.

Carlosps avatar Dec 06 '18 17:12 Carlosps

Any updates on that?

Carlosps avatar Dec 10 '18 12:12 Carlosps

Maybe it has something to do with cell phones

kadimawl avatar Dec 12 '18 09:12 kadimawl

This is a valid bug working on a fix now.

hazems avatar Feb 25 '19 02:02 hazems

I created a PR that fixes this issue: https://github.com/apache/cordova-plugin-camera/pull/426

Now after merging this PR, after setting allowEdit to true while source type is PHOTOLIBRARY, a cropping window will be launched and you can do needed edits, and once you finish, you can receive the result in the same way you have for Camera.

@jcesarmobile @macdonst please review when you have sometime, thank you.

hazems avatar Feb 25 '19 02:02 hazems

@janpio PR is ready for review, thanks: https://github.com/apache/cordova-plugin-camera/pull/426

hazems avatar Mar 10 '19 05:03 hazems

If anyone or @Carlosps is interested in this fix, feel free to thumb up this PR which fixes this issue : https://github.com/apache/cordova-plugin-camera/pull/426

Thanks

hazems avatar Apr 07 '19 07:04 hazems

This bug is fixed?

SidiBecker avatar Oct 21 '19 12:10 SidiBecker

I have the same issue on Android only, works fine on iOS

Ionic:

   ionic (Ionic CLI)  : 4.10.2
   Ionic Framework    : ionic-angular 3.9.3
   @ionic/app-scripts : 3.2.2

Cordova:

   cordova (Cordova CLI) : 9.0.0 ([email protected])
   Cordova Platforms     : android 8.1.0

cleverappdesign avatar Jan 18 '20 22:01 cleverappdesign

I got it working when using the Android Permission plugin https://github.com/apache/cordova-plugin-camera/issues/486#issuecomment-576463204

cleverappdesign avatar Jan 31 '20 06:01 cleverappdesign

The issues is still not fixed. can anyone update on this

arushraj avatar May 09 '20 14:05 arushraj