Connect IQ > APIメモ > Toybox > ActivityRecording > Session

下位ページ

Content
#conten

Class: Toybox::ActivityRecording::Session


Session objects control the FIT recording state machine.
  • Since : 1.0.0

関数(要約)

  • (Boolean) addLap : Add a lap to the current recording by calling addLap().
  • (Boolean) discard : 記録完了後、記録を完全に消去する
  • (GeometryIterator) getGeometry deprecated Deprecated. : The GeometryIterator class will be dropped in Connect IQ 3.x
  • (Boolean) isRecording : Use isRecording() to check if recording is active for this session.
  • (Boolean) save : After recording is complete, the save() method will complete the session by storing the FIT file on the file system.
  • (Boolean) start : To begin recording a FIT file on the system, start() should be called.
  • (Boolean) stop : To stop recording a FIT file on the system, stop() should be called.

Instance Method Details

(Boolean) addLap

Add a lap to the current recording by calling addLap().
  • Returns : (Boolean) true if a lap was successfully created, or false if a lap could not be created
  • Since : 1.0.0

(Boolean) discard 記録完了後、セッションを完全に消去する

  • Returns : (Boolean) true if the session was succesfully discarded, else false
  • Since : 1.0.0

(GeometryIterator) getGeometry

Deprecated.

The GeometryIterator class will be dropped in Connect IQ 3.x

Get a GeometryIterator for the session. Call get() to retrieve the Location. Use next() to iterate to the next point. It is important that the geometryIterator doesn't persist as this locks down the ActivityRecording. Use it to iterate the points and then let it go. If there are no points, null is returned.

  • Returns : (GeometryIterator) A geometry iterator for the session or null
  • Since : 1.0.0

(Boolean) isRecording

Use isRecording() to check if recording is active for this session.
  • Returns : (Boolean) true if recording is active, false otherwise
  • Since : 1.0.0

(Boolean) save

After recording is complete, the save() method will complete the session by storing the FIT file on the file system.
  • Returns : (Boolean) true if the session was succesfully saved, or false if it was unable to save
  • Since : 1.0.0

(Boolean) start

To begin recording a FIT file on the system, start() should be called.
  • Returns : (Boolean) true if recording was successfully started, or false if it could not be started
  • Since : 1.0.0

(Boolean) stop

To stop recording a FIT file on the system, stop() should be called.
  • Returns : (Boolean) true if recording was successfully stopped, or false if it could not be stopped
  • Since : 1.0.0
最終更新:2016年03月02日 23:49