#conten
Module: Toybox::ActivityRecording
Overview
The Activity Recording module will allow Apps to access the FIT file recording capabilities of the device. Apps can use this module to allow the user to start and stop recordings, create laps, and save recorded data.
- Since : 1.0.0
- App Types : App
- Requires Permission : Fit
Defined Under Namespace
Constant Summary
The SPORT enum allows definition of what kind of sport is being recorded.Use SPORT_GENERIC for sports not on the list.
- SPORT_GENERIC = 0 : Since : 1.0.0
- SPORT_RUNNING = 1 : Since : 1.0.0
- SPORT_CYCLING = 2 : Since : 1.0.0
- SPORT_TRANSITION = 3 : Sport used for mulitsport transitions. Since : 1.0.0
- SPORT_FITNESS_EQUIPMENT = 4 : Sport used for ANT enabled excercise equipment. Since : 1.0.0
- SPORT_SWIMMING = 5 : Since : 1.0.0
SPORT_BASKETBALL = 6
Since:
1.0.0
SPORT_SOCCER = 7
Since:
1.0.0
SPORT_TENNIS = 8
Since:
1.0.0
SPORT_AMERICAN_FOOTBALL = 9
Since:
1.0.0
SPORT_TRAINING = 10
Sport used for activities such as strength training, cardio, etc
Since:
1.0.0
SPORT_WALKING = 11
Since:
1.0.0
SPORT_CROSS_COUNTRY_SKIING = 12
Since:
1.0.0
SPORT_ALPINE_SKIING = 13
Since:
1.0.0
SPORT_SNOWBOARDING = 14
Since:
1.0.0
SPORT_ROWING = 15
Since:
1.0.0
SPORT_MOUNTAINEERING = 16
Since:
1.0.0
SPORT_HIKING = 17
Since:
1.0.0
SPORT_MULTISPORT = 18
Since:
1.0.0
SPORT_PADDLING = 19
Since:
1.0.0
SUB_SPORT_GENERIC = 0
Sub-sports allow for clarification of sport when recording. Use SUB_SPORT_GENERIC if no other sub-sport is applicable.
Since:
1.0.0
SUB_SPORT_TREADMILL = 1
Sub-sport for Running and Fitness Equipment
Since:
1.0.0
SUB_SPORT_STREET = 2
Sub-sport for Running
Since:
1.0.0
SUB_SPORT_TRAIL = 3
Sub-sport for Running
Since:
1.0.0
SUB_SPORT_TRACK = 4
Sub-sport for Running
Since:
1.0.0
SUB_SPORT_SPIN = 5
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_INDOOR_CYCLING = 6
Sub-sport for Cycling and Fitness Equipment
Since:
1.0.0
SUB_SPORT_ROAD = 7
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_MOUNTAIN = 8
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_DOWNHILL = 9
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_RECUMBENT = 10
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_CYCLOCROSS = 11
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_HAND_CYCLING = 12
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_TRACK_CYCLING = 13
Sub-sport for Cycling
Since:
1.0.0
SUB_SPORT_INDOOR_ROWING = 14
Sub-sport for Rowing and Fitness Equipment
Since:
1.0.0
SUB_SPORT_ELLIPTICAL = 15
Sub-sport for Fitness Equipment
Since:
1.0.0
SUB_SPORT_STAIR_CLIMBING = 16
Sub-sport for Fitness Equipment
Since:
1.0.0
SUB_SPORT_LAP_SWIMMING = 17
Sub-sport for Swimming
Since:
1.0.0
SUB_SPORT_OPEN_WATER = 18
Sub-sport for Swimming
Since:
1.0.0
SUB_SPORT_FLEXIBILITY_TRAINING = 19
Sub-sport for Training
Since:
1.0.0
SUB_SPORT_STRENGTH_TRAINING = 20
Sub-sport for Training
Since:
1.0.0
SUB_SPORT_WARM_UP = 21
Sub-sport for Activity Warm-up
Since:
1.0.0
SUB_SPORT_MATCH = 22
Sub-sport for Sports with Matches (e.g. Tennis)
Since:
1.0.0
SUB_SPORT_EXERCISE = 23
Sub-sport for Excercise
Since:
1.0.0
SUB_SPORT_CHALLENGE = 24
Sub-sport for a Sport Challenge
Since:
1.0.0
SUB_SPORT_INDOOR_SKIING = 25
Sub-sport for Fitness Equipment
Since:
1.0.0
SUB_SPORT_CARDIO_TRAINING = 26
Sub-sport for Training
Since:
1.0.0
Instance Method Summary
(collapse)
- (Session) createSession(options)
Use createSession() to create a session object with options determined by the caller.
Instance Method Details
- (Session) createSession(options)
Use createSession() to create a session object with options determined by the caller. Only one session object is allowed to exist at a time. If there is an existing object that has not been closed using the save() or discard() methods, this method will return that object instead of creating a new one.
Parameters:
options (Dictionary) —
A Dictionary containing session creation options
Options Hash (options):
:sport (Object) —
The primary sport being recorded (SPORT_GENERIC by default)
:subSport (Object) —
The sport subcategory being recorded (SUB_SPORT_GENERIC by default)
:name (String) —
Required. This is the name that will be associated with the sport being recorded. The suggested maximum length of the name is 15 characters (some devices support longer names).
Returns:
(Session) —
A new session object, or the existing session object if a session is active and has not been saved or discarded
Since:
1.0.0
最終更新:2016年03月02日 23:49