有人可以帮助我如何在IOS和android的ionic 5中设置警报功能吗?
我要设置开始日期,结束日期和重复选项。现在,它只触发一分钟。如果有人知道如何在ionic 4,5中设置警报,请提供帮助。
createAlarm(){
let alarmtime = new Date();
console.log(alarmtime)
let notification:any = {
id:1,
title: 'upcoming alarm',
text: 'alarm',
trigger: { every: { hour: 14, minute: 4 } },
//trigger: { every: { hour: 10, minute: 12 },firstAt: alarmtime},
sound: true,
foreground:true,
clock:true
}
console.log(notification);
this.localNotification.schedule(notification);
console.log("scheduled or not", this.localNotification.isScheduled(1))
}