hI, There a way to display the content that is going down a httpjob in a listview before this is over?
I have this code to read the content of the data downloaded.
I have this code to read the content of the data downloaded.
B4X:
Sub [B]JobDone[/B] (Job As HttpJob)
Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
If Job.Success = True Then
Select Job.JobName
Case "Job1"
Log("JOB 1")
Dim parser As JSONParser
parser.Initialize(Job.GetString)
Dim root As List = parser.NextArray
For Each colroot As Map In root
Dim date As String = colroot.Get("date")
Dim thumb_url As String = colroot.Get("thumb_url")
Dim video_url As String = colroot.Get("video_url")
Dim author As String = colroot.Get("author")
Dim audio_url As String = colroot.Get("audio_url")
Dim title As String = colroot.Get("title")
List1.Add(date)
List2.add(trim_string2(thumb_url))
Log(trim_string2(thumb_url))
List3.Add(video_url)
List4.Add(RemoveAccents(author))
List5.Add(audio_url)
List6.Add(trim_string(title))
Log(trim_string(title))
ListView1.AddTwoLinesAndBitmap( trim_string(title),trim_string(title),LoadBitmapSample(File.DirAssets,"play2.png",15dip,15dip))
Next
' For x = 1 To List1.Size -1
' ListView1.AddTwoLinesAndBitmap( List6.Get(x),List4.Get(x),LoadBitmapSample(File.DirAssets,"play2.png",15dip,15dip))
' Next
End Select
Else
Log("Error: " & Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
Return
End If
Job.Release
Log("JOB RELEASE")
End Sub
[\code]
listview display all data ok, but just web the job is finished.
thanks
victor