R racleta31 Member Jul 1, 2021 #1 Hello I have to check if it is the first time an activity is started. Something like the FirstTime boolean in B4A. Thank you!
Hello I have to check if it is the first time an activity is started. Something like the FirstTime boolean in B4A. Thank you!
Erel B4X founder Staff member Licensed User Longtime User Jul 1, 2021 #2 Tip: don't use activities in B4A. Switch to B4XPages and everything will be simpler. B4XPages project: B4X: 'B4XMainPage: Private Sub B4XPage_Created (Root1 As B4XView) Log("This code will only be executed once when the program starts") Non-B4XPages project in B4J: B4X: Sub AppStart (Form1 As Form, Args() As String) Log("This code will only be executed once when the program starts") Upvote 0
Tip: don't use activities in B4A. Switch to B4XPages and everything will be simpler. B4XPages project: B4X: 'B4XMainPage: Private Sub B4XPage_Created (Root1 As B4XView) Log("This code will only be executed once when the program starts") Non-B4XPages project in B4J: B4X: Sub AppStart (Form1 As Form, Args() As String) Log("This code will only be executed once when the program starts")