Package-level declarations

The main functionality of the Quantactions Android SDK.

Types

Link copied to clipboard
class BasicInfo(val yearOfBirth: Int = 0, val gender: QA.Gender = QA.Gender.UNKNOWN, val selfDeclaredHealthy: Boolean = false)

Data class only basic demographic information of the user associated with the device.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
sealed class Metric<P : TimestampedEntity, T> : CanReturnCompiledTimeSeries<P, T>

Enumeration class that holds all of the info for the metrics

Link copied to clipboard
class QA

This is the main element one needs to use to access all the functionality of the QA SDK. As a singleton it can be called easily from anywhere in the code and gives access to all the possible interactions with the QA backend, as well as some functions to retrieve user metrics. Since most of the calls are asynchronous server interactions, they return flows.

Link copied to clipboard
class QATaps(var taps: List<Int>, var totalTaps: Int, var speed: List<Float>)

This class will contain the result to the call QA.getLastTaps The length of taps and speed depends on the number of days requested. The taps array is an integer array while the speed array is float array

Link copied to clipboard
class Range(val low: Float, val high: Float)

For each subpopulation we provide a low and a high value for a range of a metric. Where high is the 75% percentile while low is the 25% percentile.

Link copied to clipboard
@JsonClass(generateAdapter = true)
class Subscription(val subscriptionId: String, val deviceIds: List<String>, val cohortId: String, val cohortName: String, val premiumFeaturesTTL: Long, val token: String?)

This object hold the information returned by the call QA.getSubscriptionId. It returns the subscriptionId, the list of deviceIds connected to this subscription and the cohortId relative to the subscription.

Link copied to clipboard
sealed class TimeSeries<T> : ManageTimeSeries<T>

Utility class to hold a pair of lists, one with the score values and one with the timestamps

Link copied to clipboard
sealed class Trend<P : TimestampedEntity, T> : CanReturnCompiledTimeSeries<P, T>

Enumeration class that holds all of the info for the metrics

Link copied to clipboard

Functions

Link copied to clipboard
fun periodicMean(zonedDateTimes: List<ZonedDateTime>, references: List<ZonedDateTime>, reference: LocalDateTime): ZonedDateTime

This function calculates the period mean of a series of ZonedDateTime. Given this is a periodic mean and not a full mean the result is not a ZonedDateTime but a LocalDateTime. This function only cares about the local time when calculating the mean. You can ue this to calculate for example the average wake up time of a person given a list of wake up times.