I want to start a new activity and close the current activity at the same time (to prevent users going back to the current activity once they are in the new one).
I'm using this code:
However, it seems that in about 50% of the cases, Activity.Finish destroys the current activity without having had the chance to start the new activity. This means the program just quits instead of going to the next activity.
Is there something Activity.Finish should wait for, before I fire this function?
I'm using this code:
B4X:
StartActivity(name_of_new_activity)
Activity.Finish
However, it seems that in about 50% of the cases, Activity.Finish destroys the current activity without having had the chance to start the new activity. This means the program just quits instead of going to the next activity.
Is there something Activity.Finish should wait for, before I fire this function?