0

I have my media playback app working pretty well, the only issue from my testing, there is an edge case where media can be added on the phone, but it's not reflected in the browsing view in Android Auto until the phone is disconnected and reconnected.

I'm trying to trigger a update message, but having trouble finding the correct call using media3 and MediaLibraryService.

I've got as far as publishing a broadcast message from my media database that's been updated and catching it in my MediaLibraryService, however I can't find anything in the documentation that indicates how I might trigger an update that Android Auto is aware of.

Mike Macpherson
  • 456
  • 4
  • 12
  • I assume you are searching for the standard way to update MediaStore db https://stackoverflow.com/q/3300137/150978 – Robert Aug 01 '23 at 20:01
  • No, this is not local media items, but streams loaded into media3 mediasession. I can update the session, however the browser in android auto isn't updated. – Mike Macpherson Aug 02 '23 at 05:30

1 Answers1

0

I think the MediaLibraryService.MediaLibrarySession::notifyChildrenChanged methods may be what you're looking for.

Ben Sagmoe
  • 440
  • 2
  • 9
  • This was my first port of call, and have tried this, and it didn't seem to do very much at all, I tried both overloads, and neither refreshed browser in Android Auto. Anyone know for sure this works correctly in media3 1.1.0? Or are there any undocumented gotchas? – Mike Macpherson Aug 02 '23 at 20:21