In this example you have 3 activity, Main, act_due, act_tre
The main call act_due, if you click button open act_tre, if you click on button ( in act_tre ) reopen act_due and so...
Look this code. If you have this code in act_due:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("lay_due")
If FirstTime Then
Log("First Time DUE")
Else
Log("Run Again Activity_create DUE")
End If
End Sub
Sub Button1_Click
StartActivity(act_tre)
End Sub
When you click on button act_tre reopen act_due the Activity_create it ISNT executed, but it will go directly to Resume
if you write this code:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("lay_due")
If FirstTime Then
Log("First Time DUE")
Else
Log("Run Again Activity_create DUE")
End If
End Sub
Sub Button1_Click
StartActivity(act_tre)
Activity.Finish ' <--------------- LOOK THIS
End Sub
When you click on button act_tre reopen act_due the Activity_create you see message in Log windows "Run Again Activity_create DUE" because in this cases Activity_create is executed with FirstTime = False
Anyway i don't see any reason, since you can manage everything in Pause / Resume