문제

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