Get ActivityRecording.discard() event at a datafield

I would like to know if it is possible to get the discard() or save() event at a DataField. This is because I am registering information on my datafield and want to store that information locally for future comparation of values when running datafield again.

I want to know if activity was saved or not to do the same with my collected information.

Thanks in advance (this is my first approach to garmin developing tools so I did not understood some concepts yet).

  • In a data field , you don't control the recording.  You don't create the session and can't discard it

    With a device app instead of a data field, you create the session, start recording, stop recording and save or discard it.

    If you want to save your own data for future use, use Application.Storage instead of what's in the fit file.

  • Thanks for your answer,

    In fact I was thinking about using Application.Storage to store my own data and afterwards access my own data (not FIT file). My question was about to know if from a datafield I can be notified if user recorded his activity or discarded it, so I can save my data or also discard according to that user decision.

    From your answer I assume it is not possible to know if activity was saved or not, so I have to always save my data but sometimes user is going to discard activity and I will store erroneous information. No workaround?

    Thanks a lot

  • look at the onTimer* calls.  Probably onTimerReset() is the closest, but you can't tell if the activity was saved or discarded.