I am integrating Firebase In-App Messaging feature in my application and when I am testing it on my device the message is not being displayed in the application.
I go from SplashActvity to MainActivity and the message is being displayed on both the screens but is dismissed as soon as the onDestroy method of SaplshActivity is called. The SplashActivity uses Handler for going to the MainActivity with 1500 milliseconds of duration. The message is auto-disappearing when onDestroy of SplashActivity is called.
Code for going to MainActivity
new Handler().postDelayed(new Runnable() {
@Override
public void run() {
Intent intent = new Intent(SplashActivity.this, MainActivity.class);
startActivity(intent);
finish();
}
}, 1500);
Is there any way to directly open the message in MainActivity?
I've visited the following links for the search of this answer but I am not getting any help.
Any help will be appreciated. Thanks in advance.