Alarm application in ionic4

1.3k Views Asked by At

I want to develop alarm application same as default alarm application in android phone.I tried Cordova plugins but those stop working when app is closed(not minimised) Is it possible to implement using Ionic/Cordova?

1

There are 1 best solutions below

1
Sergey Rudenko On

You need a plugin that uses Android's AlarmManager and allows setting alarms or notifications with sound at system level.

https://github.com/wnyc/cordova-plugin-wakeuptimer - pretty old one

Or approach this using local notifications plugin: https://ionicframework.com/docs/native/local-notifications

These notifications can feature sound and vibration, depending on your use case it may work as well.

Such notifications and alarms will act independent of whether your app is running or not.