Sub Process_Globals
Dim hc As HttpClient
Dim out As OutputStream
End Sub
Sub Globals
End Sub
Sub Activity_Create(FirstTime As Boolean)
If FirstTime Then
hc.Initialize("hc")
End If
Dim req As HttpRequest
req.InitializeGet("http://xxx.xxx.xx")
hc.Execute(req, 1)
End Sub
Sub Activity_Click
out.Close
End Sub
Sub hc_ResponseSuccess (Response As HttpResponse, TaskId As Int)
out = File.OpenOutput(File.DirRootExternal, "1.dat", False)
Log("Getting file asynchronously")
response.GetAsynchronously("res", out, True, TaskId)
End Sub
Sub hc_ResponseError (Response As HttpResponse, Reason As String, StatusCode As Int, TaskId As Int)
End Sub
Sub res_StreamFinish (Success As Boolean, TaskId As Int)
Log("StreamFinish: " & Success)
If Success = False Then Log(LastException.Message)
End Sub
Sub Activity_Pause(UserClosed As Boolean)
End Sub
Sub Activity_Resume
End Sub