In my app I need to load a feed of some data from server(using retrofit) that is loaded in a dedicated viewmodel. What happens currently is that the viewmodel calls the repository in its constrcutor, and then once the data is fetched , the observing fragment in the main activity is notified and changes the ui accordingly.
However, suppose I want to fetch that data during the splash/launcher activity, what would be the implementation for it using MVVM? I mean, since the viewmodel is associated with only one activity, we can't share the same viewmodel accross both activities.
So how could we load the remote server data in Launcher Activity, and then use that in Main Activity?
What are the best practices in this case?