Closed wjwarren closed 9 years ago
@jaydeepw I pushed a fix for this issue on my fork of this lib. Please let me know if the changeset looks good and I'll create a pull request.
Wow. Thats great. Thanks for the fix. Please pull from master too, if not already. I cannot find your changelog. But as this is a simple null check, just submit the PR and I shall merge to master.
Hey, this is the changeset: https://github.com/wjwarren/poly-picker/commit/674e51f047e474d118180cdb6d39e86f829a216c
I created a new branch from the v1.0.11 tag because I didn't want to add snapshot code to my production app.
If you want I can apply the patch to the master branch and create a pull request from there.
Looks good. Apply the patch.
Actually, what about user feedback? Right now it will just fail silently.
Perhaps show a Toast when the image can't be saved?
Yes, this thought popped in my mind too when I read the changelog but thought that would be more to ask to you. Showing a Toast is okay in this case. Show it when the system returns the path == null
Cool, will send a pull request your way soon :smile:
Here is the PR: https://github.com/jaydeepw/poly-picker/pull/59
Steps to reproduce
Actual result
Expected result
Notes Lib version: 1.0.11.
For some reason the demo app does not always capture images in high resolution.
Stacktrace of crash
Looking at the
CwacCameraFragment
class'saveImage()
method, I do see that there is no null checking for the result of callingMediaStore.Images.Media.insertImage(...)
. According to the [Android docs](https://developer.android.com/reference/android/provider/MediaStore.Images.Media.html#insertImage%28android.content.ContentResolver, android.graphics.Bitmap, java.lang.String, java.lang.String%29) this method could returnnull
.