-
-
Notifications
You must be signed in to change notification settings - Fork 0
Description
Issue
As I work on the AudioPlayerService
for Android Auto its apparent that managing/creating the UserComponent
part of our graph in the UI layer (i.e. UserComponentContent
) is the incorrect way to manage this as the UserComponent can be null/missing at critical parts of the apps lifecycle. i.e when AndroidAuto or some other MediaBrowser
attempts to initialize our AudioPlayerService
to serve content and populate remove browser views.
Solution
We should move the management of this scope/component to the Application initialization step (i.e. CampfireApplication
or its related variants for different platforms) and leverage the existing component observability in ComponentHolder.subscribe<UserComponent>()
to drive UI changes.
This way when a remote process starts our app process, we will have constructed our full graph and will be available to the service without having to render the entire application.