Very Very strange - hard to explain, but I will try
following my last posts, that I was unable to free RAM and CPU and had to use both commands:
Activity.Finish
ExitApplication
which solved the problem
I have also 3 menu item
Activity.AddMenuItem
problem is:
if I click on menu button called exit that runs:
so, if I click on it from main module - app is exisiting
if I am moving to different module using one of the other button (for example moving for settings layout)
and from their I execute the same code, the app is exiting and STARTING once again !!!!
To make it even starnger:
if I put breaking point on the line ExitApplication and press F8, it will exit ok
if I remove the breaking point it will loop again (close the app and start the app)
Any idea what is going on ???? :BangHead:
following my last posts, that I was unable to free RAM and CPU and had to use both commands:
Activity.Finish
ExitApplication
which solved the problem
I have also 3 menu item
Activity.AddMenuItem
problem is:
if I click on menu button called exit that runs:
B4X:
Sub mnuExit_click
Dim result As Int
result = Msgbox2("Are you sure you want to exit?" ,"Exit","Yes","No","",LoadBitmap(File.DirAssets,"exit.ico"))
If result = DialogResponse.Positive Then
If Main.ScreenSaver = True Then
Main.Awake.ReleaseKeepAlive
End If
StopService(ServiceModule)
Activity.Finish
ExitApplication ' Kill the app
End If
End Sub
if I am moving to different module using one of the other button (for example moving for settings layout)
and from their I execute the same code, the app is exiting and STARTING once again !!!!
To make it even starnger:
if I put breaking point on the line ExitApplication and press F8, it will exit ok
if I remove the breaking point it will loop again (close the app and start the app)
Any idea what is going on ???? :BangHead: