I am desperately trying to send a captured video to a server. The problem is that the URI that is given by the built-in camera application is not the real file path. It looks like this - /content:/media/external/video/media/19
.
How can I access the real path or the data directly from this kind of URIs?
After reading the android documentation I saw that it looks like a content provider's notation, but I still don't have a clue how to reach the data that I need. Please help!!!
thanks in advance
How can I access the real path or the data directly from this kind of URIs?
You don't. It might not exist as a file. Or, it might not exist as a file that you can read except via the ContentProvider
.
Instead, use a ContentResolver
to open an InputStream
on that Uri
, and use that InputStream
to transfer the data to a server.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With