Extract size and file name from a content:// Uri in Android
So, you have a content:// Uri that you want to extract file name and file size from, here is a utility with code coverage that’s going to save you some time…
Why save time?
Because, it is not provided by any of the Android support/android-x APIs and trust me it did take me some good amount of research to find out…So, without further ado:
And here is the complete source code for reference:
Contribute to mankum93/UriUtilsAndroid development by creating an account on GitHub.
Feel free to share your queries.
Thanks for the read. Have a great day!