-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
fix(android): file path correction if Uri authority is FileProvider #585
Conversation
It looks good, do you know if there is a test app available that shows the reproduction of the original issue? Edit: The sample code #531 worked for me to reproduce this issue |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for your contribution.
Was able to reproduce the issue using some sample codes provided in the linked issues. Confirmed that this PR addresses the problem. 👍
I would like to see a review from at least one other member before I merge.
This comment has been minimized.
This comment has been minimized.
Please merge it. It seems good enough change and the current Android camera is useless. |
Co-authored-by: Tim Brust <ratchet.player@gmx.de>
I used this PR to try if it resolves the issue #554 but the problem is still here. |
Guys, any update about this 🥶? I've tried @timbru31 fileHelper.java and it doesn't work Thanks |
I fixed with this code:
|
Any update on this?
Can you share your FileHelper.java file? |
@sylber-cz here is my fileHelper.java |
Thanks Robin, may I ask what version of cordova-plugin-camera are you running? Because I did a quick comparison of your and mine Filehelper.java file, and it seems like they are not equal with each other.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There were some unnecessary cleanup, but code wise it LGTM.
Platforms affected
Android
Motivation and Context
Select some videos or images return path error when Uri authority is FileProvider, then the app restarts.. That's why this bug is not always happening but it can be really annoying.
It's probably fixing the following issues (hard to say some descriptions are rather short): Resolves #573, resolves #531, resolves #548, resolves #554, resolves #558, resolves #563
Description
Checking if Uri authority is FileProvider for MediaStore content then find the URI.
Testing
Tested with most of my user's app and with my Huawei p smart 2019 - Android 10 and with Samsung Galaxy S5.
Checklist
(platform)
if this change only applies to one platform (e.g.(android)
)