Wish Stop Services & Activitys automatically when using 'ExitApplication'

aaronk

Well-Known Member
Licensed User
Longtime User
Hi,

In VB we can use the code 'End' and that will close the application, I wish the similar thing could be done in B4A.

In many threads Erel has suggested that you need stop all Services and make sure all activity's are closed before running the code 'ExitApplication'.

I wish there could be a script we could use and it will automatically close all activity's a stop all services for us without having to worry about which service and activity's are still running.

So for example, when you run the code 'ExitApplication' make it automatically stop all services in our app and close all activity's then fully close the app like what 'ExitApplication' is currently doing. This way we only need to worry about 1 line of code to close the app.
 

aaronk

Well-Known Member
Licensed User
Longtime User
I have been using Activity.Finsih in all my Activity's to close them.

For some reason some of the users using my app say they needed to force close the app before they open it again as it's not working correctly unless they do that.
For some reason on my 4 devices, I don't need to do this and I don't get this issue.
 

EddyW

Member
Licensed User
Longtime User
I noticed that if you close with activity.finish and restart the app directly again some variables are still in memory.
In my case it was variables that are in a code module and are not directly closed after a activity.finish (takes a few seconds in my case)
 
Top