06-12-2022 22:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-12-2022 22:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
hello
i'm testing an app for real time heart rate stream
so my watch app has to run in background and appTimeoutEnabled should be false.
can it be possible to run in background and stream the heart rate in specific time?
and another question.
i set the appTimeoutEnabled is false.
but the app closed....
please help me not to close the app
my code and log are below.
code
me.appTimeoutEnabled = false; // Disable timeout
if (me.appTimeoutEnabled) {
console.log("Timeout is enabled");
}
console.log("Timeout check: " + me.appTimeoutEnabled);
log
Answered! Go to the Best Answer.

Accepted Solutions
06-12-2022 22:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-12-2022 22:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The short answer is 'no'.
The longer answers are:
- ...but you can get it from the Web API regardless of which clockface/app is running (but not in real time)
- ...but your clockface/app is still running when the screen is off, so maybe you don't need it to be running in the background (which would only be necessary if the user switched to a different clockface/app).
Gondwana Software
06-12-2022 22:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-12-2022 22:25
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Apps can't run in the background.
Your assignment to appTimeoutEnabled may not be correct if you imported the API under a different name (eg, 'me as appbit').
Gondwana Software

06-12-2022 22:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-12-2022 22:34
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
thank you for answering
i solved the appTimeoutEnabeld issue.
there is no way to run in backgound?
there is no way to get the heart rate while the watch app is in background?
06-12-2022 22:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-12-2022 22:44
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
The short answer is 'no'.
The longer answers are:
- ...but you can get it from the Web API regardless of which clockface/app is running (but not in real time)
- ...but your clockface/app is still running when the screen is off, so maybe you don't need it to be running in the background (which would only be necessary if the user switched to a different clockface/app).
Gondwana Software
