G grafsoft Well-Known Member Licensed User Longtime User Jul 19, 2014 #1 Hi, I have an app with a few activities. It uploads several files to a server, where they are converted and wait for download. Conversion is done every 2 minutes. So the app has to ask friom time to time if the files are already converted. But the user should not have to wait for conversion and download but this should happen in the background and the user should be able to use the app normally. I know how to use httputils2 and httpjob, and I have read this: http://www.b4x.com/android/forum/threads/downloading-files-using-service-module.7572/ Has anybody solved a similar problem and can point me in the right direction?
Hi, I have an app with a few activities. It uploads several files to a server, where they are converted and wait for download. Conversion is done every 2 minutes. So the app has to ask friom time to time if the files are already converted. But the user should not have to wait for conversion and download but this should happen in the background and the user should be able to use the app normally. I know how to use httputils2 and httpjob, and I have read this: http://www.b4x.com/android/forum/threads/downloading-files-using-service-module.7572/ Has anybody solved a similar problem and can point me in the right direction?
Erel B4X founder Staff member Licensed User Longtime User Jul 20, 2014 #2 The tutorial in this link is quite old. You need to use HttpUtils2 instead. Start a timer and send requests to the server every x seconds until the file is ready. Upvote 0
The tutorial in this link is quite old. You need to use HttpUtils2 instead. Start a timer and send requests to the server every x seconds until the file is ready.
G grafsoft Well-Known Member Licensed User Longtime User Jul 20, 2014 #3 Thank you. But the user will switch between activities. Therefore, the task should run in a service, right? http://www.b4x.com/android/forum/threads/service-modules.7542/#content with startserviceat Upvote 0
Thank you. But the user will switch between activities. Therefore, the task should run in a service, right? http://www.b4x.com/android/forum/threads/service-modules.7542/#content with startserviceat
G grafsoft Well-Known Member Licensed User Longtime User Jul 20, 2014 #4 I did just that, perfect! Upvote 0