Skip to main content

Enable EmoGraphy & BioZ data & Accelerometer

The bracelet records EmoGraphy, BioZ and raw accelerometer data only when you enable them. From SDK 2.0.0 you enable them in the bracelet initialization, not with a command of your own.

DataEnable withWhere the data arrives
EmoGraphy (stress, EDA)InitializationConfig.isBiozOrEmographyEnabled = trueIn the daily summaries, see Stress data
BioZInitializationConfig.isBiozOrEmographyEnabled = trueAs raw .wiff files, see Raw File Transfer & Export
Raw accelerometerInitializationConfig.isAccEnabled = trueAs raw .wiff files, see Raw File Transfer & Export
Raw temperatureSetTemperatureRawPlan (a command, see below)As MetricTemperatureRaw, see Raw data models

What must be in place before the data arrives:

  1. The stream is enabled on the bracelet (this page).
  2. The bracelet is subscribed for the automatic data transfer, which downloads the data.
  3. Your licence includes the raw data. The automatic data transfer downloads a raw file only when the licence includes it. See The licence and raw data.
val manager = DataSdk.getInstance().getManager()

// At start, for every bracelet and every connection
manager.enableAutoInitialization(
InitializationConfig(
braceletPlan = DevicePlan.CONTINUOUS_GREEN_INTERMITTENT_MULTICOLOR,
samplingRate = SampleRate.ONE_MIN,
isAccEnabled = true,
isBiozOrEmographyEnabled = true,
)
)

To switch a stream on or off later, for a connected bracelet, call updateConfiguration with the new InitializationConfig. It applies the change at once, returns a Result, and the SDK uses the new configuration at every later connection. See Bracelet Initialization.

val bleDevice = BleSdk.getInstance().getDevice(address)

val result: Result<Boolean> = manager.updateConfiguration(
bleDevice,
InitializationConfig(
braceletPlan = DevicePlan.CONTINUOUS_GREEN_INTERMITTENT_MULTICOLOR,
samplingRate = SampleRate.ONE_MIN,
isBiozOrEmographyEnabled = false,
),
)

Enable / Disable metrics EmoGraphy & BioZ​

From SDK 2.0.0

Set it via the bracelet initialization, with isBiozOrEmographyEnabled.

EmoGraphy & BioZ are paired together: one flag turns both on (continuous recording) or both off.

warning

PPG 128 Hz can not be enabled when BioZ or EmoGraphy is enabled. BioZ / EmoGraphy can not be enabled together with NIBP either.

enableAutoInitialization and updateConfiguration refuse such a configuration:

  • updateConfiguration returns a failed Result and sends nothing to the bracelet.
  • enableAutoInitialization calls onError of the listener you passed and does not enable auto-initialization.

You can check a configuration yourself with InitializationConfig.isStandard().

The earlier command SetEmographyAndBiozPlan is deprecated. Do not send it: the next initialization overwrites it with the value of your InitializationConfig.

Get command​

Use the command GetEmoGraphyAndBiozPlan to read what the bracelet records:

import com.corsano.sdk.ble.command.enqueueCommand

bleDevice.enqueueCommand(
request = GetEmoGraphyAndBiozPlan(),
onSuccess = { plan ->
// plan is null when the bracelet's reply is not usable
val emography: VitalParameterValue? = plan?.param1
val bioz: VitalParameterValue? = plan?.param2
},
onError = { error -> Log.e("Corsano-SDK", "GetEmoGraphyAndBiozPlan error: $error") }
)

The result is a VitalParametersRequest?: param1 is the EmoGraphy setting and param2 the BioZ setting. The values of VitalParameterValue are:

ValueMeaning
DISABLENot recorded
CONTINUOUSRecorded all the time. This is what the bracelet initialization sets when the stream is enabled
BEDTIME_RISETIMEEnabled. The bracelet initialization never sets this value; the sample app shows it as enabled, like CONTINUOUS
UNKNOWNThe bracelet reports the value 0

Enable / Disable Accelerometer​

From SDK 2.0.0

Set it via the bracelet initialization, with isAccEnabled. true records the raw accelerometer continuously, false turns it off.

The earlier command SetAccelerometerPlan is deprecated, for the same reason as above.

Get command​

Use the command GetAccelerometerPlan()

bleDevice.enqueueCommand(
request = GetAccelerometerPlan(),
onSuccess = { plan ->
val accelerometer: VitalParameterValue? = plan?.param1
},
onError = { error -> Log.e("Corsano-SDK", "GetAccelerometerPlan error: $error") }
)

GetEmoGraphyAndBiozPlan and GetAccelerometerPlan also run on a bracelet that is not initialized yet.

Enable / Disable raw temperature​

The raw temperature is not part of the bracelet initialization. You switch it with a command, on a connected and initialized bracelet:

bleDevice.enqueueCommand(
request = SetTemperatureRawPlan(VitalParameterValue.CONTINUOUS), // DISABLE to turn it off
onSuccess = { acknowledged -> Log.d("Corsano-SDK", "Raw temperature set: $acknowledged") },
onError = { error -> Log.e("Corsano-SDK", "SetTemperatureRawPlan error: $error") }
)

GetTemperatureRawPlan() reads the setting back, in param1 of its result.

What the raw temperature is for, and what else it needs, is described in SDK extended temperature data.

Full code sample in the sample app files: DataStartFragment.kt and DataTemperatureRawFragment.kt