My app downloads several text files, all located in the same folder on the server. When I run the app using the browser on my laptop there is no problem with downloading all the files. But when I make an APK file using Volt Builder and run it on my Android phone, all the files download OK except for one, named numplants.txt. No matter what order I set the files to download, they all download OK except for numplants.txt, which generates an error message. I’m using ReadFile to download the files as shown below.
Function GetContents(ThisFile)
req = ReadFile(ThisFile)
If req.status=200 Then
WorkingText.hide()
Else
NSB.MsgBox("Download of " + ThisFile + " Not Successful",vbExclamation,"Garden Notepad Message")
End If
GetContents = req.responseText
End Function
Tip: If you’re pasting code, html or config files, surround the code with triple back ticks (```), before the first line and after the last one. It will be formatted properly.
Thanks for your help. But, I couldn’t get anywhere with debugging. So I decided to work around the problem. I added the data from the file that didn’t load to one of the files that did load. The I separated the data to retrieve the original. That worked fine. Why the download problem happened is still a mystery, but I’ll leave it at that. Cheers.