I want to create functionality to upload media files to my server. So i need to create custom Gallery with multiselection. I can achieve this using RecyclerView and data from ContentResolver like this and this. But this way is VERY long! It takes up to 60 seconds to load all media files via ContentProvider. I see some Gallery apps in PlayMarket:
2) Gallery
And there are a lot of similar apps. All of them load media on fly, without any delay.
Can anybody tell me how can i obtain all local photos and videos URLs? Do i need to go through all files and folders and collect URLs with specific suffixes?