In the background services, you do the makeWebRequest in onTemporalEvent. In the call, you specify a callback function..
What I do in that callback, if the responseCode is 200, I do a Background.exit() of the data. If it's not 200, I do the Background.exit() of the response code so I can see that in the main app.
Thank you very much. I think i'm starting to understand. Would you be interested in helping me build a datafield that is pulled from a json document online with update interval of 5 minutes ? This is for weather related data (eg. realtime wind info) so you might be interested in it since you wrote the OWM app. I have gotten a DF program to work in the simulator based on another thread (the watertempdf thread). I have to manually trigger it via Background Event selection in the simulator and it works, but doesn't do anything when installed on the watch (fenix 6s saphire).
Thanks for the reply. My code does this already in the getInitialView function call
// Return the initial view of your application here function getInitialView() as Array<Views or InputDelegates>? { if (Background.getTemporalEventRegisteredTime() != null) { Background.registerForTemporalEvent(new Time.Duration(5 * 60)); }