-
Notifications
You must be signed in to change notification settings - Fork 233
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
the task is dying out #467
Comments
Have same issue, returning to foreground restores task again. |
Have the same problem, Interval stops after 1-2 minutes of running in the background. |
I was able to fix it by providing more permissions to the Application,
I can assume it will not suit some of your needs, but if you have to make your app unstoppable, it can save your day. |
@punov you mean change those settings on your phone? |
@punov that work for me too, thanks man |
I have the same problem but for iOS 16.2, and using the following versions :
On iOS, I can't access those permissions directly, do you know how I can fix that ? Maybe by requesting equivalent permission directly to the user ? |
Same here (at least on iOs) and the same struggle with react-native-background-actions To me it seems this is just normal behaviour, since the ios part relies on beginBackgroundTaskWithname. As it states there the background tasks have an assigned time which they get to run, after that time the process is stalled. @ocetnik Would it be possible to use "normal" Background Tasks in iOs to prevent the process to be stopped so soon? Im willing to contribute to make this happen, I just don't know if Background Tasks will perform as desired |
We solved this on Android by asking the user to turn off the battery optimisation (as this is the issue). Check if the user has battery optimisation turned on:
If
And in the onPress:
reference: |
maybe I'm testing it incorrectly, but when I launch the application and look at the console, the task works, but when I minimize the application, it stops running within a minute, even less.
The text was updated successfully, but these errors were encountered: