Android Question Okhttputils2 after update

Luis Felipe Andrade

Member
Licensed User
Hello, after last update (11.50), If I try to download a jpg image from some server I had this error message:
ResponseError. Reason: Precondition Failed, Response: Critical error: no domain selected!

But the same code works for years, Please help. Tanks in advance!

Image Download:
If pimagen(yy,0)<>"" Then
If File.Exists (File.DirDefaultExternal & "/bzmonitor/imgevento" , pimagen(yy,0)) Then
' if exist do nothing
    Else
    Dim j As HttpJob
    j.Initialize(" ",Me)
    'this line generate the error'
    j.Download( "http://" & "http://myserver.com.mx" & "/" & "webdirectory" & "/" & pimagen(yy,0))
    Wait For (j) JobDone (job As HttpJob)
    If job.Success Then
    ImageView2.SetBackgroundImage(job.GetBitmap)
    Dim Out As OutputStream
    Out = File.OpenOutput(File.DirDefaultExternal & "/bzmonitor/imgevento", pimagen(yy,0), False)
    Dim tempbitmap As Bitmap
    tempbitmap = ImageView2.Bitmap
    tempbitmap.WriteToStream(Out, 100, "JPEG")
    End If
    Out.Close
    Else
    Log("Error" )
End If
End If
End If
Next
 
Top