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

Keep running in Background #26

Open
fgarcia5 opened this issue Jan 20, 2021 · 2 comments
Open

Keep running in Background #26

fgarcia5 opened this issue Jan 20, 2021 · 2 comments
Labels
enhancement New feature or request

Comments

@fgarcia5
Copy link

fgarcia5 commented Jan 20, 2021

I have a countdown running in my App and I need to send alerts at certain times regardless of whether the App is in foreground or in background.

In foreground the "onupdate" event fires correctly but in background it does not.

Here is an example of my implementation in Framework7 App and I attach an screen where it is evident that the "onupdate" is not fired when I move to background.
flip-countdown

In the documentation I have not found a way to avoid this "sleep" of the timer. Could you give me any implementation or workaround suggestions?

Thanks in advance

@fgarcia5
Copy link
Author

I found a workaround. Commenting these lines:
flip-countdown-workaround

And importing Tick object direcly from the file:
import Tick from '@pqina/flip/tick/tick.core.module.js';

It doesn't look very fancy but it is a solution.

If there is any better solution, please let me know

@rikschennink
Copy link
Collaborator

To conserve resources the timer will pause when it's invisible, I think atm the above comment is the only way around that.

@rikschennink rikschennink added the enhancement New feature or request label Nov 20, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant