06-23-2020 09:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-23-2020 09:46
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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.

Accepted Solutions
06-24-2020 13:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-24-2020 13:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
If you're writing an app and not a clockface, have a look at appTimeoutEnabled.
Gondwana Software
06-24-2020 05:08 - edited 06-24-2020 05:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 05:08 - edited 06-24-2020 05:09
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
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 */ }

06-24-2020 09:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 09:28
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
ok, 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 !!!

06-24-2020 10:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 10:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Still 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

06-24-2020 13:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


06-24-2020 13:22
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
If you're writing an app and not a clockface, have a look at appTimeoutEnabled.
Gondwana Software
06-24-2020 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 13:43
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Cool, wasn't aware of that one...

06-24-2020 17:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 17:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
exactly, 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.

06-24-2020 18:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 18:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You can disable the timeout - see https://dev.fitbit.com/blog/2018-10-05-announcing-fitbit-os-2.2/#app-timeout-api.
John
06-24-2020 19:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-24-2020 19:13
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
jajajaj thanks, I thought that i can't do it

06-25-2020 06:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

06-25-2020 06:41
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
>> 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

