Activity.Finish does not finish

JakeBullet70

Well-Known Member
Licensed User
Longtime User
I have been working on a card game and I cannot get Activity.Finish to end the game.

Here is the log

Installing file.
PackageAdded: package:sad.TwoDPoker
** Activity (main) Create, isFirst = true **
** Activity (main) Resume **

I exit the program here by calling Activity.Finish

** Activity (main) Pause, UserClosed = true **

now I start the program again

** Activity (main) Create, isFirst = false **
** Activity (main) Resume **

I notice that isFirst is false so I am thinking that Activity.Finish did not unload everything????

:sign0085:
 

Erel

B4X founder
Staff member
Licensed User
Longtime User
then how does one truly close an app
You should let the OS handle the process. FirstTime should be used to load resources that are required for your program.

You can decide for example that if the user presses on the back key then the program returns to the starting state. It doesn't mean that you need to kill the process. See StateManager module and the code in Activity_Pause.
 
Upvote 0
Top