Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SaveToPhotoAlbum does not save image on Android #577

Closed
3 tasks done
HarelM opened this issue Apr 2, 2020 · 4 comments · Fixed by #669
Closed
3 tasks done

SaveToPhotoAlbum does not save image on Android #577

HarelM opened this issue Apr 2, 2020 · 4 comments · Fixed by #669

Comments

@HarelM
Copy link

HarelM commented Apr 2, 2020

Bug Report

When setting saveToPhotoAlbum to be true image is not saved

Problem

What is expected to happen?

Image should be saved to photo album

What does actually happen?

Image is not saved

Information

Pretty straight forward - clicking on a button to open the camera, taking a picture, the picture is used in the app but does not appear in the gallery
Related to #341

Command or Code

https://github.com/IsraelHikingMap/Site/blob/master/IsraelHiking.Web/sources/application/directives/image-capture.directive.ts#L50L55

Environment, Platform, Device

Android, both samsung 9 and xiomi redmi 4,
App can be found here:
https://play.google.com/store/apps/details?id=il.org.osm.israelhiking&hl=en
Clicking the up-side-down drop on the right
Clicking a location on the map
Clicking on the camera to take a picture
Clicking OK in the camera app
The image is presented in the app but it is not stored in the gallery.

Version information

Cordova 9.0
Cordova-plugin-camera 4.0.3

Checklist

  • I searched for existing GitHub issues
  • I updated all Cordova tooling to most recent version
  • I included all the necessary information above
@tmk1991
Copy link

tmk1991 commented Apr 5, 2020

I've made changes to my fork for existing iOS and Android OS updates.
https://github.com/TDTECHLINK/cordova-plugin-camera

Remove the plugin and then add back via git repo
cordova plugin add git+https://github.com/TDTECHLINK/cordova-plugin-camera.git

@HarelM
Copy link
Author

HarelM commented Apr 6, 2020

Thanks @tmk1991! I don't see changes related to this specific issue, is it because of the API changes you did?
Any chance you can send a PR and this will hopefully be merged to solve this issue (Although there seems to be too many open pull requests... :-( )?

@yo-mike
Copy link

yo-mike commented Apr 8, 2020

Thanks @tmk1991! I don't see changes related to this specific issue, is it because of the API changes you did?
Any chance you can send a PR and this will hopefully be merged to solve this issue (Although there seems to be too many open pull requests... :-( )?

Did this solution work for you, @HarelM? Thanks for updating!

@HarelM
Copy link
Author

HarelM commented Apr 8, 2020

@949mac haven't had the chance to try it yet. Since forks can be easily abandoned I usually prefer to wait for a formal fix and release. I'm experiencing this issue for a while now and it is not a top priority bug so I want to see how this plays out.
Nevertheless, if you get around to test it let me know :-)

PieterVanPoyer added a commit to PieterVanPoyer/cordova-plugin-camera that referenced this issue Sep 29, 2020
…om camera - Android

- saveToPhotoAlbum feature fixed by taken into count content - uri. (writeUncompressedImage method) ( see: apache#611 (comment) )
- make saveToPhotoAlbum future proof by using the MediaStore to insert the taken image
- made a method to calculate the compressFormat based on the encodingType (JPEG or PNG)
- layout of the performCrop method is adjusted
- removed unused rotate variable inside processResultFromGallery method
PieterVanPoyer added a commit to PieterVanPoyer/cordova-plugin-camera that referenced this issue Oct 14, 2020
breautek pushed a commit that referenced this issue Oct 17, 2020
* GH-341 - GH-577 Fixed the Save Photo To Album starting from camera - Android

- saveToPhotoAlbum feature fixed by taken into count content - uri. (writeUncompressedImage method) ( see: #611 (comment) )
- make saveToPhotoAlbum future proof by using the MediaStore to insert the taken image
- made a method to calculate the compressFormat based on the encodingType (JPEG or PNG)
- layout of the performCrop method is adjusted
- removed unused rotate variable inside processResultFromGallery method

* Add extra VO class to the plugin.xml

* added package declaration to new VO

* GH-341 - GH-577 #669 (comment) listen to review
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants