# Enum WorkoutActivityType

java.lang.Object
java.lang.Enum<WorkoutActivityType>
com.codename1.health.WorkoutActivityType

All Implemented Interfaces:
  `Comparable<WorkoutActivityType>`

public enum WorkoutActivityType extends Enum<WorkoutActivityType>

What kind of exercise a workout records.

##### A deliberate subset

HealthKit defines around eighty activity types and Health Connect around ninety, and the two lists do not line up. An exhaustive mapping table would be large, unverifiable, and wrong in ways nobody would notice until a user's yoga session showed up as pilates.

So this enum covers the common activities honestly and offers `OTHER` plus `WorkoutSample.getPlatformCode()` as the escape hatch for apps that need exact platform fidelity. Reading `getPlatformCode()` gives you the raw `HKWorkoutActivityType` or `ExerciseSessionRecord` constant the platform actually recorded.

- ## Enum Constant Summary

  Enum Constants
  Enum Constant
  Description
  `AMERICAN_FOOTBALL`
  `BADMINTON`
  `BASEBALL`
  `BASKETBALL`
  `BOXING`
  `CLIMBING`
  `COOLDOWN`
  `CORE_TRAINING`
  `CRICKET`
  `CYCLING`
  `DANCE`
  `ELLIPTICAL`
  `FOOTBALL`
  `FUNCTIONAL_TRAINING`
  `GOLF`
  `HIGH_INTENSITY_INTERVAL_TRAINING`
  `HIKING`
  `MARTIAL_ARTS`
  `MOUNTAIN_BIKING`
  `OTHER`
  An activity this enum does not name.
  `PADDLING`
  `PILATES`
  `ROWING`
  `RUGBY`
  `RUNNING`
  `SKATING`
  `SKIING`
  `SNOWBOARDING`
  `SQUASH`
  `STAIR_CLIMBING`
  `STRENGTH_TRAINING`
  `STRETCHING`
  `SURFING`
  `SWIMMING`
  `TABLE_TENNIS`
  `TENNIS`
  `VOLLEYBALL`
  `WALKING`
  `WHEELCHAIR`
  `YOGA`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `static WorkoutActivityType`
  `valueOf(String name)`
  Returns the enum constant of this type with the specified name.
  `static WorkoutActivityType[]`
  `values()`
  Returns an array containing the constants of this enum type, in the order they are declared.

  ### Methods inherited from class Enum

  `clone, compareTo, equals, getDeclaringClass, getEnumValues, hashCode, name, ordinal, setEnumValues, toString, valueOf`

  ### Methods inherited from class Object

  `getClass, notify, notifyAll, wait, wait, wait`

- ## Enum Constant Details

  - ### OTHER

    public static final WorkoutActivityType OTHER
    An activity this enum does not name. Check `WorkoutSample.getPlatformCode()` for the platform's own value.

  - ### WALKING

    public static final WorkoutActivityType WALKING

  - ### RUNNING

    public static final WorkoutActivityType RUNNING

  - ### HIKING

    public static final WorkoutActivityType HIKING

  - ### CYCLING

    public static final WorkoutActivityType CYCLING

  - ### MOUNTAIN_BIKING

    public static final WorkoutActivityType MOUNTAIN_BIKING

  - ### SWIMMING

    public static final WorkoutActivityType SWIMMING

  - ### ROWING

    public static final WorkoutActivityType ROWING

  - ### ELLIPTICAL

    public static final WorkoutActivityType ELLIPTICAL

  - ### STAIR_CLIMBING

    public static final WorkoutActivityType STAIR_CLIMBING

  - ### HIGH_INTENSITY_INTERVAL_TRAINING

    public static final WorkoutActivityType HIGH_INTENSITY_INTERVAL_TRAINING

  - ### STRENGTH_TRAINING

    public static final WorkoutActivityType STRENGTH_TRAINING

  - ### CORE_TRAINING

    public static final WorkoutActivityType CORE_TRAINING

  - ### FUNCTIONAL_TRAINING

    public static final WorkoutActivityType FUNCTIONAL_TRAINING

  - ### YOGA

    public static final WorkoutActivityType YOGA

  - ### PILATES

    public static final WorkoutActivityType PILATES

  - ### DANCE

    public static final WorkoutActivityType DANCE

  - ### MARTIAL_ARTS

    public static final WorkoutActivityType MARTIAL_ARTS

  - ### BOXING

    public static final WorkoutActivityType BOXING

  - ### CLIMBING

    public static final WorkoutActivityType CLIMBING

  - ### SKIING

    public static final WorkoutActivityType SKIING

  - ### SNOWBOARDING

    public static final WorkoutActivityType SNOWBOARDING

  - ### SKATING

    public static final WorkoutActivityType SKATING

  - ### SURFING

    public static final WorkoutActivityType SURFING

  - ### PADDLING

    public static final WorkoutActivityType PADDLING

  - ### GOLF

    public static final WorkoutActivityType GOLF

  - ### TENNIS

    public static final WorkoutActivityType TENNIS

  - ### BADMINTON

    public static final WorkoutActivityType BADMINTON

  - ### SQUASH

    public static final WorkoutActivityType SQUASH

  - ### TABLE_TENNIS

    public static final WorkoutActivityType TABLE_TENNIS

  - ### BASKETBALL

    public static final WorkoutActivityType BASKETBALL

  - ### FOOTBALL

    public static final WorkoutActivityType FOOTBALL

  - ### AMERICAN_FOOTBALL

    public static final WorkoutActivityType AMERICAN_FOOTBALL

  - ### BASEBALL

    public static final WorkoutActivityType BASEBALL

  - ### VOLLEYBALL

    public static final WorkoutActivityType VOLLEYBALL

  - ### CRICKET

    public static final WorkoutActivityType CRICKET

  - ### RUGBY

    public static final WorkoutActivityType RUGBY

  - ### WHEELCHAIR

    public static final WorkoutActivityType WHEELCHAIR

  - ### COOLDOWN

    public static final WorkoutActivityType COOLDOWN

  - ### STRETCHING

    public static final WorkoutActivityType STRETCHING

- ## Method Details

  - ### values

    public static WorkoutActivityType[] values()
    Returns an array containing the constants of this enum type, in the order they are declared.
    Returns:
      an array containing the constants of this enum type, in the order they are declared

  - ### valueOf

    public static WorkoutActivityType valueOf(String name)
    Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
    Parameters:
      `name` - the name of the enum constant to be returned.
    Returns:
      the enum constant with the specified name
    Throws:
      `IllegalArgumentException` - if this enum type has no constant with the specified name
      `NullPointerException` - if the argument is null