My plan is to enable drops (basicly chests people can open) inside my app, and I want to generate this chests every day at specific times, for example every 3 hours. I want to acomplish this with calling a function every 3 hours which will make the chests appear, so all I need to do is basicly call one function at specific times a day.
The problem I face here is that this is my first app and I dont really know how to call such a function at specific times a day, and even less so how to call this function while the app is in background or even closed.
I read that there are possibilites to make an app do something while beeing in background but as soon as its terminated it is not working anymore - On the other side we have apps like whatsapp or facebook or basicly any messenger which give you notifications even if you terminate those apps, so Im really confused. I would like to make the chest appear all 3 hours even if the app was terminated and not let the user disappointed getting back in the app and noticing there is no drop because he terminated the app.
Does anybody know the approach to this or any tips how I could acomplish it?
PS: I also want to include expo-notifications at some point, just as a sidenote incase this info should help.