Set period history data

Function table

__IDO_FUNCTABLE__.funcTable38Model.historyMenstrual

Menstrual period history data model description

  • IDOMenstrualHistoryDataItemModel
Parameter Description Remark
year Year period started int
month Month period started int
day Day period started int
menstrualDay Menstrual length int (Unit: day)
cycleDay Cycle length int (Unit: day)
  • IDOMenstrualHistoryDataModel
Parameter Description Remark
avgMenstrualDay Average menstrual length int
avgCycleDay Average period length int
itemsCount Number int Up to 5
items Collection of historical data of menstruation array (IDOMenstrualHistoryDataItemModel)

Command code

Objc:

IDOMenstrualHistoryDataModel * model = [IDOMenstrualHistoryDataModel currentModel];
[IDOFoundationCommand setMenstrualHistoryDataCommand:model
                                            callback:^(int errorCode) {
    if (errorCode == 0) {
       //Set successfully
    }else if (errorCode == 6) {
      //Device not supported
    }else {
      //Setup failed
    }
}];

Swift:

let model = IDOMenstrualHistoryDataModel.current();
IDOFoundationCommand.setMenstrualHistoryData(model) { (errorCode) in
     if errorCode == 0 {
        //Set successfully
     }else if errorCode == 6{
        //Device does not support this method
     }else {
       //Wrong setting
     }
};
Copyright © 2015-2020 IDO. All rights reserved. all right reserved,powered by GitbookModify Date: 2023-12-18 10:04:13

results matching ""

    No results matching ""