Android Question [SOLVED] [B4X] MainPage FirstTime

makis_best

Well-Known Member
Licensed User
Longtime User
Hello

With the Default method on Activity_Create we can check FirstTime run.
With B4XPages how we can check FirstTime?

Thank you.
 
Last edited:

LucaMs

Expert
Licensed User
Longtime User
An (not exactly my real project) example:

B4X:
Private Sub B4XPage_Created (Root1 As B4XView)

End Sub

' Code to be executed once only.
B4X:
    ' Animated splash screen.
    Wait For (mSplash.StartSplash(1500)) Complete(Unused As Boolean)
    '...
    Wait For Ssl_SslIssueFixed(SslIssueFixed As Boolean)
    If Not(SslIssueFixed) Then
        ' ...
        MsgboxAsync(Message, Title)
        Wait For Msgbox_Result (Result As Int)
        CallSub(Main, "CloseApp")
    End If

B4X:
Private Sub B4XPage_Appear
    Wait For (RetrieveNewDataForSomeSource) Complete (Updated As Boolean)
    If Updated Then UpdateDataViews
    '...
End Sub

How would you, Erel, avoiding the "complexity" of using that simple module-level variable like in my post #7?
 
Upvote 0
Top