'react native expo local notifications

I'm currently trying to build a prayer time app and send notifications five different times a day. I'm using the npm library https://www.npmjs.com/package/adhan. The prayer times change every day, so I can't just keep a set schedule.

Currently, I have a countdown timer in the app counting down the time until the following prayer, and when the countdown reaches 0, it resets and goes on to the following prayer. The issue is the counter does not run in the background when you open a different app, so when the count down is at 0, the notification doesn't get triggered. But when you open the app, the notification is activated, so basically, you have to keep the app running and stay on it for the notification to get triggered and sent to you.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source