B4X:
See Below For Solution
B4X:
java.lang.IllegalStateException: Target host must not be null, or set in parameters. scheme=null, host=null, path=www.*.com/*/tutorials/fd130/sale/swipe/1.png
Here's the code:
B4X:
TutorialName = parser.NextValue
TutorialStepCount=parser.NextValue
urlDirectory = parser.NextValue
Dim links As Map
links.Initialize()
urlDirectory = urlDirectory.Replace("+","/")
Log(urlDirectory)
links.Put(imageBox, (urlDirectory & CurrentStepCount & ".png"))
CallSubDelayed2(ImageDownloader, "Download", links)
The urlDirectory is getting a VALID URL to a PNG file. the StepCounts are ok (this is used elsewere)
The response is ok.
The error occurs in the ImageDownloader module:
B4X:
If Job.Success Then
Dim bmp As Bitmap = Job.GetBitmap
cache.Put(Job.JobName, bmp)
If tasks.IsInitialized Then
For i = 0 To tasks.Size - 1
Dim link As String = tasks.GetValueAt(i)
If link = Job.JobName Then
Dim iv As ImageView = tasks.GetKeyAt(i)
iv.SetBackgroundImage(bmp)
End If
Next
End If
Else
Log("Error downloading image: " & Job.JobName & CRLF & Job.ErrorMessage) '<<<<Here
End If
Thanks,
Last edited: