Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

running in background and appTimeoutEnabled

ANSWERED

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

[12:19:27]App Started
[12:19:27]Timeout check: false
...
[12:21:37]App timeout triggered; app closing. See https://dev.fitbit.com/build/reference/device-api/appbit/#interface-appbit- for more information.
[12:21:38]App Closed
 
Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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).
Peter McLennan
Gondwana Software

View best answer in original post

Best Answer
3 REPLIES 3

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').

Peter McLennan
Gondwana Software
Best Answer
0 Votes

@Gondwana 

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?

 

Best Answer

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).
Peter McLennan
Gondwana Software
Best Answer