Accessing Files on Android

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://

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://…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

Did anyone resolve this error? I’m getting same error while sharing files from WhatsApp…