#Region Module Attributes
#FullScreen: True
#IncludeTitle: False
#ApplicationLabel: URL Test
#VersionCode: 1
#VersionName: 1.0
#SupportedOrientations: portrait
#CanInstallToExternalStorage: True
#End Region
Sub Process_Globals
End Sub
Sub Globals
Dim line As String
Dim TextReader1 As TextReader
End Sub
Sub Activity_Create(FirstTime As Boolean)
'If FirstTime Then
'End If
Dim MyJob As HttpJob
MyJob.Initialize("MyJob", Me)
MyJob.Download("http://www.amazon.com")
End Sub
Sub Activity_Resume
End Sub
'Event handler for Job Done
Sub JobDone(Job As HttpJob)
Dim TextReader1 As TextReader
Dim line As String
TextReader1.Initialize(Job.GetInputStream)
'Read first line from html page
Dim i As Int
For i=1 To 10000
If line.IndexOf("</html>")>-1 Then 'Marker for end of page
Exit
End If
line = TextReader1.ReadLine
Log(line)
Next
Log("Lines in string: " & i)
Job.Release
End Sub