Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

setTimeout only triggers when app is in foreground #350

Open
Kaz-z opened this issue Aug 28, 2021 · 1 comment
Open

setTimeout only triggers when app is in foreground #350

Kaz-z opened this issue Aug 28, 2021 · 1 comment

Comments

@Kaz-z
Copy link

Kaz-z commented Aug 28, 2021

Using Android 11 I've noticed when using a debug / release apk the setTimeout method only triggers when the app is in the foreground. For example using the following block of code:

const activateTimer= BackgroundTimer.setTimeout(() => { console.log('hello'); }, 1000);

the timer will start when the app is open and 'hello' will be logged fine. However when the app is backgrounded 'hello' will only get logged when the app is foregrounded.

Interestingly when the physical android device is attached and running in debug mode there are no problems and functionality is as expected.

Any help on this one?

@AftabUfaq
Copy link

same issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants