Android Question Is it possible to close a B4A app?

maloney

New Member
Licensed User
Longtime User
Realizing this has been asked several times, and I've seen many answers and suggestions.
All of which I've tried to no avail. Is there any sample B4A app, that once closed will not continue to run?

I've tried

Dim jo As JavaObject:jo.InitializeContext:jo.RunMethod("finishAffinity", Null)
tmrOktaAuthCheck.Enabled = False:tmrOktaGetUserInfo.Enabled = False:
tmrOktaLogoutCheck.Enabled = False:tmrShowTitle.Enabled = False
Activity.CloseMenu:Activity.DisableAccessibility(True):Activity.Finish:
pnlMain.RemoveAllViews
ExitApplication

Nothing seems to work, the app I am testing this with consists of only a single button to execute the code.
I'm wondering if someone has a sample app that I can try that actually will unload when 'closed' or is this impossible with B4A?
 

JohnC

Expert
Licensed User
Longtime User
ExitApplication usually does the trick.

But I have some questions...

1) Are you running any services?
2) Does your app call 'startserviceatexact' or 'startserviceat'?
3) What exactly is making you think that your app is still running? Is the Activity still visible? Do you see your app in some type of system task manager? Etc?
 
Upvote 0
Top