Sub Globals
Dim xjob As HttpJob
End Sub
Sub Activity_Create(FirstTime As Boolean)
xjob.Initialize("Job1", Me)
xjob.Download("http://www.google.com")
ProgressDialogShow("Checking internet...")
End Sub
Sub JobDone(job As HttpJob)
If job.JobName="Job1" AND job.Success=False Then
'Exit app if download failed
ProgressDialogHide
Msgbox("Sorry but this application needs internet.","Fail!")
ExitApplication
End If
job.Release
StartUp
End Sub
Sub StartUp
ProgressDialogHide
'All initialization things...
Activity.LoadLayout("Layout1")
End Sub