Android Question Download image with httputlis2

Discussion in 'Android Questions' started by Devv, Mar 2, 2015.

  1. Devv

    Devv Active Member Licensed User

    I'm facing problem with the following ..
    any one can help ?

    Code:
    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 ?
     
  2. Devv

    Devv Active Member Licensed User

    Never mind i found the solution ( the url was wrong ...)
     
Loading...
  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice