This seems to come up periodically, but I've never seen a really concrete answer.
What possibilities are there for background operation of Rhodes apps?
I realize this is a platform-dependent issue - it might be possible on some, not on others. And perhaps in restricted ways on some.
My immediate interest is in making use of the iOS "grace period" after application is deactivated to complete a task. (DropBox upload/download). (Going forward, we might be interested in the iOS7 background transfer service, but for now we need to support iOS6.)
I don't see anything in the docs about Rhodes specifically supporting background operation or any settings. But there is an implication in the GPS docs that it is possible:
Rhomobile | Geolocation
Note that Geolocation is switched off automatically when the application goes into the background, and is switched on as the application goes back to foreground. However it is possible to switch on location services as usual while the application is in background
Is anybody doing any kind of background processing in Rhodes on iOS? If so, what did you have to do to enable it? Perhaps it is a simple as setting a plist value?
BTW, we have a native extension where we dump miscellaneous stuff (mostly keyboard-related - we get virtual keyboard notifications and send them along to Javascript as jQuery events so that we can deal with input more effectively) so would be easy for us to add any needed calls to native SDK methods.
1 Replies
As far as I know, Rhodes applications don't get any resources on iOS once they are on the background. This is different on Android where your code will still execute when the app in the background.
If you want to create a background process within your app, I'd recommend using the Timer API, because threads are not supported in Rhodes. See also: