Android Question end app

MarkusR

Well-Known Member
Licensed User
Longtime User
hello,
me saw that if me using Activity.Finish in main Activity and click then at the app icon again
the Activity will created again and all variables here are still there with used values before i closed the activity.

B4X:
Sub Process_Globals
    'These global variables will be declared once when the application starts.
    'These variables can be accessed from all modules.

how can i end the app correct and free this process for a clean start?
 

Star-Dust

Expert
Licensed User
Longtime User
SDK 16+
B4X:
Dim jo As JavaObject
 jo.InitializeContext
 jo.RunMethod("finishAffinity", Null)
 
Upvote 0

walterf25

Expert
Licensed User
Longtime User
thank you.
i read it finished all Activitys, does it clear this Process_Globals too?
i will test later.
You can also reset all variables before you close the Activity.

Regards,
Walter
 
Upvote 0
Top