Quantcast
Channel: Ionic Forum - Latest topics
Viewing all articles
Browse latest Browse all 70439

Alarm in ionic 4

$
0
0

I want to make alarm functionality in my ionic 4 app right now I am using local notification plugin but its not working properly. Please provide me any solution
createDailyAlarm(){
//let time = this.alarm.alarmTime.split(’:’);

let alarmtime = new Date();
console.log(alarmtime)
let notification:any = {
  id:1,
  title: 'upcoming alarm',
  text: 'alarm',
  trigger: { every:{ hour: 17, minute: 50} },
  //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))

}

1 post - 1 participant

Read full topic


Viewing all articles
Browse latest Browse all 70439

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>