-
-
Notifications
You must be signed in to change notification settings - Fork 57
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
Getting Unable to decode stream: java.io.FileNotFoundException if crop is false #25
Comments
@ASKabanets What library version you use and which Android API you tests on? |
I've just downloaded this sample project, launched it on my OnePlus 5 (Android 10) and tried to get image from gallery or camera. It works great, but when crop is false I got FileNotFoundException. |
Could you attach your sample project here? |
@ASKabanets You're right. The error is in logcat but, the app works and you could easily use the I'll fix that false-positive exception. Thanks! |
It works (when crop is false) if you use |
@ASKabanets Please use Uri. I'm gonna update the sample app and the Readme. |
I'm having the same problem with this setup:
I can have a path:
But:
ps: if I switch to my implementation I don't have this problem (but then I have with API versions that you fixed) Any hint @Drjacky ? |
This is the path I get using my version: |
@GuilhE Using file path ( private val launcher = registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
if (it.resultCode == Activity.RESULT_OK) {
val uri = it.data?.data!!
// Use the uri to load the image
}
} |
I've tried that, but I get exactly the same path uppon |
@GuilhE No, not private val galleryLauncher =
registerForActivityResult(ActivityResultContracts.StartActivityForResult()) {
if (it.resultCode == Activity.RESULT_OK) {
val uri = it.data?.data!!
mGalleryUri = uri
imgGallery.setLocalImage(uri)
} else parseError(it)
} |
What's the
Our implementations differ, my version: GalleryProvider
I believe the differences in FileUriUtils could also be related 🤔 . |
I've changed my GalleryProvider to include your permissions logic, but maintaining all my previous logic. It's working now 👍🏼 |
I'm getting same issue when try to open camera without crop() option.
|
@ClarkXP Please create a new issue with the all necessary information |
Hi! Thanks for the library!
Checked sample app.
Getting
BitmapFactory: Unable to decode stream: java.io.FileNotFoundException: /document/image:197117: open failed: ENOENT (No such file or directory)
if don't addcrop()
The text was updated successfully, but these errors were encountered: