Set Menstruation
Function: setMenstruation [getMenstrualAddNotifyFlagV3, support_set_menstrual_reminder_on_off (to be supplemented by SDK)]
Flutter Example:
/// Set menstruation event number
setMenstruation(
evtBase: _VBusEvtBase.base_app_set,
evtType: _VBusEvtType.app_set_menstruation),
/// Set menstruation
libManager.send(evt: CmdEvtType.setMenstruation, json: jsonEncode(json));
JSON fields issued by the app:
Field Name | Field Type | Field Description |
---|---|---|
on_off | int | Menstruation switch 1: On 0: Off |
menstrual_length | int | Length of the menstrual period |
menstrual_cycle | int | Menstrual cycle |
last_menstrual_year | int | Year of the recent menstrual start time |
last_menstrual_month | int | Month of the recent menstrual start time |
last_menstrual_day | int | Day of the recent menstrual start time |
ovulation_interval_day | int | The interval from the next menstrual period to the ovulation day, usually 14 days |
ovulation_before_day | int | The number of days before the ovulation day in the fertility period, usually 5 |
ovulation_after_day | int | The number of days after the ovulation day in the fertility period, usually 5 |
notify_flag | int | Notification type 0: Invalid 1: Allow notifications 2: Silent notifications 3: Turn off notifications Requires firmware support for V3_menstrual_add_notify_flag |
menstrual_reminder_on_off | int | Menstruation reminder switch 1: On 0: Off Requires firmware support for support_set_menstrual_reminder_on_off When this switch is invalid, the reminder is enabled by default. |
Example:
{
"on_off": 1,
"menstrual_length": 7,
"menstrual_cycle": 21,
"last_menstrual_year": 2022,
"last_menstrual_month": 12,
"last_menstrual_day": 19,
"ovulation_interval_day": 15,
"ovulation_before_day": 5,
"ovulation_after_day": 5,
"notify_flag": 1,
"menstrual_reminder_on_off": 1
}