Bracelet init and setup
To set up the bracelet and the Android SDK here are the main steps to implement:
- Pair and connect to the bracelet
- Set up the bracelet parameter
- Set up the automatic data transfer between the Bracelet to the Android SDK database
- Retrieve the data
Step 2: Set up the bracelet parameters
To get the right data or metrics, the bracelet needs specific settings. Prior to download the data, please follow these settings steps. Perform these commands after each reconnection of the bracelet to your app.
Bracelet initilization
From SDK 2.0.0
Set it via the bracelet initialization
It will:
- Set time: ensure bracelet time is OK and set it in the user's timezone
- Set the bracelet to measure the necessary data at the specified rate and frequency
Deprecates the commands recommanded in the previous SDK:
- SetTimeRequest()
- SetPlanRequest
- SetVitalParameterSamplingRateRequest
- SetEmographyAndBiozPlan
- SetAccelerometerPlan
User Profile
Steps depends on the user height, weight, the user profile needs to be set to get the most accurate data: It is important to set the user profile: (height, weight), because this will be send to the bracelet and be used in calculations.
Weight / Height
- Weight
Use the following commands:
SetHeightRequest(height)
SetWeightRequest(weight)
Weight in kg
Height in cm
Get commands are available as well, if necessary:
GetWeightRequest()
GetHeightRequest()
Bedtime / risetime
The sleep monitoring uses the bracelet battery, and to avoid a high consumption, the sleep is not monitored all day long. This is why it is important to set a theoretical bedtime and risetime to the bracelet. The sleep will be monitored starting 2 hours before the theoretical bedtime and 3h maximum after the rise time (sleep stop conditions below).
SET Bedtime / risetime
SetBedtimeRequest(bedtimeGmt)
SetRisetimeRequest(risetimeGmt)
These commands use the following structure
data class HourMinuteRecord(val hour: Int, val minute: Int)
⚠️ Pass the time in GMT time
Example: user in France GMT+1 7:00 risetime local time -> send to bracelet 6:00 22:30 bedtime local time -> send to bracelet 21:30
Example 2: user in Iran GMT +3:30E 7:00 risetime local time -> send to bracelet 03:30 22:30 bedtime local time -> send to bracelet 19:00
Transform to GMT time: You can use the function
val bedtimeGmt = HourMinuteRecord(22,30).transformToGmtTime()
val risetimeGmt = HourMinuteRecord(7,0).transformToGmtTime()
Full code sample in the sample app file:
UserProfileFragment.kt
Get Bedtime / risetime
Get commands are available as well, if necessary:
GetBedtimeRequest()
GetRisetimeRequest()
Full code sample in the sample app file:
UserProfileFragment.kt
Profile: birthdate / gender / wrist / skin tone
SET profile
The bracelet needs to be initialised with the user's profile:
- Birthdate and gender: used mostly for the activity data (steps, workout)
- Wrist: is mandatory for every metric
- Skin tone: based on the Fitzpatrick scale (1 -> 6), important for every metric
Please use the UserProfileSetRecord, here is an example:
device.enqueueCommands(
SetUserProfileRequest(UserProfileSetRecord(1960, 1, 22, Gender.MALE, Wrist.LEFT, SkinType.FAIR))
GET profile
device.enqueueCommands(
GetUserProfileRequest())
Return object:
data class UserProfileGetRecord(
val age: Int,
val gender: Gender,
val wrist: Wrist,
val skinType: SkinType? = null
)
Data types
public final enum class Gender : kotlin.Enum<com.corsano.sdk.ble.data.Gender> {
MALE,
FEMALE,
UNSPECIFIED;
}
public final enum class Wrist : kotlin.Enum<com.corsano.sdk.ble.data.Wrist> {
LEFT,
RIGHT;
}
public final enum class SkinType : kotlin.Enum<com.corsano.sdk.ble.data.SkinType> {
VERY_FAIR,
FAIR,
OLIVE,
LIGHT_BROWN,
BROWN,
BLACK_BROWN;
}
- VERY_FAIR = Fitzpatrick 1
- FAIR = Fitzpatrick 2
- OLIVE = Fitzpatrick 3
- LIGHT_BROWN = Fitzpatrick 4
- BROWN = Fitzpatrick 5
- BLACK_BROWN = Fitzpatrick 6
Full code sample in the sample app file:
UserProfileFragment.kt
Wearing optimization
Moved to its own page: Wearing Optimization.
Sleep settings
Moved to its own page: Sleep Settings.
PPG2 / BioZ / Accelerometer / ECG transfer & export
Moved to its own page: Raw File Transfer & Export.
ECG Measurement
Documented on the ECG measurement page.