Android Question Download image with httputlis2

Devv

Active Member
Licensed User
I'm facing problem with the following ..
any one can help ?

B4X:
Sub Activity_Create(FirstTime As Boolean)
   Dim  job3 As HttpJob
  
   'Send a GET request
   job3.Initialize("Job3", Me)
   job3.Download("http://www.basic4ppc.com/forum/images/categories/android.png")
End Sub

Sub JobDone (Job As HttpJob)
   Log("JobName = " & Job.JobName & ", Success = " & Job.Success)
   If Job.Success = True Then
        'show the downloaded image
        Activity.SetBackgroundImage(Job.GetBitmap)

   Else
      Log("Error: " & Job.ErrorMessage)
      ToastMessageShow("Error: " & Job.ErrorMessage, True)
   End If
   Job.Release
End Sub
when running this code i'am getting error loading bitmap on my device , any ideas ?
 
Top