My Windsurf App

Hello!

I'm trying to develop my windsurf APP.

The "visual" part I think it's done, I already understood how it works. I think :P

the App is very simple.

Before it start recording an session you need to choose what board, sail and fin.

my questions:

1 - after a lot of if conditions I have this

session = ActivityRecording.createSession({          // set up recording session
                                :name=>"Windsurf",                              // set session name
                                :sport=>ActivityRecording.SPORT_WINDSURFING,       // set sport type
                                //:subSport=>ActivityRecording.SUB_SPORT_GENERIC // set sub sport type
                        });
                        session.start();                                     // call start session
                        session.addLap();

session.addLap(); is for record my "path" ?? it will record all my movements??
2 - when I "close" the app I have
// onStop() is called when your application is exiting
    function onStop(state as Dictionary?) as Void {

        if ((Toybox has :ActivityRecording) && isSessionRecording() && (session != null)) {
            session.stop();
            session.save();
            session = null;
            WatchUi.requestUpdate();
        }
its ok, but, it will be saved where??? I didnd gave any name to a file to save the session... ?? 
if I want to see the session recorded how I can see it ??
3 - I already saw the moxyfield in sdk examples 
my manifest.xml

        <iq:permissions>
            <iq:uses-permission id="Fit"/>
            <iq:uses-permission id="Positioning"/>
            <iq:uses-permission id="FitContributor"/>
        </iq:permissions>

sdk example

_currentHCField = dataField.createField("currHemoConc", FIELD_CURR_HEMO_CONC, FitContributor.DATA_TYPE_UINT16, { :nativeNum=>54, :mesgType=>FitContributor.MESG_TYPE_RECORD, :units=>"g/dl" });
this is what I need to write a FIT file with information what I need to record?? like,,, calories, time expended.. jibe numbers, duration session time... ??
4 - the core topic to save information on a file is FitContributor ??
with this information how can I create a layout to be seen in connect iq ??
what I need to read to understand the connect iq layouts and show information like this: 
This image was found in this topic, is not mine!
5 - everything like recording sessions, recording laps, recording FIT file, show datas in connect iq can be simulated on computer ?? or I need to transfer the "app" to my watch to test??
thanks!!
  • When you save a fit file, it is in the garmin\activity folder and it's name is based on the date time.  It will then be synced to Garmin Connect.  Yo display fitcontrib data, your app needs to have fitcontributions info in your resources, and your app needs to be uploaded to the app store and installed from there.

    The recordsample in the SDK shows the basics of creating a session, starting recording, stopping recording, and saving it.

  • Thanks!

    But, Can I simulate the fitcontributions ? see the final aspect as we do with the simulator ?

    I can see the fitfiles here: https://www.fitfileviewer.com

  • You can try generating a fit with the data used to generate your fit contrib data and then play that back in the sim so the fit contib data is in the new .fit file you are generating. It depends on what data you need.

  • I want do do something like this:

    how can I simulate this?

    many thanks!

  • by the way.

    resources.xml 

    <resources>
        <fitContributions>
    
    <fitField id="0" displayInChart="true" sortOrder = "0" precision="2" 
        chartTitle="@Strings.vspeed_graph_label"
        dataLabel="@Strings.vspeed_label" 
        unitLabel="@Strings.vspeed_units"
        fillColor="#FF0000" />
    
        </fitContributions>
    </resources>

    strings.xml 

    <string id="vspeed_label">Vertical Speed</string> 
    <string id="vspeed_graph_label">Vertical Speed label</string> 
    <string id="vspeed_units">metros por hora</string> 

     const NAMASTE_FIELD_ID = 0;
        hidden var mNamasteField;
        
        ....
        ....
        
        mNamasteField = session.createField("vertical_speed", NAMASTE_FIELD_ID, FitContributor.DATA_TYPE_FLOAT, { :mesgType=>FitContributor.MESG_TYPE_RECORD, :units=>"N" });
        mNamasteField.setData(0);

    and it is on FIT file

    it's working..

    then I upload my app to Garmin as a beta app and transferred to watch.

    its work good, but I can't find information about my recorded session on my garmin connect on my phone.... why?

  • Hello.

    I tried the monkey Graph and I got this

    is this a good signal that I can upload my App to garmin in a beta version ??

    with this it means that I will see "windsurf jibes" on my connect iq on my cellphone??

    thanks!