react-native-background-timer icon indicating copy to clipboard operation
react-native-background-timer copied to clipboard

BackgroundTimer.runBackgroundTimer() does not run in background

Open mun3 opened this issue 6 years ago • 9 comments

On Android, BackgroundTimer.runBackgroundTimer() pauses the task when the Activity is moved to background. This doesn't seem intuitive given that it's meant to be a background timer.

mun3 avatar Jun 07 '18 11:06 mun3

+1, any update?

roysG avatar Jun 20 '18 16:06 roysG

+1

tmoubarak avatar Jul 31 '18 17:07 tmoubarak

If you install from github instead of NPM, so you get the latest codebase with @hawkup's commit, it fixes the issue.

johntitus avatar Aug 22 '18 01:08 johntitus

@mun3 @roysG @nervouscat @johntitus you can try yarn upgrade [email protected]

ocetnik avatar Aug 22 '18 08:08 ocetnik

@ocetnik @johntitus Does this alpha fix the issue of iPhone pausing the background timer after 3 minutes in the background? I had been getting around it with a silent audio playing on repeat and being restart at each interval (30 seconds), however this has given me new issues - the timer is stopped when someone plays audio in a different app on iOS an on android the audio in another app is stopped when the silent audio is played.

bportman avatar Sep 17 '18 17:09 bportman

@ocetnik : Thanks for the alpha version where the app did finally able to execute in background. However the timer doesnt seems to be able to stop. Please have a look at my issue https://github.com/ocetnik/react-native-background-timer/issues/111

isaaclem avatar Nov 26 '18 02:11 isaaclem

@mun3 @roysG @nervouscat @johntitus you can try yarn upgrade [email protected]

In this version, Does library work even the app is killed ?

denizbas92 avatar Mar 11 '19 12:03 denizbas92

In android the app spend 3 min in the background then time is never works

Please advise?

beshoo avatar Apr 26 '19 03:04 beshoo

I am still getting problem in android, timer is working fine in iOS but not in android I need to work timer only when app is in background and/or device is locked, I don't mind if it still works when app is killed. But main issues is, not working timer in android when app is in background mode.

KirankumarDafda avatar Jun 27 '19 14:06 KirankumarDafda