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

[RN] Fix running timers in the background #1321

Merged
merged 1 commit into from
Feb 15, 2017

Conversation

saghul
Copy link
Member

@saghul saghul commented Feb 14, 2017

Turns out React Native's timers (setTimeout / setInterval) don't run while the
app is in the background: facebook/react-native#167

This patch replaces the global timer functions with those from the
react-native-background-timer package, which work in the background.

These timers won't magically make an application work in the background, but
they will run if an application already happens to run in the background. That's
our case while in a conference, so these timers will run, allowing XMPP pings to
be sent and the conference to stay up as long as the user desires.

@lyubomir lyubomir self-assigned this Feb 14, 2017
Turns out React Native's timers (setTimeout / setInterval) don't run while the
app is in the background: facebook/react-native#167

This patch replaces the global timer functions with those from the
react-native-background-timer package, which work in the background.

These timers won't magically make an application work in the background, but
they will run if an application already happens to run in the background. That's
our case while in a conference, so these timers will run, allowing XMPP pings to
be sent and the conference to stay up as long as the user desires.
@lyubomir lyubomir force-pushed the rn-background-timers branch from 58c536a to 36f5b02 Compare February 15, 2017 17:51
@lyubomir lyubomir merged commit 36f5b02 into jitsi:master Feb 15, 2017
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

Successfully merging this pull request may close these issues.

2 participants