Skip to content
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

Dart/Flutter cannot parse content:// URIs natively #4

Closed
bagintz opened this issue Jun 19, 2019 · 7 comments
Closed

Dart/Flutter cannot parse content:// URIs natively #4

bagintz opened this issue Jun 19, 2019 · 7 comments

Comments

@bagintz
Copy link

bagintz commented Jun 19, 2019

I may be missing something, but while I am successfully getting the Content URI (i.e. content://com.google.android.apps.photos.contentprovider/0/1/content%3A%2F%2Fmedia%2Fexternal%2Fimages%2Fmedia%2F41076/LARGE/JPG/1337981437), I am unable to actually retrieve the file in Flutter due to this issue:

flutter/flutter#25659

Does this sound right?

@KasemJaffer
Copy link
Owner

Please use this library to get the absolute path that will work with the dart class File

https://pub.dev/packages/flutter_absolute_path

@KasemJaffer
Copy link
Owner

dart/flutter does not support android content uri yet as far as my knowledge

@bagintz
Copy link
Author

bagintz commented Jun 20, 2019

Right, but this library returns, in flutter, the content uri through the message channel. So we get the image uri, but we can't do anything about it. Unless I am missing something this makes the plugin unusable for sharing images. Right?

@KasemJaffer
Copy link
Owner

Unfortunately yes, or at least with this library alone. I forgot to mention this in the documentation. My plan is to make this library return the absolute path instead of a reference uri. In the meantime, please use this library in conjunction with the library i mention above.

@KasemJaffer
Copy link
Owner

KasemJaffer commented Jun 20, 2019

I am open to pull requests if anyone is interested.

@KasemJaffer
Copy link
Owner

The api now returns a path that can directly be used with File.dart

@bagintz
Copy link
Author

bagintz commented Jun 24, 2019

Awesome work @KasemJaffer Thank you!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants