01-27-2018 09:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-27-2018 09:07
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
I am trying to wrap my mind around when the code in the "app" gets executed. I am working on a clockface that has the current time as well as using the onboard gps to display the longtitude and latitude. I have a "clock.ontick = (evt)" code that seems to be working fine updating the clock face on a second basis. I also have geolocation code in app that uses geolocation.WatchPosition(). I am wondering when the code that is in the index.js in the app directory gets executed. Are the functions in index.js in a synchronous loop OR am I setting up code that gets called asynchronously when a specific event occurs such as a clock.tick or the geolocation changes geolocation.WatchPosition()
Answered! Go to the Best Answer.

Accepted Solutions
01-28-2018 08:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-28-2018 08:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You code will be executed at the onload event.
Then you can add all your handlers to the different events like the clock tick, sensor events, message events, touch events or just a timer (use setInterval).
01-28-2018 08:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

01-28-2018 08:51
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
- Who Voted for this post?
You code will be executed at the onload event.
Then you can add all your handlers to the different events like the clock tick, sensor events, message events, touch events or just a timer (use setInterval).
02-02-2018 14:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-02-2018 14:53
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
This should be described in your watchface description. Took me forever to find out why I couldn't find my code.

02-02-2018 14:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-02-2018 14:56
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Just uninstalled and reinstalled the Fit Chronograph and it didn't give me a code. Giving up on this watchface.

02-03-2018 00:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-03-2018 00:05
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Hi Paul,
The code will be shown after 12 hours, but only when your Ionic get an internet connection.
To refresh this connection, please open the Fitbit app on your phone and sync with your Ionic.
Fitbit is working on a fix for this issue, hopefully a new firmware is coming soon.
There is no other way to get the code - the code will be generated securely by the Kiezelpay system.
If you reinstall the watchface, the 12 hours starts again...
But you can use it normally, right? So what's the problem with that?

02-03-2018 03:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-03-2018 03:27
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Again, hopefully this is added to your watch face description. I searched far and wide and couldn’t get an answer.
Amazing watch face!
----
Paul E. Harvey
Phone: 310-795-5009
Email: peh@pauleharvey.com
Web: www.PaulEHarvey.com

02-03-2018 06:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post

02-03-2018 06:11
- Mark as New
- Bookmark
- Subscribe
- Permalink
- Report this post
Also, sorry for my attitude. I know it's beyond your control.

