I'm new here and have only been using Basic4Android for a few days but have run into a similar problem.
I have two activities: Main and Home.
I wanted to give the user the ability to either Logout and go back to Main or Exit the app completely. If they chose to Logout, I was using Activity.Finish. If they wanted to Exit the app, I was using ExitApplication.
However, regardless of what they selected, Main would always restart.
Here is my solution that so far has worked for my app:
For the Main module:
I added to the Sub Process_Globals:
Public killApp As Boolean
Then I added this code to the Sub Activity_Create(FirstTime As Boolean):
If killApp = True Then
Activity.Finish
End If
For the Home module:
I added this code:
Sub btnLogout_Click
If Msgbox2("Do you want to close the app?", "Close App","Yes","","No", Null) = DialogResponse.POSITIVE Then
Main.killApp = True
Else
Main.killApp = False
End If
Activity.Finish
End Sub