1

I have a MediaBrowserServiceCompat that is hooked up to Android Auto as a music player. Everything is peachy, onCreate, onGetRoot, and onLoadChildren are all called as they should be.

The problem is if the underlying music is changed (loading a new playlist, shuffling, etc) I can't figure out how to tell Android Auto that it needs to call onLoadChildren(...) again. Is there a way to tell it that things have changed? I tried calling:

 notifyChildrenChanged(rootId);

but that didn't seem to work.

Haroun Hajem
  • 5,223
  • 3
  • 26
  • 39
user2199860
  • 788
  • 4
  • 14
  • 2
    Loading a new playlist and shuffling seem like things that would change the queue (and therefore be things reflected through the [setQueue API](https://developer.android.com/reference/android/support/v4/media/session/MediaSessionCompat#setQueue(java.util.List%3Candroid.support.v4.media.session.MediaSessionCompat.QueueItem%3E)) as part of your `MediaSessionCompat`, not something reflected in your `MediaBrowserServiceCompat`'s structure? – ianhanniballake Jul 18 '20 at 01:20

0 Answers0