In my app, I need to access files that are sent via an Intent. I’m able to get different urls associated with the file being sent.
For example: I can get this ContentUri content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F40545/REQUIRE_ORIGINAL/NONE/1389655642
For a url like that (with “contentprovider”), I am able to use the FilePath
plugin to successfully access the real file.
The problem comes when I try to access a file with a uri like this: content://com.google.android.apps.docs.fetcher.FileProvider/cR2PphJ8vsWQguG…g%3D?_display_name=file000855094214.jpg&mime_type=image%2Fjpeg&_size=89830
This one has “FileProvider” instead of “contentprovider”. It seems like the FilePath
plugin is unable to resolve the native url for this kind of content path.
This is the error that I get from the FilePath plugin:
column '_data' does not exist
My question is how can I get the native file url from ContentUris with the FileProvider