Sub JobDone(Job As HttpJob)
If Job.Success Then
Dim res As String
res = Job.GetString
ProgressDialogShow("Consultando, Por Favor Espere...")
Dim id,titulo,precio,proveedor As String
Dim parser As JSONParser
parser.Initialize(res)
Dim l As List
l.Initialize
l = parser.NextArray
If l.Size <> 0 Then
If contmin = 1 Then
btnback.Visible = False
Else
btnback.Visible = True
End If
Dim links As Map
Dim cont As String
links.Initialize
cont = l.Size
If cont >= 9 Then
cont = 10
btnnext.Visible = True
Else
cont = l.Size
btnnext.Visible = False
End If
For i = 0 To cont -1
Try
Dim m As Map
m = l.Get(i)
id = m.Get("id")
titulo = m.Get("titulo")
precio = m.Get("precio")
proveedor = m.Get("proveedor")
ivs.Get(i)
links.Put(ivs.Get(i), "http://www.miservidor.com/market/store/"&id&proveedor&".jpg")
llenar(titulo,precio,id,i)
Catch
Log(LastException)
ToastMessageShow(LastException,True)
End Try
Next
CallSubDelayed2(ImageDownloader, "Download", links)
End If
Else
Log(Job.ErrorMessage)
ToastMessageShow("Error: " & Job.ErrorMessage, True)
End If
Job.Release
ProgressDialogHide
End Sub