I've checked that if I press home button on that API, the current activity finishes, when I don't want that to happen.
I've already checked in API 22 and API 23 that if home button is pressed, on these APIs, activity is not finished and can be restarted from the point it was.
I thought that maybe on API versions prior to 22 the button had by default that behavior, so it couldn't be helped, but I've checked that in API 19 I get the desired behavior. It looks strange that they just chose one API to offer that behavior but... maybe it is what it's happening.
The code for onStop() that's launched is pretty straightforward:
@Override
protected void onStop()
{
try {
toast.cancel();
}
catch (Exception d)
{
}
super.onStop();
}
Is this a default behavior for API 21 for the home button press, and it cannot be helped, or is there any way to cause the button press not to cause to finish the activity?