Hi all. I'm downloading an image file from a website. Everything is fine when this is run via Windows... it downloads and displays the image. However, when the same code is broadcast to player for IOS or Android.... I get a blank image... even though the GetHTTPFileComplete() has indicated it has retrieved ok and the file check made.
Having looked through the forums, I see a little on where the download image is stored. Not sure if there is a difference between Window and ISO/Android and I should be making an allowance in this when download... but I would of expected this to have worked on all platforms with the coding I have.
Has any come across this and found a way to have this working on IOS/Andoid to? Variable
Resp in the following code is returning a 1. I also check for when the file exists and if both conditions are true, I progress and show the image.
Http = CreateHTTPConnection()
SetHTTPHost(Http, "www.apkgames.guru", 0)
GetHTTPFile(Http, "gamegraphics/logo.png, "logo.png","")
// Wait for response
Resp = GetHTTPFileComplete(Http)
// Time out also
Tm# = GetMilliseconds()
Do
If (Resp = 1 And GetFileExists(FName$)) Or Resp = -1 Then Exit
//Print( "Downloading..." )
If GetMilliseconds() > Tm# + 3000
FName$ = ""
Exit
EndIf
Resp = GetHTTPFileComplete(Http)
Sync()
Loop
CloseHTTPConnection(Http)
DeleteHTTPConnection(Http)
S=CreateSprite(LoadImage("logo.png"))
SetSpriteSize(S,-1,40)
Do
Sync()
Loop
Cheers, Ian.