Closed adam-codersgu closed 1 year ago
Working on branch feature/media_store_content_observer
Useful resources: Github with implementation: https://github.com/vegaasen/mediaSnuggler/blob/master/src/main/java/com/gtfo/snuggle/upnp/content/MediaStoreObservers.java Android doc: https://developer.android.com/reference/android/database/ContentObserver StackOverflow answer: https://stackoverflow.com/questions/12546967/android-how-to-detect-a-change-in-mediastore-when-connected-over-mtp
Need to test whether this observer detects deletions and insertions
Should have a system for preventing simultaneous requests to update the music library, but note that a new request was received and process it when ready
Implemented and merged https://github.com/adam-codersgu/supernova/pull/38
Currently, the user's music library is refreshed whenever they open or return to the app. It would be preferable (and potentially less code intensive) to instead monitor the media store directly via some form of observer. I believe this is possible. If such a feature can be implemented, then it would allow the music library to be updated in realtime