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

Save Photo To Album - Android (not tested on iOS) #341

Closed
accttech opened this issue Sep 13, 2018 · 5 comments · Fixed by #669
Closed

Save Photo To Album - Android (not tested on iOS) #341

accttech opened this issue Sep 13, 2018 · 5 comments · Fixed by #669

Comments

@accttech
Copy link

When I use saveToPhotoAlbum: true; it throws "Unable to obtain picture: Error capturing image.". When im not using saveToPhotoAlbum, it saves the picture to the cache, and removes it after a few days. I need the picture to be persistent.

@janpio janpio changed the title Save Photo To Album - Android (IOS Untested) Save Photo To Album - Android (no tested on iOS) Sep 13, 2018
@HarelM

This comment has been minimized.

@janpio janpio changed the title Save Photo To Album - Android (no tested on iOS) Save Photo To Album - Android (not tested on iOS) Sep 18, 2018
@janpio

This comment has been minimized.

@HarelM

This comment has been minimized.

@timbru31
Copy link
Member

timbru31 commented Apr 2, 2020

Is this issue still relevant? Is this reproducible in a new, plain Cordova app? A minimal reproduction repository would really help to debug and later fix this issue. More information on how to create one: https://github.com/apache/cordova-contribute/blob/master/create-reproduction.md

PieterVanPoyer added a commit to PieterVanPoyer/cordova-camera-plugin-testing-app that referenced this issue Sep 28, 2020
PieterVanPoyer added a commit to PieterVanPoyer/cordova-camera-plugin-testing-app that referenced this issue Sep 28, 2020
@PieterVanPoyer
Copy link
Contributor

Issue still seems to be present.
Using the camera with the saveToPhotoAlbum true fails.

Reproduction is available at https://github.com/PieterVanPoyer/cordova-camera-plugin-testing-app/tree/master

This is the stacktrace of an Android 7 (Nexus 6) emulator.

2020-09-28 10:37:21.298 9599-9599/com.pvpoyer.cameraplugintesting D/CordovaInterfaceImpl: Sending activity result to plugin
2020-09-28 10:37:21.298 9599-9599/com.pvpoyer.cameraplugintesting I/ExifInterface_JNI: Raw image not detected
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err: java.io.FileNotFoundException: content:/com.pvpoyer.cameraplugintesting.cordova.plugin.camera.provider/cache_files/.Pic.jpg (No such file or directory)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at java.io.FileInputStream.open(Native Method)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at java.io.FileInputStream.<init>(FileInputStream.java:146)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at java.io.FileInputStream.<init>(FileInputStream.java:99)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at org.apache.cordova.camera.CameraLauncher.writeUncompressedImage(CameraLauncher.java:903)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at org.apache.cordova.camera.CameraLauncher.processResultFromCamera(CameraLauncher.java:503)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at org.apache.cordova.camera.CameraLauncher.onActivityResult(CameraLauncher.java:808)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at org.apache.cordova.CordovaInterfaceImpl.onActivityResult(CordovaInterfaceImpl.java:159)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at org.apache.cordova.CordovaActivity.onActivityResult(CordovaActivity.java:361)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.app.Activity.dispatchActivityResult(Activity.java:6932)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.app.ActivityThread.deliverResults(ActivityThread.java:4085)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.app.ActivityThread.handleSendResult(ActivityThread.java:4132)
2020-09-28 10:37:21.304 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.app.ActivityThread.-wrap20(ActivityThread.java)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.app.ActivityThread$H.handleMessage(ActivityThread.java:1533)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.os.Handler.dispatchMessage(Handler.java:102)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.os.Looper.loop(Looper.java:154)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at android.app.ActivityThread.main(ActivityThread.java:6119)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at java.lang.reflect.Method.invoke(Native Method)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at com.android.internal.os.ZygoteInit$MethodAndArgsCaller.run(ZygoteInit.java:886)
2020-09-28 10:37:21.305 9599-9599/com.pvpoyer.cameraplugintesting W/System.err:     at com.android.internal.os.ZygoteInit.main(ZygoteInit.java:776)
2020-09-28 10:37:21.307 9599-9599/com.pvpoyer.cameraplugintesting D/CordovaActivity: Started the activity.
2020-09-28 10:37:21.307 9599-9599/com.pvpoyer.cameraplugintesting D/CordovaActivity: Resumed the activity.
2020-09-28 10:37:21.308 9599-9599/com.pvpoyer.cameraplugintesting I/chromium: [INFO:CONSOLE(77)] "Unable to obtain picture: Error capturing image.", source: file:///android_asset/www/js/index.js (77)

PieterVanPoyer added a commit to PieterVanPoyer/cordova-camera-plugin-testing-app that referenced this issue Sep 28, 2020
PieterVanPoyer added a commit to PieterVanPoyer/cordova-camera-plugin-testing-app that referenced this issue Sep 28, 2020
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
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants