Android Question Activity_Pause(False) when Home Button is used

Cableguy

Expert
Licensed User
Longtime User
Hi Guys,

I know we cannot interfere in any way with the behaviour of the Home Button, BUT, shouldn't it return True in Activity_Pause?
I mean, the activity goes in background because the user clicked the Home Button!!!

My reason for asking this is that, I usually only show adds on app exit, that is 'Activity_Pause(True)' , but from my own usage I can see that most of the times I exit any app with the use of the Home button... so no adds will be shown...

Is there any way around this?
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
When the user presses on the back key the activity is destroyed (closed). Same as calling Activity.Finish.

When the user presses on the home key the app moves to the background. The activity is not destroyed. If the user starts the app again then Activity_Create will not be called as the activity was not destroyed (assuming that the OS hasn't yet killed the process).
 
Upvote 0
Top