OnAppPause - onAppStop - onAppDestroy │ CloseApp - CloseScreen

If the app is closed, no event is triggered. However, when the screen is closed, all events (onPause, onStop, onDestroy) are triggered.

To check this:
activityLifecycle.apk (4.7 MB)

Events in chronological order (ascending):
→ OnPause → OnStop → OnDestroy
in my tests with the APK on Android 12.

6 Likes

1 Like

It seems that

“Close screen block will destroy the screen activity while the exit application just calls System.exit(0) that would terminate the app almost immediately.”
as @Kumar wrote to me via PM on AI2.

So that seems to be the reason there is not enough time to trigger the events.

May I post this @Kumar? If not, I’ll delete it again. :wink:

1 Like

Yeah thats right

2 Likes

Since my apps usually only have 1 screen open at the same time, I usually only use the closeScreen block.
Then all events are triggered.

Then there’s no reason to use the closeApplication block either.