Data field - running in simulator but not in watch

Former Member
Former Member
This might be a dumb question but I've to ask. I've some code for a data field that works fine in the simulator but in the watch (Vivoactive HR) it just shows the IQ logo and an exclamation mark. I've also built the data field template that comes up when you create a new data field project in Eclipse, which BTW works also fine in the simulator, and it happens the same in the watch. Am I missing something?
  • This might be a dumb question but I've to ask. I've some code for a data field that works fine in the simulator but in the watch (Vivoactive HR) it just shows the IQ logo and an exclamation mark. I've also built the data field template that comes up when you create a new data field project in Eclipse, which BTW works also fine in the simulator, and it happens the same in the watch. Am I missing something?



    Are you checking for "null" values on things as before the main app starts recording, things will be a null? Check the api doc for this info, as you really want to null check anything you see in compute() to avoid a crash.
  • What error messages appear in CIQ_LOG.txt?
  • Former Member
    Former Member
    I'm checking for "null" values at compute(), so that wasn't the problem. Checking CIQ_LOG.txt I found that the error was related to an unexpected data type. Finally, I managed to fix the issue declaring the value to display as "hidden var mValue=0;" instead of what I had before "hidden var mValue;". What sounds strange to me is that the SDK template does not run in the watch unless you make this small change. I guessed the template would be ready to run, instead of coming with a hidden bug.
  • Are you using mValue for something that wasn't done in the template? If not, you may want to post a bug report in the bug report forum so the template can be corrected.
  • Former Member
    Former Member
    I'm checking for "null" values at compute(), so that wasn't the problem. Checking CIQ_LOG.txt I found that the error was related to an unexpected data type. Finally, I managed to fix the issue declaring the value to display as "hidden var mValue=0;" instead of what I had before "hidden var mValue;". What sounds strange to me is that the SDK template does not run in the watch unless you make this small change. I guessed the template would be ready to run, instead of coming with a hidden bug.


    Alreiber,

    Which template are you using? This shouldn't be causing any error for you. What Jim said about using mValue somewhere else could be the culprit or you may have uncovered a bug.

    Thanks,
    -Coleman