I am making an Android Auto based media player. I really have one page of media that can be played, but sometimes the titles of these items change. Lets say the first item says 'news of the hour for 12pm' and then it changes to 'news of the hour for 1p'.
onGetRoot is called, then I populate my media items in onLoadChildren. I make ArrayList at the time of launch, but these items can change.
How do I programmatically alter the MediaItem objects already loaded into the UI?
This is exactly what the
notifyChildrenChanged()method onMediaBrowserServiceCompatis for - calling that will invalidate the data returned byonLoadChildrenand cause the system to callonLoadChildrenagain to retrieve your updated data.