I have following code and all the images is downloaded from server but it is empty so what i im doing wrong?
B4X:
For i=0 To 100
'Check if Logo is downloaded
If StringFunctions1.FileExist(File.DirDefaultExternal&"/"&Channels( i, 4)) = True Then
'Download Logos
DownloadService.URL = "http://mywebsite.com/logos/"&Channels( i, 4)
DownloadService.Target = File.OpenOutput(File.DirDefaultExternal&"/", Channels( i, 4), False)
StartService(DownloadService)
End If
Next
So i created a loop of 100 images, that i need to download from server, then i check if file exists in files folder of android device if not exists it downloads from mywebsite.com images, Variable Channels is array, first value (variable i) holds channel id in witch is stored logo name (for example id 1 - logo.png, 2 - abc.png, 3 - cde.png...etc).
Code compiled successfully and download to my android device files but all files are empty (0KB). Any Help?