Datafield Works in Sim but not on 920xt

Former Member
Former Member
Created a very simple datafield using Eclipse/MacOSX

using Toybox.WatchUi as Ui;
using Toybox.Application as App;

class HalfMarathonView extends Ui.SimpleDataField {

var DIST = 21.1;

//! Set the label of the data field here.
function initialize() {
label = "1/2 Mar To Go";
}

//! The given info object contains all the current workout
//! information. Calculate a value and return it in this method.
function compute(info) {
// See Activity.Info in the documentation for available information.
if(info.elapsedDistance == null) {
return DIST;
}
else {return DIST - (info.elapsedDistance/1000);
}
}

}

Works fine in the sim but when I copy the prg file to the Garmin/Apps folder I can see it under the watch settings on my 920xt but selecting it does nothing ie the field remains as the previous data field.

I assume there is some kind of validation checking being done on the 920xt itself ?
  • I believe that if you want to sideload an watch face or data field, you need to click ConnectIQ > Build Project for Device in Eclipse, and then use that to build the program file. Once you've got that, you should be able to dump that into the APPS folder.
  • Former Member
    Former Member over 10 years ago
    I believe that if you want to sideload an watch face or data field, you need to click ConnectIQ > Build Project for Device in Eclipse, and then use that to build the program file. Once you've got that, you should be able to dump that into the APPS folder.


    Thanks - that is exactly what I had done to create the prg file which I then copied onto the device APPS folder. Any other thoughts ?
  • I was able to use this data field just fine on a 920. Are you using the 2.64 beta firmware?
  • Former Member
    Former Member over 10 years ago
    I was able to use this data field just fine on a 920. Are you using the 2.64 beta firmware?


    Yes. Firmware version 2.64. I can install other fields from the App store and can 'see' my field on the watch which leads me to think there is something in my code that the 920 doesnt like.
  • I don't see anything unusual in your code, and I've tested on both a Mac and a PC to be sure it's not some kind of platform-specific issue. When you built the project, is it being built for the 920? Have you tried creating another data field and encountered the same issue?
  • Former Member
    Former Member over 10 years ago
    Hi, same issue here, I'm using 2.70 firmware and DataField run fine on simulator but no in the watch, any sugestion?

    Thanks,
    Carlos.
  • Former Member
    Former Member over 10 years ago
    @Brandom only for clarification, then what happen when the DataField is on ConnectIQ store? When users with 2.70 download the field ... Is available only for 2.64 users?
    Thans again,
    Carlos.
  • The 2.70 firmware works fine for DataField and WatchFace apps. I thing Brandon misread you post.

    If others are able to build your DataField and deploy it onto their device, but you are not able to do so, it seems likely that the problem is how you are building it. Are you certain that you're building it via the ConnectIQ menu as suggested above? Specifically, are you building for the 920XT via that menu? Are you using ConnectIQ 1.0? I suppose one thing to try would be for someone else to build your app and send you the binary. If that works for you then we can eliminate your device as the source of the trouble and focus on the build environment.
  • @fit2tri Can you export your project in Eclipse and attach it to this thread?

    I usually just copy my .prg file to the APPS folder of my 920XT when I sideload. I never do anything special like creating an .iq file.