}
} else {
app_control_add_extra_data(app_control, kAlarmKeyType, kAlarmTypeValueAbsolute);
- app_control_add_extra_data(
- app_control, kAlarmAbsoluteRecurrenceTypeKey, kAlarmAbsoluteRecurrenceTypeNone);
const auto it_period = alarm.find("period");
const auto it_daysOfTheWeek = alarm.find("daysOfTheWeek");
int ret = 0;
if (alarm.end() != it_period && it_period->second.is<double>()) {
+ app_control_add_extra_data(
+ app_control, kAlarmAbsoluteRecurrenceTypeKey, kAlarmAbsoluteReccurrenceTypeInterval);
int period = static_cast<int>(it_period->second.get<double>());
ret = alarm_schedule_at_date(app_control, &start_date, period, &alarm_id);
} else if (alarm.end() != it_daysOfTheWeek && it_daysOfTheWeek->second.is<picojson::array>() &&
!(it_daysOfTheWeek->second.get<picojson::array>()).empty()) {
+ app_control_add_extra_data(
+ app_control, kAlarmAbsoluteRecurrenceTypeKey, kAlarmAbsoluteReccurrenceTypeByDayValue);
picojson::array days_of_the_week = it_daysOfTheWeek->second.get<picojson::array>();
int repeat_value = 0;
for (auto iter = days_of_the_week.begin(); iter != days_of_the_week.end(); ++iter) {
ret = alarm_schedule_with_recurrence_week_flag(
app_control, &start_date, repeat_value, &alarm_id);
} else {
+ app_control_add_extra_data(
+ app_control, kAlarmAbsoluteRecurrenceTypeKey, kAlarmAbsoluteRecurrenceTypeNone);
ret = alarm_schedule_at_date(app_control, &start_date, 0, &alarm_id);
}