08-31-2022 00:42
08-31-2022 00:42
Hey there Fitbit developers.
I am currently getting my heart rate in real time and keep sending it to my smart phone.
However, when the screen is turned off due to time passing, the App stops working.
(Communication with Companion will not be confirmed).
Of course, I have tried the following code, but it does not show any effect.
import { me } from "appbit";
//Make sure it works even when the screen is off.
me.appTimeoutEnabled = true;
console.log(me.appTimeoutEnabled); # output is "true"
Why is it not working?
Also, if a measure that does not turn off the screen might solve the problem, I would like to know how to do that as an alternative.
Sorry for the beginner's question, but thank you in advance.
Reference.
The watch is versa2
The phone is android
SDK version is 4.3
Answered! Go to the Best Answer.
08-31-2022 18:38
08-31-2022 00:59
08-31-2022 00:59
true means that the timeout is enabled. You want false.
08-31-2022 17:32
08-31-2022 17:32
@Gondwana Thanks for the answer!!! I am ashamed of my elementary mistake.
However, even if I set the relevant section to False, it still does not work. Do you know why?
08-31-2022 18:21
08-31-2022 18:21
Does your app keep running, or does the watch close it and return to a clockface?
When the display is off, you won't get clock tick events even if your app is still running.
08-31-2022 18:35 - edited 08-31-2022 18:36
08-31-2022 18:35 - edited 08-31-2022 18:36
In those two options, it seems that the APP continues to run even when the screen is closed, not back to the clock screen.
I see, that makes a lot of sense. I am now using clock tick events to send data every second.
Is there any other way to make it behave the same way when I close the screen? Or how not to make the screen turn off: ....
08-31-2022 18:38
08-31-2022 18:38
08-31-2022 22:03
08-31-2022 22:03
Thank you! You solved everything I was having trouble with!
12-27-2023 00:27
12-27-2023 00:27
How do I keep my Fitbit running in the background, every time I come off my fitbit app on my phone, I can't use Alexa please help
12-27-2023 00:43
12-27-2023 00:43
@ToshkimThis doesn't sound like an SDK question. I can move your question to the Android/iOS forum; which is appropriate?