I am providing a MediaBrowserService to be used by MediaBrowsers.
How do I programmatically restore the browser path as a MediaBrowserService?
- Use-case: User starts at root and clicks through some browse-able items. I remember the path he took by storing each mediaId.
- The user closes the MediaBrowser.
- 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:
- 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]
- User stops app.
- 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?