getParameterFromDataType static method
Implementation
static GoogleHealthParameterType getParameterFromDataType(
HealthDataType dataType) {
switch (dataType) {
case (HealthDataType.ACTIVE_ENERGY_BURNED):
return GoogleHealthParameterType.activeCalories;
case (HealthDataType.BASAL_ENERGY_BURNED):
return GoogleHealthParameterType.basalCalories;
case (HealthDataType.BLOOD_GLUCOSE):
return GoogleHealthParameterType.bloodGlucose;
case (HealthDataType.BLOOD_OXYGEN):
return GoogleHealthParameterType.bloodOxygen;
case (HealthDataType.BLOOD_PRESSURE_SYSTOLIC):
return GoogleHealthParameterType.bloodPressureSystloc;
case (HealthDataType.BLOOD_PRESSURE_DIASTOLIC):
return GoogleHealthParameterType.bloodPressureDiastolic;
case (HealthDataType.BODY_FAT_PERCENTAGE):
return GoogleHealthParameterType.bodyFatPercentage;
case (HealthDataType.BODY_MASS_INDEX):
return GoogleHealthParameterType.bmi;
case (HealthDataType.BODY_TEMPERATURE):
return GoogleHealthParameterType.bodyTemperature;
case (HealthDataType.HEART_RATE):
return GoogleHealthParameterType.heartRate;
case (HealthDataType.HEIGHT):
return GoogleHealthParameterType.height;
case (HealthDataType.RESTING_HEART_RATE):
return GoogleHealthParameterType.restingHeartRate;
case (HealthDataType.RESPIRATORY_RATE):
return GoogleHealthParameterType.respiratoryRate;
case (HealthDataType.STEPS):
return GoogleHealthParameterType.steps;
case (HealthDataType.WEIGHT):
return GoogleHealthParameterType.weight;
case (HealthDataType.FLIGHTS_CLIMBED):
return GoogleHealthParameterType.flightsClimbed;
case (HealthDataType.SLEEP_ASLEEP):
return GoogleHealthParameterType.totalSleepDuration;
case (HealthDataType.SLEEP_DEEP):
return GoogleHealthParameterType.deepSleepDuration;
case (HealthDataType.SLEEP_REM):
return GoogleHealthParameterType.remSleepDuration;
case (HealthDataType.WATER):
return GoogleHealthParameterType.water;
case (HealthDataType.DISTANCE_WALKING_RUNNING):
return GoogleHealthParameterType.distance;
case (HealthDataType.EXERCISE_TIME):
return GoogleHealthParameterType.activityTime;
case (HealthDataType.DISTANCE_DELTA):
return GoogleHealthParameterType.distanceDelta;
case (HealthDataType.SLEEP_LIGHT):
return GoogleHealthParameterType.lightSleepDuration;
case (HealthDataType.SLEEP_OUT_OF_BED):
return GoogleHealthParameterType.outOfBedSleepDuration;
case (HealthDataType.SLEEP_SESSION):
return GoogleHealthParameterType.sleepSessionDuration;
case (HealthDataType.NUTRITION):
return GoogleHealthParameterType.nutrition;
default:
return GoogleHealthParameterType.steps;
}
}