Let's say my application has several activities. When I come to the first activity, I will initiate an api call. User won't be blocked during this api call and can navigate to other activities during this time.The status of this api call can be observed by any activity that is in foreground. After api success, data will be populated on the current activity. We can use a service for this and bind the foreground activity to the service. But can we use a workmanager for this? I see that workmanager is designed for deferrable works. Can we use it for immediate works like making an api call to populate the ui without showing notification to the user? I don't want to show any notification to the user, as api call will only occur while application is in foreground.
https://www.youtube.com/watch?v=kpuMD2P7s5M says work manager does support immediate work. So I think it's safe to use workmanager.