MediaBrowserService Restore browser path programmatically

Viewed 12

I am providing a MediaBrowserService to be used by MediaBrowsers.

How do I programmatically restore the browser path as a MediaBrowserService?

  1. Use-case: User starts at root and clicks through some browse-able items. I remember the path he took by storing each mediaId.
  2. The user closes the MediaBrowser.
  3. The next time the user starts the MediaBrowser I want my MediaBrowserService to automatically return to the last remembered mediaId through onLoadChildren(). -> This way the user can see the end content of his last browse but the back button is not available as I do not restore the whole path he took.

How can I achieve this?

Abstract analogous example is:

  1. User browses a folder A, then subfolder B. -> onGetRoot() is called, then onLoadChildren(Root) [which is returning content of root], onLoadChildren(A) [which is returning content of A], onLoadChilren(B) [which is returning content of B]
  2. User stops app.
  3. User starts app again. -> onGetRoot() is called, then onLoadChildren(Root) -> this time I want to restore the user to the last state so I return the content of onLoadChildren(B) instead -> the user sees the content of onLoadChildren(B) but now he is not able to navigate back

How could I achieve this?

0 Answers
Related