My ionic app has a timer(a simple $interval that ticks every second) functionality which works fine when my app is in the foreground. But when the app goes to background $interval stops calling after 5 or more minutes.
Below is my code:
$interval(updateTimer, 1000);
function updateTimer(){
}
In above lines, $interval calls ‘updateTimer’ function at every second when App is in foreground. But $interval stops calling ‘updateTimer’ function after 5 or more minutes when App goes to background.