Hi all
I am using the example of libUrlDownloadToFile from
http://forums.runrev.com/viewtopic.php? ... ile#p70253
it works fine when I run the scripts in the IDE but if I send it to the emulator (android 2.2) the file downloads correctly but there is no callback messaging. I have also added a libURLSetStatusCallback callback, and once again, that works in the IDE but not in the emulator. Is this a known issue in Android?
cheers
Dom
libUrlDownloadToFile callback message not working in android
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Re: libUrlDownloadToFile callback message not working in and
Hi Dom,
Welcome to the forums
I'm sorry but libURLSetStatusCallback doesn't work in mobile.
It's shown in The Supported Operating Systems in the dictionary.
Simon
Welcome to the forums

I'm sorry but libURLSetStatusCallback doesn't work in mobile.
It's shown in The Supported Operating Systems in the dictionary.
Simon
I used to be a newbie but then I learned how to spell teh correctly and now I'm a noob!
Re: libUrlDownloadToFile callback message not working in and
Hi Simon
thanks for pointing that out. I still have the issue of the callback message in libUrlDownloadToFile not being called. I thought that maybe Android 2.2 was too old so created an emulator using Android 4.3, but still have the same problem.
Using the example code below, which is all contained within a button -
In the IDE, the timer message directly below libUrlDownloadToFile is called instantly (showing 0) and then the downComplete function is called when the download is completed, as expected. However, in the Android emulator, the timer message is only shown once the download has completed and the downComplete function is never called.
It seems as if Android is not downloading the file asynchronously? Is there some other setting I have to change to allow asynchronous downloads?
cheers
Dom
on mouseup
downloadFiles
end mouseup
on downloadFiles
put the milliseconds into startTm
libUrlDownloadToFile "validdomain/test.zip", specialfolderpath ("documents") & "/test.zip","downComplete"
answer the milliseconds - startTm
end downloadFiles
on downComplete
answer "downloaded"
end downComplete
thanks for pointing that out. I still have the issue of the callback message in libUrlDownloadToFile not being called. I thought that maybe Android 2.2 was too old so created an emulator using Android 4.3, but still have the same problem.
Using the example code below, which is all contained within a button -
In the IDE, the timer message directly below libUrlDownloadToFile is called instantly (showing 0) and then the downComplete function is called when the download is completed, as expected. However, in the Android emulator, the timer message is only shown once the download has completed and the downComplete function is never called.
It seems as if Android is not downloading the file asynchronously? Is there some other setting I have to change to allow asynchronous downloads?
cheers
Dom
on mouseup
downloadFiles
end mouseup
on downloadFiles
put the milliseconds into startTm
libUrlDownloadToFile "validdomain/test.zip", specialfolderpath ("documents") & "/test.zip","downComplete"
answer the milliseconds - startTm
end downloadFiles
on downComplete
answer "downloaded"
end downComplete
Re: libUrlDownloadToFile callback message not working in and
Found this under General Engine features for mobile.
libUrlDownloadToFile url, filename
Unlike the libUrl command of the same name, this command blocks until the download is complete, and notifies progress through the urlProgress message as described above.
Would have been helpful if it was also in the dictionary definition
Anyway, happy to get back to coding.
cheers
Dom
libUrlDownloadToFile url, filename
Unlike the libUrl command of the same name, this command blocks until the download is complete, and notifies progress through the urlProgress message as described above.
Would have been helpful if it was also in the dictionary definition

cheers
Dom