10-11-2019 11:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-11-2019 11:12
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I have a countdown timer app that works fine on Versa, Versa Lite, and Ionic; however, installed on the Versa 2 if the timer is running and the screen times out, the timer stops. When the screen is activated, the timer starts again.
Do I need to wait for the Versa 2 SDK, or is there some setting for Versa 2 the user needs to set?
Or, is my app incompatible for Versa 2, although the Fitbit Gallery is showing it as compatible?

10-11-2019 11:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-11-2019 11:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Could it be that you're using display.autoOff? That will have no effect on Versa 2.
Your app should continue to run when the screen is off, although ontick events won't happen. If you're relying on those, consider setInterval.
Gondwana Software

10-11-2019 12:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-11-2019 12:02
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes, in my onTick event, I'm using:
display.autoOff = false;
display.on = true;
I guess I'll have to implement setInterval for Versa @2.....
Thanks.

10-21-2019 01:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-21-2019 01:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
App timeout is different to the display timeout.
// Disable app timeout
import { me } from "appbit";
if (me.appTimeoutEnabled) {
console.log("Timeout is enabled");
}
me.appTimeoutEnabled = false; // Disable timeout

10-21-2019 10:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

10-21-2019 10:15
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Yes, I have me.appTimeoutEnabled = false; in my code that is executed when the app starts.
Do I also need this in my onTick event handler?

10-21-2019 11:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post


10-21-2019 11:59
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Sorry, I missed this from your original post.
The ontick event only fires when the screen is on. You'll need to use either setTimeout() or setInterval() if you want it to occur while the screen is off.

