Android Realtime SDK

class Terra

An object that manages getting data, verifying signatures and authenticating users

Initialisation

TerraRT(
    devId: String,
    context: Context,
    referenceId: String?,
    completion: (Boolean) -> Unit,
)

Methods

Method NameReturnsExplanation
initConnectionnullinitialises the connection between the device and Terra
startDeviceScannullwill pull a widget up to allow the user to scan and connect to a device.
startRealtimenullstarts sending realtime data
stopRealtimenullstops sending realtime data
disconnectnulldisconnects device and Terra

Connections Enum

enum class Connections {
    BLE,
    WEAR_OS,
    ANDROID,
    ANT,
    ALL_DEVICES
}

BLE – includes Garmin HR Broadcasts, Polar, Wahoo, XIAOMI Bands and more
Wear OS - with Terra WearOS RT SDK
ANT - includes Garmin HR Broadcasts, and ANT+ Supported fitness equipments!
Android - device sensors like acceleration, location, gyroscope, etc.
ALL_DEVICES - includes all BLE and ANT+ devices (v0.3.1 onwards only)

DataTypes

enum class DataTypes {
    HEART_RATE,
    ECG,
    STEPS,
    HRV,
    CALORIES,
    LOCATION,
    DISTANCE,
    ACTIVITY,
    ACCELERATION,
    GYROSCOPE,
    FLOORS_CLIMBED,
    STEPS_CADENCE,
    SPEED,
    POWER,
    BIKE_CADENCE,
    MET,
    RR_INTERVAL;
}