HealthData

interface HealthData

Interface for retrieving measurements.

HealthData accumulate data from wristband and server at local database.

Properties

Link copied to clipboard
abstract val currentNeuroData: Flowable<NeuroData>

Returns Flowable that emits last neuroactivity.

Link copied to clipboard
abstract val currentStressLevel: Flowable<Float>

Returns Flowable that emits current stress level.

Link copied to clipboard
abstract val currentStressState: Flowable<StressState>

Returns Flowable that emits current stress state.

Link copied to clipboard
abstract val energyDataMaxTimestamp: Flowable<Long>

Returns Flowable that emits UNIX-timestamp of last energy data.

Link copied to clipboard
abstract val hydrationState: Flowable<HydrationState>

Returns Flowable that emits current hydration state.

Link copied to clipboard
abstract val lastStressData: Flowable<StressData>

Returns Flowable that emits last stress data.

Link copied to clipboard
abstract val minTimestamp: Flowable<Long>

Returns Flowable that emits UNIX timestamp of the first measurements.

Link copied to clipboard
abstract val stressDataMaxTimestamp: Flowable<Long>

Returns Flowable that emits UNIX-timestamp of last stress data.

Functions

Link copied to clipboard
abstract fun addWeight(weight: HDWeight, precision: Int? = null): Completable

Add new weight.

abstract fun addWeight(weights: List<HDWeight>, precision: Int? = null): Completable

Add new weights.

Link copied to clipboard
abstract fun addWeightGoal(goal: HDWeightGoal): Completable

Add new weight goal.

Link copied to clipboard
abstract fun addWeightWithSkip(weights: List<HDWeight>, precision: Int? = null): Completable

Add new weights and skip all already existed weights.

Link copied to clipboard
abstract fun deleteWeight(weight: HDWeight): Completable

Delete existing weight.

Link copied to clipboard
abstract fun getAllDaySummaries(daysBack: Int): Flowable<DaySummary>

Returns Flowable that emits summary for day daysBack ago.

Link copied to clipboard
abstract fun getBloodPressure(daysBack: Int): Flowable<List<BloodPressure>>

Returns Flowable that emits list of blood pressure measurements for day daysBack ago.

Link copied to clipboard
abstract fun getDeletedWeights(from: Long = 0, asc: Boolean = true): Single<List<HDWeight>>

Returns Single that emits deleted weights sorted by HDWeight.measurementTime.

Link copied to clipboard
abstract fun getEnergyData(daysBack: Int): Flowable<List<EnergyData>>

Returns Flowable that emits list of energy data for day daysBack ago.

abstract fun getEnergyData(sinceTimestamp: Long): Flowable<List<EnergyData>>

Returns Flowable that emits list of energy data since specified time.

Link copied to clipboard
abstract fun getEnergySummary(daysBack: Int): Flowable<Container<EnergySummary>>

Returns Flowable that emits container with energy summary for day daysBack ago.

abstract fun getEnergySummary(from: Long, to: Long): Flowable<List<Container<EnergySummary>>>

Returns Flowable that emits list of containers with energy summaries for period from from to to.

Link copied to clipboard
abstract fun getEnergySummaryDates(from: Long, to: Long): Flowable<List<Date>>

Returns Flowable that emits list of dates of energy summaries for period from from to to.

Link copied to clipboard
abstract fun getFinalizedMealData(since: Long): Flowable<List<MealData>>

Returns Flowable that emits list of finalized meals (which won't be changed) since specified time.

Link copied to clipboard
abstract fun getHeartData(daysBack: Int): Flowable<List<HeartData>>

Returns Flowable that emits list of heart data for day daysBack ago.

abstract fun getHeartData(sinceTimestamp: Long): Flowable<List<HeartData>>

Returns Flowable that emits list of heart data since specified time.

abstract fun getHeartData(from: Long, to: Long): Flowable<List<HeartData>>

Returns Flowable that emits list of heart data for period from from to to.

Link copied to clipboard
abstract fun getHeartSummary(daysBack: Int): Flowable<Container<HeartSummary>>

Returns Flowable that emits container with heart summary for day daysBack ago.

Link copied to clipboard
abstract fun getHydrationSummary(daysBack: Int): Flowable<Container<HydrationSummary>>

Returns Flowable that emits container with hydration summary for day daysBack ago.

Link copied to clipboard
abstract fun getMaxStressData(daysBack: Int): Single<Float>

Returns Single that emits maximum stress value for day daysBack ago.

Link copied to clipboard
abstract fun getMealsGroupsInBounds(periods: Map<Int, LongRange>): Flowable<Map<Int, List<MealData>>>

Returns Flowable that emits lists of meals for periods.

Link copied to clipboard
abstract fun getMinStressData(daysBack: Int): Single<Float>

Returns Single that emits minimum stress value for day daysBack ago.

Link copied to clipboard
abstract fun getMinTimestamp(sinceTimestamp: Long): Flowable<Long>

Returns Flowable that emits UNIX timestamp of the first measurements since specified time.

Link copied to clipboard
abstract fun getNeuroSummary(daysBack: Int): Flowable<Container<NeuroSummary>>

Returns Flowable that emits container with neuroactivity summary for day daysBack ago.

Link copied to clipboard
abstract fun getNonDeletedWeights(from: Timestamp = 0, to: Long = Timestamp.MAX_VALUE, exceptSource: Source, asc: Boolean = true): Single<List<HDWeight>>

Returns Single that emits non deleted weight sorted by HDWeight.measurementTime.

Link copied to clipboard
abstract fun getNotDeletedMealData(daysBack: Int): Flowable<List<MealData>>

Returns Flowable that emits list of meals for day daysBack ago.

Link copied to clipboard
abstract fun getNotDeletedMealsBetween(from: Long, to: Long): Flowable<List<MealData>>

Returns Flowable that emits list of meals for period from from to to.

Link copied to clipboard
abstract fun getStepsData(sinceTimestamp: Long): Flowable<List<StepsData>>

Returns Flowable that emits list of steps data since specified time.

Link copied to clipboard
abstract fun getStressData(daysBack: Int): Flowable<List<StressData>>

Returns Flowable that emits list of stress data for day daysBack ago.

abstract fun getStressData(from: Long, to: Long): Flowable<List<StressData>>

Returns Flowable that emits list of stress data for period from from to to.

Link copied to clipboard
abstract fun getStressSummary(daysBack: Int): Flowable<Container<StressSummary>>

Returns Flowable that emits container with stress summary for day daysBack ago.

Link copied to clipboard
abstract fun getStressTimeMinutes(level: StressLevel, daysBack: Int): Flowable<Int>

Returns Flowable that emits duration in minutes of specified stress level for day daysBack ago.

abstract fun getStressTimeMinutes(level: StressLevel, from: Long, to: Long): Flowable<Int>

Returns Flowable that emits duration in minutes of specified stress level for period from from to to.

Link copied to clipboard
abstract fun getUpdatedWeights(from: Long = 0, exceptSource: Source, asc: Boolean = true): Single<List<HDWeight>>

Returns Single that emits non deleted weights sorted by HDWeight.measurementTime.

Link copied to clipboard
abstract fun getWeightLastTimestamp(source: Source? = null): Single<Timestamp>

Return Single that emits last HDWeight.measurementTime or 0 as UNIX timestamp.

Link copied to clipboard
abstract fun observeAccumulatedStressDuration(daysBack: Int): Flowable<Int>
abstract fun observeAccumulatedStressDuration(from: Timestamp, to: Timestamp): Flowable<Int>

Returns Flowable that emits duration of accumulated stress (stress above normal) in minutes for specified period.

Link copied to clipboard

Returns Flowable that emits duration of current stress state.

Link copied to clipboard
abstract fun observeHeartRate(): Observable<CurrentHeartRate>

Returns Observable that emits information of current heart rate.

Link copied to clipboard
abstract fun observeHydrationData(daysBack: Int): Flowable<List<HydrationData>>

Returns Flowable that emits list of hydration data for day daysBack ago.

Link copied to clipboard
abstract fun observeHydrationDataMaxTimestamp(): Flowable<Long>

Returns Flowable that emits UNIX-timestamp of last hydration data.

Link copied to clipboard
abstract fun observeLastHydrationData(): Flowable<HydrationData>

Returns Flowable that emits last hydration data.

Link copied to clipboard
abstract fun observeLastWeight(from: Timestamp = 0, to: Timestamp = Timestamp.MAX_VALUE): Flowable<HDWeight>

Returns Flowable that emits last non deleted weight.

Link copied to clipboard
abstract fun observeLastWeightGoal(): Flowable<HDWeightGoal>

Returns Flowable that emits last weight goal.

Link copied to clipboard
abstract fun observeMaxDailyBpmValue(daysBack: Int): Flowable<Int>

Returns Flowable that emits maximum pulse for day daysBack ago.

Link copied to clipboard
abstract fun observeMinDailyBpmValue(daysBack: Int): Flowable<Int>

Returns Flowable that emits minimum pulse for day daysBack ago.

Link copied to clipboard
abstract fun observeNutrients(daysBack: Int): Flowable<Nutrients>

Returns Flowable that emits nutrients for day daysBack ago.

Link copied to clipboard
abstract fun observeWeightGoalsDesc(): Flowable<List<HDWeightGoal>>

Returns Flowable that emits weight goals sorted descending.

Link copied to clipboard
abstract fun observeWeightsNonDeleted(asc: Boolean = true): Flowable<List<HDWeight>>

Returns Flowable that emits non deleted weights sorted by HDWeight.measurementTime.

Link copied to clipboard
abstract fun secondsOfWearing(daysBack: Int): Flowable<Int>

Returns Flowable that emits wearing duration in seconds for day daysBack ago.

abstract fun secondsOfWearing(from: Long, to: Long): Flowable<Int>

Returns Flowable that emits wearing duration in seconds for period from from to to.

Link copied to clipboard
abstract fun updateWeight(newWeight: HDWeight, oldWeight: HDWeight, precision: Int? = null): Completable

Update existing weight.

Link copied to clipboard
abstract fun updateWeightGoalStatus(goal: HDWeightGoal, newStatus: GoalStatus? = null, changeStatusDate: Timestamp = currentTimestamp): Completable

Update weight goal status.

Extensions

Link copied to clipboard

RxJava2 neuroactivity interface getter for HealthData.

Link copied to clipboard

Coroutines & Flow neuroactivity interface getter for HealthData.

Link copied to clipboard

RxJava2 sleep data interface getter for HealthData.