Sometimes I get the following error
Performing stop of activity that is not resumed:
I have MainActivity
that in the onCreate
check if it is the first time the user opens the app to open another welcome activity OnBoarding
and is when you press backspace or jump button, when the error appears.
protected void onCreate(Bundle savedInstanceState) {
...
Intent intent = new Intent(MainActivity.this, OnBoardingActivity.class);
startActivity(intent);
...
}
I think the error is that sometimes I do not allow time for MainActivity
to be saved in the stack of the stack and when calling another activity immediately, when you want to go back there is no reference to anything.