java.io.FileNotFoundException: No content provider (Android)
My app does a download and save the file in temporary directory.
I use a File object to pass its path in PDFView(filePath).
In iOS it works fine but in Android I got a java.io.FileNotFoundException: No content provider.
In Android, the path is somethine like /data/data/my.app/cache/file.pdf.
I figured out that I have to pass file://<file_path> in PDVView() to show it in Android, but not in iOS.
Is there any solution that works in both platform?
I have the same problem
I have the same problem.
I have the same problem. java.io.FileNotFoundException: No content provider
I have the same problem
I have the same problem.
Closing as resolved in 1.4.5 (also included in 1.5.0-beta.1 Kotlin/Swift migration).
Fixed: absolute filesystem paths on Android load via fromFile instead of a content-provider URI (no more No content provider).
Try it
dependencies:
flutter_pdfview: ^1.4.5
# or pin the migration beta:
# flutter_pdfview: 1.5.0-beta.1
If you still reproduce on 1.4.5+ / 1.5.0-beta.1, please reopen with platform + OS version, flutter --version, minimal repro, and expected vs actual.
Related: #351 (1.5.0-beta feedback), #346 (1.4.5 feedback)