11-23-2018 22:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-23-2018 22:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
Hi,
I'm using SDK2 for my VirtualPartner app. This app has to run even when the display is switched off, so I have to use
me.appTimeoutEnabled = false
like descriped in the documentation.
In detail I'm doing:
import { me as device } from "device"; // Disable app timeout import { me } from "appbit";
// Start off training console.log("Timeout, before: " + me.appTimeoutEnabled); me.appTimeoutEnabled = false; // Disable timeout console.log("Timeout, after: " + me.appTimeoutEnabled);
The result however is:
app/index.js:1937,3 [07:17:25]Timeout, before: true app/index.js:1939,3 [07:17:25]Timeout, after: true
So obviously me.appTimeoutEnabled will not be set to "false". In fact the app will be stopped after two minutes when the display will be switched off.
Does anybody know what to do?
Regards
Capitano
11-24-2018 14:32 - edited 11-24-2018 14:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

11-24-2018 14:32 - edited 11-24-2018 14:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Oops. Not a correct response...

11-27-2018 13:33
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-01-2018 07:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-01-2018 07:31
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hello,
I did some additonal tests with the Ionic and the Versa simulator - I small app that doesn't anything alse expcept the above mentioned code. - And it still doesn't work.
me.appTimeoutEnabled
will not be changed.
Is there nobody out there who develpes an app for Versa which should use the companion GPS and has other or similair experiences?
Perhaps this doesn't work in the simulator and I have to work with the watch at once?
Regards
Capitano

12-01-2018 07:58 - edited 12-01-2018 08:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-01-2018 07:58 - edited 12-01-2018 08:01
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
FWIW, I just ran your code on my computer and got...
[HOST][10:53:50 AM]App Closed
[HOST][10:53:50 AM]App Startedapp/index.js:7,3
[10:53:50 AM]Timeout, before: undefinedapp/index.js:8,3
[10:53:50 AM]Timeout, after: false
Have you deleted your app from the simulator and re-ran it as a fresh install?
EDIT: I also added a first line which defined timeout as true and got the "true" response followed by the false.

12-01-2018 08:26
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-01-2018 08:26
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi @FlyFrosty,
thanks for your efforts - did you choose SDK 2?
I got this "undefined" message, if in the package.json SDK 1 is chosen.
You also have to implement a small program - a kind of timer or loop - so that the app stays active for more then 2 minutes - then you get the message that the OS terminates the app - the lines above are just an excerpt of my program.
Here's the output in the console:
Regards.
Capitano
Regards.

12-01-2018 08:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-01-2018 08:48
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I did not change the SDK version (I didn't even look at it), so I do not know which one I used.
Just out of curiosity, did you delete the app from the simulator and try and re-rerun it fresh? (Apps tab, Actions dots...).
I am not a professional programmer, but if it helps to see how I use it, I posted my Indoor Track app to GitHub (https://github.com/FlyFrosty/Indoor-Track). I use the appTimeoutEnabled functions in it to keep it from closing out if a lap is greater than two minutes (lines 173 and 182). It was compiled in SDK version 2.
The only other thing I can think of is if the Fitbit compiler is getting confused between the import {me}... and import {me as device}. It should not, but...

12-02-2018 12:52 - edited 12-02-2018 12:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

12-02-2018 12:52 - edited 12-02-2018 12:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Thanks once more.
In my opinion I did it exactly your way...
I tried all other things. Deinstalled the app from (both) simulators and reinstalled it.
I also removed the other me-import - it didn't change anything.
Sad...
Capitano

01-14-2019 19:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-14-2019 19:30
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am also facing the same issue, someone kindly suggest if you have any suggestions.

04-25-2019 04:54 - edited 04-25-2019 07:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

04-25-2019 04:54 - edited 04-25-2019 07:54
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
I have the same issue using SDK 3.1
Does anyone have a solution to this?
Edit:
me.appTimeoutEnabled = false;
console.log("Timeout, after: " + me.appTimeoutEnabled);
This did not work for me on the simulator and I always got true out.
But I put this on my versa watch and it does not turn off by it self so it looks like it is working on the watch
09-17-2019 08:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

09-17-2019 08:17
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
This actually worked for me. At least it prints false as i want it to. I hope the app won't actually stop now. Thank you.

