Hi, community I'd like to know, if i open my application in the fitbit ionic, and it's running normal, later a time the fitbit closes it, when it is inactivated, could i change it ?
thanks!!
Answered! Go to the Best Answer.
Best AnswerIf you're writing an app and not a clockface, have a look at appTimeoutEnabled.
Not really sure what you are asking here...
I do have some code executing when the app unloads using an onunload event attached to the topmost svg element in my index.gui.
I can upload the actual code later l, but it is something like:
document.getElementByID("mPage").onunload = evt => { /* code here */ }
Best Answerok, thanks for your answer, i'm going to try explaining better. For example
this is my app running
but, 3 minutes later
I'd like the app always running, I tried with a spiral event like you see in the first image, but it doesn't work
thanks !!!
Best AnswerStill not sure what you're trying to do.
Are you trying to keep an application from being replaced by the active watchface? If so you can write your app as a watchface instead. You still can't keep a watchface from being replaced, but at least as the active watchface your app wouldn't be automatically replaced by the one that was.
Are you wanting to run your app in the background? Background operation isn't an option for any non OS Fitbit app.
Are you trying to keep the display on? You really can't do this as battery life would suffer badly and OLED displays would likely get damaged if it was allowed.
It may help if I knew what your app was designed to do.
Regards,
Reign
Best AnswerIf you're writing an app and not a clockface, have a look at appTimeoutEnabled.
Cool, wasn't aware of that one...
Best Answerexactly, but i can't control the appTimeoutEnabled, the first option is to change to clockface, or do i have other options ?, i'd like you advices, i'd like to obtain data each five minutes and to send through websocket API, but the app closes after 2 minutes
thanks @Gondwana and @morningReign
Feliz día.
Best AnswerYou can disable the timeout - see https://dev.fitbit.com/blog/2018-10-05-announcing-fitbit-os-2.2/#app-timeout-api.
John
jajajaj thanks, I thought that i can't do it
Best Answer>> but i can't control the appTimeoutEnabled
Do you have access to the source code? Switching an app function to a watchface is a bit more extensive than accessing the app timeout API in an existing app.
Drifty gave a link to some good documentation on this, including examples.
Regards,
Brent
Best Answer