Stay organized with collections
    
    
      
      Save and categorize content based on your preferences.
    
  
  
    
  
  
  
  
    
    
    
  
  
    
    
    
    PlannedExerciseSessionRecord
    class PlannedExerciseSessionRecord : IntervalRecord
    
    Captures a planned exercise session, also commonly referred to as a training plan. 
    Each record contains a start time, end time, an exercise type and a list of PlannedExerciseBlock which describe the details of the planned session. The start and end times may be in the future.
    Summary
    
    
      
        
          | Public methods | 
        
          | Boolean | Indicates whether some other object is "equal to" this one. | 
        
          | MutableList<PlannedExerciseBlock!> | Returns the exercise blocks for this step. | 
        
          | String? | Returns the id of exercise session that completed this planned session. | 
        
          | Duration | Returns the expected duration of the planned session. | 
        
          | Int | Returns the exercise type of this planned session. | 
        
          | CharSequence? | Returns notes for this planned session. | 
        
          | LocalDate | Returns the start date of the planned session. | 
        
          | CharSequence? | Returns title of this planned session. | 
        
          | Boolean | Returns whether this planned session has an explicit time. | 
        
          | Int |  | 
      
    
    
    Public methods
    
      equals
      
      fun equals(other: Any?): Boolean
      Indicates whether some other object is "equal to" this one.
      
        
          
            | Parameters | 
          
            | obj | the reference object with which to compare. | 
          
            | object | the reference object with which to compare. This value may be null. | 
          
            | o | This value may be null. | 
        
      
      
        
          
            | Return | 
          
            | Boolean | trueif this object is the same as the obj | 
        
      
     
    
    
      getCompletedExerciseSessionId
      
      fun getCompletedExerciseSessionId(): String?
      Returns the id of exercise session that completed this planned session. Returns null if none exists.
     
    
      getDuration
      
      fun getDuration(): Duration
      Returns the expected duration of the planned session.
      
        
          
            | Return | 
          
            | Duration | This value cannot be null. | 
        
      
     
    
      getExerciseType
      
      fun getExerciseType(): Int
      Returns the exercise type of this planned session.
      
        
          
            | Return | 
          
            | Int | Value is android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_UNKNOWN,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BADMINTON,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BASEBALL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BASKETBALL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BIKING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BIKING_STATIONARY,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BOOT_CAMP,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_BOXING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_CALISTHENICS,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_CRICKET,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_DANCING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ELLIPTICAL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_EXERCISE_CLASS,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_FENCING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_FOOTBALL_AMERICAN,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_FOOTBALL_AUSTRALIAN,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_FRISBEE_DISC,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_GOLF,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_GUIDED_BREATHING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_GYMNASTICS,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_HANDBALL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_HIGH_INTENSITY_INTERVAL_TRAINING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_HIKING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ICE_HOCKEY,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ICE_SKATING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_MARTIAL_ARTS,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_PADDLING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_PARAGLIDING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_PILATES,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_RACQUETBALL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ROCK_CLIMBING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ROLLER_HOCKEY,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ROWING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_ROWING_MACHINE,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_RUGBY,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_RUNNING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_RUNNING_TREADMILL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SAILING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SCUBA_DIVING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SKATING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SKIING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SNOWBOARDING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SNOWSHOEING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SOCCER,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SOFTBALL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SQUASH,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_STAIR_CLIMBING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_STAIR_CLIMBING_MACHINE,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_STRENGTH_TRAINING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_STRETCHING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SURFING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SWIMMING_OPEN_WATER,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_SWIMMING_POOL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_TABLE_TENNIS,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_TENNIS,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_VOLLEYBALL,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_WALKING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_WATER_POLO,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_WEIGHTLIFTING,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_WHEELCHAIR,android.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_OTHER_WORKOUT, orandroid.health.connect.datatypes.ExerciseSessionType#EXERCISE_SESSION_TYPE_YOGA | 
        
      
     
    
      getNotes
      
      fun getNotes(): CharSequence?
      Returns notes for this planned session. Returns null if it doesn't have notes.
     
    
      getStartDate
      
      fun getStartDate(): LocalDate
      Returns the start date of the planned session.
      
     
    
      getTitle
      
      fun getTitle(): CharSequence?
      Returns title of this planned session. Returns null if it doesn't have a title.
     
    
      hasExplicitTime
      
      fun hasExplicitTime(): Boolean
      Returns whether this planned session has an explicit time. If only a date was provided this will be false.
     
    
      hashCode
      
      fun hashCode(): Int
      
        
          
            | Return | 
          
            | Int | a hash code value for this object. | 
        
      
     
  
  
  
    
  
 
  
    
      
      
    
    
      
    
    
  
       
    
    
      
    
  
  
  Content and code samples on this page are subject to the licenses described in the Content License. Java and OpenJDK are trademarks or registered trademarks of Oracle and/or its affiliates.
  Last updated 2025-02-10 UTC.