Cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

App execution frequency

ANSWERED

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() 

Best Answer
0 Votes
1 BEST ANSWER

Accepted Solutions

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). 

View best answer in original post

Best Answer
6 REPLIES 6

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). 

Best Answer

This should be described in your watchface description.  Took me forever to find out why I couldn't find my code.

Best Answer
0 Votes

Just uninstalled and reinstalled the Fit Chronograph and it didn't give me a code.  Giving up on this watchface.

Best Answer
0 Votes

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?

Best Answer
0 Votes
Fantastic! Thank you so much.

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
Best Answer
0 Votes

Also, sorry for my attitude.  I know it's beyond your control.

Best Answer
0 Votes