I start the second action when my first action is paused.
FirstActivity.java
@Override
public void onPause(){
super.onPause();
startActivity(new Intent(this, SecondActivity.class));
}
When I click on the home screen button, SecondActivity will start, but with a delay. There is enough time in this delay to open a new application (for example, a messenger). However, when I open a new application, SecondActivity will no longer start (it will not even call the onCreate SecondActivity method).
How can I launch SecondActivity even when I open a new application?
source
share