If IsOnline();my_online=True
data$=DownloadFile("http://www.myurl.de/versionnumber", {silentfail=True})
If Not (my_version = data$) Then my_versioncheck=True
Works on MorphOS and Windows, but on Android it waits the entire time defined with SetNetworkTimeout (tried with times up to 20s) and writes "receive timeout reached!" to the variable.
But it does sucessfully ping the host at least which I tested with a simple .php script on my severspace.
Is this an Android issue, am I doing something wrong here or is it a bug?
It#s the downloadfile function that fails. I tried with different files (my own version files but also with e.g. some Aminet readme file). On my MorphOS machine it does what it should do but on my Nexus Lollipop tablet it does not download the file to the variable. But as said, the url itself does get pinged as i checked that with a small php counter.
I tested it both as an applet started with the Hollywood Player and as a stand-alone APK compiled by the Hollywood APK Compiler. It worked fine without any problems. Does this script work for you? What Android version are you on? Are you using the Hollywood Player or a stand-alone APK?
Your code freezes on my tablet. A white screen opens and nothing happens, hollywood player gets irresponsive and Android says "Hollywood reagiert nicht".
On MorphOS the same code snippet works flawlessly.
The devices are within the same WLAN, Android is V 5.1.1.
Strange, isn't it?
Will try with an .apk as well (don't have access to the compiler machine tonight though), but doubt that will change behaviour. But I may catch an output from the usb android debug console, maybe there's a hint in there.
Ok, I've now tested it on an Android 4 device since I don't have an Android 5 device here and indeed, on Android 4 it doesn't work and freezes the program. I'll examine what's going on there.
I ran the script while running adb.exe logcat. But I don't see an error or alert there. Then again I am not too experienced with reading such a log. Anyway, here it is, maybe it's useful to you:
Hmm, sucks, now I'm unable to reproduce it on Android 4. It's working fine again, even with a stress test of constantly calling DownloadFile(). No issues at all. Maybe it was just a network error yesterday. I'm afraid the only way to solve this would be some sort of remote debugging on your device. I'd have to send you a build with debug output which you can then send to me to investigate into what's going wrong there.
airsoftsoftwair wrote:Hmm, sucks, now I'm unable to reproduce it on Android 4. It's working fine again, even with a stress test of constantly calling DownloadFile(). No issues at all. Maybe it was just a network error yesterday. I'm afraid the only way to solve this would be some sort of remote debugging on your device. I'd have to send you a build with debug output which you can then send to me to investigate into what's going wrong there.
If i can be of any help I am happy to do so. Just drop me a message when you have a build to test.