Sub Activity_Create(FirstTime As Boolean)
'Do not forget to load the layout file created with the visual designer. For example:
Activity.LoadLayout("LO_Welcome")
lblversion.Text="Ver. No. 1.55 Rel. Sep - 2019"
lblversion.TextSize=10
'create directory if not present
'File.Delete(File.DirInternal&"/MyAppxyz/Database/","xyz.db")
If File.IsDirectory(File.DirInternal,"xyz")=True Then
If File.IsDirectory(File.DirInternal& "/xyz","Metafiles")=True Then
' do nothing
Else
File.MakeDir(File.DirInternal& "/xyz","Metafiles")
End If
If File.IsDirectory(File.DirInternal& "/xyz","Database")=True Then
' do nothing
Else
File.MakeDir(File.DirInternal& "/xyz","Database")
End If
If File.IsDirectory(File.DirInternal& "/xyz","Temp")=True Then
' do nothing
Else
File.MakeDir(File.DirInternal& "/xyz","Temp")
End If
Else
File.MakeDir(File.DirInternal, "xyz")
File.MakeDir(File.DirInternal& "/xyz","Metafiles")
File.MakeDir(File.DirInternal& "/xyz","Database")
File.MakeDir(File.DirInternal& "/xyz","Temp")
End If
End Sub
Sub btnLogin_Click
Dim ServerURL As String=""
ServerURL="http://xxx.com/yyy.aspx"
If File.Exists(File.DirInternal&"/xyz/Database", "xyz.db") = False Then
job1.Initialize("Job1",Me)
job1.Download2(ServerURL,Array As String("Cmpycode","100"))
Return
End if
End Sub
Sub Jobdone(Job As HttpJob)
If Job.Success =True Then
Select Job.JobName
Case "Job1"
If job1.GetString.Contains("Names") Then
job1.Release
StartActivity("frmLogin")
Else
bFlagInternetConnection=False
ToastMessageShow("Internet Connection Not Found",bFlagInternetConnection)
End If
End Select
End If
End Sub