When the app start it check if the user (by device ID,) exist on database. if not, it open the profile activity.
After save and create the user, i' d like go back to main activity, but here return the problem that the main activiti don 't load as well..
Move "isUserExist" From Activity_Create to Activity_Resume
B4X:
Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
'Activity.LoadLayout("main")
Drawer.Initialize(Me, "Drawer", Activity, 300dip)
Drawer.CenterPanel.Color = Colors.RGB(0,124,245)
Drawer.LeftPanel.LoadLayout("LeftMenu")
Drawer.CenterPanel.LoadLayout("main")
If FirstTime Then
' isUserExist
End If
End Sub
B4X:
Sub Activity_Resume
isUserExist
LoadSlideMenu
UpdateGUI
End Sub
In this way it seems to work, at least to me it goes on ...