Domanda

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.

È stato utile?

Soluzione

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

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top