Quantcast
Channel: Ionic Forum - Latest posts
Viewing all articles
Browse latest Browse all 228595

I found a solution for some regular background activity!

$
0
0

Hi boltex,

I got an app that has to run all the time and survive reboots. The app does an alarm at sunrise time every day. That's the whole point of the app. Set it and forget it until that preference run all the time is unchecked.

Since the sunrise changes everyday, my app has to compute the next sunrise and when that time comes boom, vibrate the phone and play a notification.

I got a js timer on the app that checks every minute to see how much time left and when it is the last minute, it updates itself to run every second so it can display 59, 58, 57.... when it is 0, we hear the alert!

When the app is on, this is not a problem.
When the app goes to background, it seems to be working with just the "backgound-mode plugin".
But I have no idea how to put the app in the background after a complete shutdown or battery run out!

Would your solution work for me?


Viewing all articles
Browse latest Browse all 228595

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>