I am building an ionic application for reminders. So, lets say a user schedules a reminder for 90 minutes from now on and then closes the app from multitasking bar. Now, I want to show him a notification after 90 minutes. How do I achieve this?
I tried using Cordova BackgroundMode for this purpose, https://ionicframework.com/docs/native/background-mode, however my app crashes when I add this plugin.
So I shifted to one by Capacitor, called Background Tasks
, https://capacitorjs.com/docs/apis/background-task , this does work if my app is just closed by pressing the back button. But if it is killed from multitasking bar, I do not see a notification.
Is there any way to achieve what I want to?
Okay so I got the answer to my question. Whenever, I schedule my notification before closing the application, it will show up no matter what the state of app is. If I just show it when the app is killed, in the BackgroundMode
code, then it is not shown.