Sub Button4_Click
Dim FileUrl As String
FileUrl = "http://192.0.0.1/1234.xml"
HttpUtils.CallbackActivity = "Main" 'Current activity name.
HttpUtils.CallbackJobDoneSub = "JobDone"
HttpUtils.Download("Job1", FileUrl)
End Sub
Sub JobDone (Job As String)
Dim filename,fileurl As String
fileurl = "http://192.0.0.1/"
filename = "1234.xml"
If HttpUtils.IsSuccess(fileurl&filename) Then
Dim out As OutputStream
out = File.OpenOutput(File.DirRootExternal,filename, False)
File.Copy2(HttpUtils.GetInputStream(fileurl&filename), out)
out.Close
ProgressDialogHide
ToastMessageShow(filename&" Downloaded OK!", False)
End If
End Sub