I am revising an Android music-player app and have been forced to embrace using MediaStore
and ContentResolver
to access music file data as a result of the gradual closing-off of access to the external-storage filesystem.
So, I am populating my app's own database with records from Android's MediaStore content provider (whereas in my earlier version it was entirely populated by using MediaMetadataRetriever
to read the metadata directly from the file). So far so good and the MediaStore has a pretty comprehensive collection of metadata fields. With, it seems, one critical exception but perhaps I am being blind. The exception is a field to record the position of a track/song in an album.
This data is usually obtainable using MediaMetadataRetriever.METADATA_KEY_CD_TRACK_NUMBER (which itself is a somewhat kludgy proxy, but works in most cases).
My question then, is, where in the maze of inner classes and interfaces that is the android.provider.MediaStore metadata definition framework is the field equivalent to MediaMetadataRetriever.METADATA_KEY_CD_TRACK_NUMBER? Or is it really absent?