mohsen programmer
Member
Hello,
I am having a problem navigating to the SignInPage in the B4XMainPage and B4XPage_Created event.
The code I am using is as follows:
This code is supposed to check if the user is logged in or not. If the user is not logged in, they should be redirected to the SignInPage. However, when I run this code, it does not redirect to the SignInPage and remains on the B4XMainPage.
Please provide guidance on how to resolve this issue.
I am having a problem navigating to the SignInPage in the B4XMainPage and B4XPage_Created event.
The code I am using is as follows:
B4X:
Private Sub B4XPage_Created (Root1 As B4XView)
root=Root1
If Login=False Then
Dim SignInPage As SignInPage
SignInPage.Initialize
B4XPages.AddPage("SignInPage",SignInPage)
B4XPages.ShowPageAndRemovePreviousPages("SignInPage")
End If
End Sub
Please provide guidance on how to resolve this issue.