-
Notifications
You must be signed in to change notification settings - Fork 30
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
Pdf preview closed immediately on android #11
Comments
Now I am starting to understand your tiny hack there :) https://stackoverflow.com/questions/38200282/android-os-fileuriexposedexception-file-storage-emulated-0-test-txt-exposed - would it make sense to completely migrate to Thank you |
if u can fix it, please do it and I will merge your changes |
I fix this with android FileProvider, kindly get the new version, and it has new features for preview the files from anywhere |
Hi, I am trying to use the library to preview a file stored locally on the device (file is saved by Capacitor.Plugins.Filesystem). Everything works just ok on iOS, file preview is displayed as expected but I have troubles on android. File preview is closed immediately. File path is 'file:https:///storage/emulated/0/Documents/Payslip.pdf'. I also tried different locations.
I played a bit with the Java code and ended up having a solution which is proposed here: https://inthecheesefactory.com/blog/how-to-share-access-to-file-with-fileprovider-on-android-nougat/en. This is working for me, however, this is the exact opposite from what is mentioned in the readme about
file:https://
vscontent:https://
uri.Specifically, I added this part in
presentFile
method:Could you please point me to a right direction what I might be doing wrong? I am absolutely new to android programming. You can find my working solution here: ufirstgroup@f783da3
Thank you.
The text was updated successfully, but these errors were encountered: