Hi guys,
I am confuse here, isn't it Activity Create always executed when App start?
I have app that runs on background via service.
First run was OK, Activity Create was executed.
But when app forced closed and then run again, it seem that on the second run, Activity Create not executed.
Here are my codes from main activity
Is this normal or something wrong with the codes?
I am confuse here, isn't it Activity Create always executed when App start?
I have app that runs on background via service.
First run was OK, Activity Create was executed.
But when app forced closed and then run again, it seem that on the second run, Activity Create not executed.
Here are my codes from main activity
B4X:
Sub Activity_Create(FirstTime As Boolean)
Log("created")
Private DvId As Object
DvId = SQLTbl.ExecQuerySingleResult("SELECT DEV_ID from M_DEV_ID")
If DvId = Null Then
Activity.LoadLayout("lyAgreement")
Else
btnAgree_Click
End If
End Sub
Sub btnAgree_Click
Private DvId As Object
DvId = SQLTbl.ExecQuerySingleResult("SELECT DEV_ID from M_DEV_ID")
If DvId = Null Then
Private Id as int
Id = GetDevId
SQLTbl.ExecNonQuery2("INSERT INTO M_DEV_ID(DEV_ID) VALUES (?)", Array As Object(ID))
End If
Activity.Finish
StartActivity(modMain)
End Sub
Is this normal or something wrong with the codes?