monkey graph doesn't display session data

when looking at my fit contribution from a watch app, monkey graph doesn(t display :
* lap data : nothing display
* session data : display name with N/A value
  • I am seeing session data in monkey graph. We will need more info to look into this as a bug. But it sounds like "sessionContributor.setData(value)" might not be in the right spot.
    Structure should be like this:

    session = activityRecording.createSession(....);
    sessionContributor = session.createField(...{FitContributor.MESG_TYPE_SESSION...});
    session.start();
    // do stuff
    session.stop();
    sessionContributor.setData(value);
    session.save();


    also might be worth double checking your xml
    <fitField id="0" displayInChart="false" displayInActivitySummary="true" sortOrder = "1" precision="2"
    chartTitle="@Strings.SessionTitle" dataLabel="@Strings.SessionDataLabel"
    unitLabel="@Strings.SessionUnit" />
  • I am seeing session data in monkey graph. We will need more info to look into this as a bug. But it sounds like "sessionContributor.setData(value)" might not be in the right spot.
    Structure should be like this:

    session = activityRecording.createSession(....);
    sessionContributor = session.createField(...{FitContributor.MESG_TYPE_SESSION...});
    session.start();
    // do stuff
    session.stop();
    sessionContributor.setData(value);
    session.save();


    also might be worth double checking your xml
    <fitField id="0" displayInChart="false" displayInActivitySummary="true" sortOrder = "1" precision="2"
    chartTitle="@Strings.SessionTitle" dataLabel="@Strings.SessionDataLabel"
    unitLabel="@Strings.SessionUnit" />


    Thanks for your answer, I was not aware that session data needed to be stored after the 'stop()' call
  • here what I have :
    [TABLE]
    [TR]
    [TD]Cumulative Shots[/TD]
    [TD]#VALUE?
    [/TD]
    [/TR]
    [/TABLE]

    // Stop sensor processing
    function stop() {
    // Stop the timer
    //mTimer.stop();

    // Stop the FIT recording
    if ((mSession != null) && mSession.isRecording()) {
    // 2.3.0 Sensor.unregisterSensorDataListener();
    mSession.stop();

    // forums.garmin.com/.../1452620-monkey-graph-doesn-t-display-session-data
    // Update the total archery Shot field
    mTotalEndsField.setData(totalEnds.toNumber());
    mTotalArrowField.setData(totalArrow.toNumber());
    }
    }

    // Save the current session
    function save() {
    mSession.save();
    //System.println("saved : "+ ret);
    mSession = null;
    }


    and corresponding entry in fitcontributors :

    <fitField id="4" displayInActivitySummary="true"
    sortOrder = "1"
    precision="0"
    dataLabel="@Strings.archery_totalend"
    unitLabel="@Strings.archery_unitend" />


    call order are stop then save.

    so don't understand what's going wrong....
  • I've always had problems with monkeygraph myself.

    I recommend using the FIT SDK to decode your FIT files (especially when something like this happens). Look for the tool FITtoCSV under the Java/ folder:
    https://www.thisisant.com/resources/fit

    Stephen.ConnectIQ I just tried MonkeyGraph with my app which records two UINT16 values for the graph, lap and summary data. Everything worked except the summary data for the UINT16s displays #VALUE?

    EDIT: An (additional) float value in the summary seems to work fine, though.

    EDIT: I tried it with another app which records a string and a float to the summary. Both are displayed as #VALUE?.

    So for me, it seems the problem is the first two summary values are displayed as #VALUE?, while the 3rd is okay.
  • thanks for your answer FlowState , I wonder what's going on in monkeygraph,
    In my latest tests, it display nothing but blank page, as i only have added lap data.

    And following your tips, I converted the resulting fit session in CSV, And i see my information :
    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 1115"]
    [TR]
    [TD="width: 80"]Data[/TD]
    [TD="width: 80, align: right"]11[/TD]
    [TD="width: 80"]field_description[/TD]
    [TD="width: 114"]field_name[/TD]
    [TD="width: 252, colspan: 2"]avg_time_per_arrow[/TD]
    [TD="width: 80"]units[/TD]
    [TD="width: 80"]s/arrow[/TD]
    [TD="width: 80"] [/TD]
    [TD="width: 80"]native_mesg_num[/TD]
    [TD="width: 80, align: right"]19[/TD]
    [TD="width: 80"] [/TD]
    [TD="width: 80"]developer_data_index[/TD]
    [TD="width: 80, align: right"]0[/TD]
    [TD="width: 80"] [/TD]
    [TD="width: 80"]field_definition_number[/TD]
    [TD="width: 80, align: right"]5[/TD]
    [/TR]
    [/TABLE]


    [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 575"]
    [TR]
    [TD="width: 80"]Data[/TD]
    [TD="width: 80, align: right"]13[/TD]
    [TD="width: 80"]lap[/TD]
    [TD="width: 114"]timestamp[/TD]
    [TD="width: 108, align: right"]918904477[/TD]
    [TD="width: 144"]s[/TD]
    [TD="width: 80"]start_time[/TD]
    [TD="width: 80, align: right"]918904468 [TABLE="border: 0, cellpadding: 0, cellspacing: 0, width: 635"]
    [TR]
    [TD="width: 122"]avg_time_per_arrow[/TD]
    [TD="width: 80"]0.038016666[/TD]
    [TD="width: 80"]s/arrow[/TD]
    [TD="width: 97"]arrow_per_end[/TD]
    [TD="width: 80, align: right"]4[/TD]
    [TD="width: 80"]shot(s)[/TD]
    [TD="width: 146"]avg_time_per_end[/TD]
    [TD="width: 80"]0.1521[/TD]
    [TD="width: 80"]s/arrow[/TD]
    [/TR]
    [/TABLE]
    [/TD]
    [/TR]
    [/TABLE]

    I even see session and record data, so what's wrong ?
    will it work in GC even if monkeygraph can't display them Stephen.ConnectIQ ?
    another complementary question ! in what language should the fields be created ?
  • Answering to my own questions....
    after tripple checking my code, I found that one entry was declare "displayingraph" and create as a Lap in monkeyc.... would have like better error checking/warning on that one !
    well, now I see some data in monkeygraph but ...
    laps start at 5 (5,6,7) as i have 3 laps in my test ! and display no value : the usual #VALUE display ! as well as the session data always at #VALUE.