Android Question HttpJob Download File Error

Nabiloo

Member
Hi everyone
I have used this code to download a file but it did not work


B4X:
Private Sub Picture_Click
    
    H.Initialize("downloadimage",Me)
    ProgressDialogShow("در حال دانلود")
    H.Download("https://ghaemcoarsh.com/wp-content/uploads/2021/06/Sell-150x150.png")

End Sub

Sub JobDone (Job As HttpJob)
    ProgressDialogHide
    If Job.Success Then
        ImageView1.SetBackgroundImage(Job.GetBitmap)
        Job.Release
    Else
        ToastMessageShow(Job.ErrorMessage,False)
    End If
End Sub
 

Attachments

  • Error.png
    32.6 KB · Views: 90
Cookies are required to use this site. You must accept them to continue using the site. Learn more…