Class: Toybox.ActivityRecording.Session
- Inherits:
-
Toybox.Lang.Object
Overview
Session objects control the FIT recording state machine.
Instance Method Summary collapse
-
addLap() as Lang.Boolean
Add a lap to the current recording.
-
createField(name as Lang.String, fieldId as Lang.Number, type as FitContributor.DataType, options as { :count as Lang.Number, :mesgType as Lang.Number, :units as Lang.String, :nativeNum as Lang.Number }) as FitContributor.Field
Create a new Field.
-
discard() as Lang.Boolean
Complete the Session by discarding the recorded data.
-
isRecording() as Lang.Boolean
Check if recording is active for this Session.
-
save() as Lang.Boolean
Complete the session by storing the FIT file on the file system.
-
setTimerEventListener(listener as Lang.Method(eventType as ActivityRecording.TimerEventType, eventData as Lang.Dictionary) as Void) as Void
Set the listener for Session timer events The listener method is called whenever a new timer event occurs.
-
start() as Lang.Boolean
Begin recording a FIT file on the system.
-
stop() as Lang.Boolean
Stop recording a FIT file on the system.
Instance Method Details
addLap() as Lang.Boolean
Add a lap to the current recording.
createField(name as Lang.String, fieldId as Lang.Number, type as FitContributor.DataType, options as { :count as Lang.Number, :mesgType as Lang.Number, :units as Lang.String, :nativeNum as Lang.Number }) as FitContributor.Field
Create a new Field.
Field objects allow developers to store information in FIT developer fields. This information can be displayed in Garmin Connect as a per-second graph, as lap information, or as workout summary information.
discard() as Lang.Boolean
Complete the Session by discarding the recorded data.
isRecording() as Lang.Boolean
Check if recording is active for this Session.
save() as Lang.Boolean
Complete the session by storing the FIT file on the file system.
setTimerEventListener(listener as Lang.Method(eventType as ActivityRecording.TimerEventType, eventData as Lang.Dictionary) as Void) as Void
Set the listener for Session timer events
The listener method is called whenever a new timer event occurs.
The keys in the Dictionary passed to the listener callback depend on the the value of the eventType parameter.
start() as Lang.Boolean
Begin recording a FIT file on the system.
stop() as Lang.Boolean
Stop recording a FIT file on the system.