I've just started learning about content providers and MediaStore, but there is one thing that I can't figure it out and the documentation on MediaStore is really poor. I understand that android uses a database to keep information about media files, for speed and power consumption reasons, and I saw it's fields, but I don't see how the mapping between database entries and and files is made. For example audio media has album, artists etc., but I couldn't find a field like path or something, also they don't provide a schema or something to help me understand the relations between all these elements.

有帮助吗?

解决方案

The MediaStore.MediaColumns.DATA column is what you're looking for. That column has the file path to the particular file stored in it.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top