07-03-2020 11:15
07-03-2020 11:15
07-03-2020 18:14
07-03-2020 18:14
Are you trying to test this on the simulator?
It doesn't seem to work there.
It does work on my Ionic though.
Code:
import exercise from "exercise"
import { me } from "appbit";
//////////// code
exercise.onstatechange = () => {
me.appTimeoutEnabled = exercise.state === "stopped";
console.log (me.appTimeoutEnabled)
console.log("EXERCISE STATE "+exercise.state+" so time out enabled "+me.appTimeoutEnabled+" DESPITE "+(exercise.state === "stopped"));
}
exercise.start("run", { gps: true });
Console log:
[8:09:54 PM]Sideload successful![HOST]
[8:09:54 PM]App Closed[HOST]
[8:09:55 PM]App Startedapp/index.js:7,1
[8:09:55 PM]falseapp/index.js:8,1
[8:09:55 PM]EXERCISE STATE started so time out enabled false DESPITE false[HOST]
[8:09:56 PM]Launch complete - durations: foregrounding(1016ms), first paint(340ms), total(1384ms).
Regards,