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

Will this work in the background or not (flutter)? #48

Open
ozgunozerk opened this issue Nov 18, 2023 · 6 comments
Open

Will this work in the background or not (flutter)? #48

ozgunozerk opened this issue Nov 18, 2023 · 6 comments

Comments

@ozgunozerk
Copy link

First of all, I'm not asking it to be work in the background.

There was already a closed issue #9 , but I believe it shouldn't have been closed.

The question asked there is what I want to learn.

Q:

Hi. Does this plugin run process in background, when the app is closed?
Or does it run when app is in foreground only?
Not much information is given.

A:

Hi, this package is for server-side apps, which run for a longer time. I'm sorry, but I have no idea how to achieve the same in a mobile app.

The answer assumes the user wants to use this in background and tries to achieve that functionality. However, question simply wanted to learn the behavior.

I think this information is crucial and should be in the readme.

@isoos
Copy link
Contributor

isoos commented Nov 18, 2023

I think this information is crucial and should be in the readme.

@ozgunozerk: I'm happy to accept PRs that help clarify this. Would you be interested in expanding on it?

@ozgunozerk
Copy link
Author

Thanks for the kind offer, but I already have too much on my plate atm :)

@duytq94
Copy link

duytq94 commented Jun 13, 2024

I tested and it won't work when the app come to background

@RyanParkGH
Copy link

On Flutter Web, I minimized Chrome and the Cron still worked on time. Wouldn't a minimized Chrome be in the background? Thus, I believe it does work in the background.

@isoos
Copy link
Contributor

isoos commented Aug 2, 2024

I think Chrome tabs may be suspended after a while (I'm using an extension that forces this after an hour at most, but recent Chrome updates have this natively). I'm pretty sure that means no JS execution, including anything Timer based.

@RyanParkGH
Copy link

I think Chrome tabs may be suspended after a while (I'm using an extension that forces this after an hour at most, but recent Chrome updates have this natively). I'm pretty sure that means no JS execution, including anything Timer based.

Active tab maintained a timer for 8 hours without issue. I will try a test with a minimized tab as well soon.

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

4 participants