# Alarm in ionic 4

**URL:** <https://forum.ionicframework.com/t/alarm-in-ionic-4/190885>\
**Category:** Ionic Native\
**Created:** [June 8, 2020, 9:44pm UTC](https://forum.ionicframework.com/t/alarm-in-ionic-4/190885 "2020-06-08T21:44:28Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![rohit199122](https://avatars.discourse-cdn.com/v4/letter/r/aca169/32.png) [@rohit199122](https://forum.ionicframework.com/u/rohit199122)\
**Post date:** [June 8, 2020, 9:44pm UTC](https://forum.ionicframework.com/t/alarm-in-ionic-4/190885/1 "2020-06-08T21:44:28Z")

</div>

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))

```

}

---

<div class="post-metadata">

**Author:** ![vivek8091](https://avatars.discourse-cdn.com/v4/letter/v/ecb155/32.png) [@vivek8091](https://forum.ionicframework.com/u/vivek8091)\
**Post date:** [October 14, 2020, 6:27am UTC](https://forum.ionicframework.com/t/alarm-in-ionic-4/190885/2 "2020-10-14T06:27:29Z")

</div>

same problem here. if you find any solution for the alarm controller then please inform me.

---

<div class="post-metadata">

**Author:** ![viniciusgati](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/viniciusgati/32/105919_2.png) [@viniciusgati](https://forum.ionicframework.com/u/viniciusgati)\
**Post date:** [January 13, 2021, 5:36pm UTC](https://forum.ionicframework.com/t/alarm-in-ionic-4/190885/3 "2021-01-13T17:36:25Z")

</div>

need a solution for this

---

<div class="post-metadata">

**Author:** ![codeluggage](https://sea1.discourse-cdn.com/ionicframework/user_avatar/forum.ionicframework.com/codeluggage/32/137576_2.png) [@codeluggage](https://forum.ionicframework.com/u/codeluggage)\
**Post date:** [May 29, 2021, 9:09am UTC](https://forum.ionicframework.com/t/alarm-in-ionic-4/190885/4 "2021-05-29T09:09:04Z")

</div>

In case people still have this problem, you can use the [Capacitor version of the LocalNotifications](https://capacitorjs.com/docs/v2/apis/local-notifications) now (I linked Capacitor v2, but v3 was just released too).

It now uses `schedule` and not `trigger`.

Two other things to keep in mind:

1. `LocalNotifications.schedule` returns a promise so you’ll either need to `await` on it or use `.then`.
2. You need to ask permission to use notifications now, so you need to call `LocalNotifications.requestPermission` (which also returns a promise with `granted` being true or false).

It wasn’t until I got all of these right that I could see the notification show up.

Good luck!
