I have a service that handles the incoming in-app message. The app has a SplashActivity, MainActivity and a second Activity which is called to display this in-app message from the Service. The in-app is getting displayed in the SplashActivity if the mainActivity takes a longer time to launch. How do I ensure that the in-app message activity(which is initiated by the service) is called only after the MainActivity is being displayed to the user.
I saw a similar issue in Firebase In-App Messaging showing in SplashActivity. How to show it in MainActivity?, but I have my own implementation of the in-app message handling.