Are there any custom open-source libraries that don't rely on the default MediaStore (so that I don't reinvent the wheel)? Or do I have to write my own scanner? The problem:-

I've created a music player in Android that can also create playlists from local files. The details about the local media is obtained from Android's MediaStore. Everything works fine until I relocate my music files. When a media file is moved, the ID field in its entry in the Android MediaStore gets changed. Obviously that means any attempts to get to the file using the stored (stale) ID's will fail. How do I get around this? Thanks!

有帮助吗?

解决方案

You are able to manually refresh the content of the Media library. Read this related post - I think you will find it useful!

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