I'm new to Garmin wearable development, so please forgive me possibly wierd question, but I have not found an answer anywhere - Though I was searching a lot.
Thanks for any reply in advance. (Read long story short in bold)
I´m creating an app that needs to fetch some json data using makeWebRequest on background - specifically in onTemporalEvent.
Everything is basically working as expected - EXCEPT:
In my onTemporalEvent Im making a web request which is processed successfully and returns valid data in its callback.
Under certain conditions I want to notify user that there is something new based on the fetched data so I want to call requestApplicationWake from makeWebRequest callback.
In a point of time the data arives and are processed - onTemporalEvent is already out of scope (or callback function is not running in a scope of background at all) - therefore requestApplicationWake does not take effect.
if I call requestApplicationWake from onTemporalEvent directly - I will get a prompt. however calls of requestApplicationWake beyond onTemporalEvent lifetime (understand from webRequest callback) executes with NOP.
Is there a way to wait for a web request callback in onTemporalEvent or ensure requestApplicationWake is called within background context anyhow so that requestApplicationWake is sent within onTemporalEvent after web request data are received?
Any possible workaround?
*(I know the background task lifetime is 30s maximum and that only onTemporalEvent is guaranteed to execute, but not its child processes possibly)