I want to put a timer in firebase and should decrement itself without any action from app side and when it expire should send a notification. For example, if I set one hour it should start and after one hour should send notification to a token id. I dont want any cloud function, can you help me with a good logic?
Asked
Active
Viewed 287 times
0
-
If you really want a timer, have a look at [How to implement a distributed countdown timer](https://stackoverflow.com/q/66843397). If you want to send notifications at a certain time, check https://stackoverflow.com/questions/63232428/run-some-code-1-hour-after-a-document-is-updated-with-cloud-function-and-firesto and others from https://www.google.com/search?q=firebase+how+to+send+scheduled+after+one+hour+site:stackoverflow.com. But if you already know what notification to send, I recommend sending it right away, and then displaying it on device at the necessary time. – Frank van Puffelen May 21 '21 at 17:54
-
Not possible without cloud functions. Why you don't want to use cloud functions? – hkchakladar May 21 '21 at 18:11
-
I think thats paid. I want to run counter for 24 hours. So, If I have like 500 such counters each for 24 hours how much I will be charged? – Khanzada Saleem Khan May 22 '21 at 15:40