-
Notifications
You must be signed in to change notification settings - Fork 25
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
Task Runner does not run at intervals #88
Comments
Hello! A few things here: On Android, jobs have a minimum interval time of 15 minutes. Additionally, there could be battery optimization stuff that might limit how often the task runs, see here for more info. Regarding the Geolocation issue, we are tracking that here:
Yeah, that's not going to work, and currently won't work in Background Runner. When Android kills your app when it's no longer in the foreground, the WebView containing your app code goes with it, stopping anything you are playing through WebAudio. If you intend on using the Background Runner to "keep alive" the activity so that it keeps running - that's not possible. If you need to play audio even when the app is in the background, you may have to write a solution in native code: This is definitely some functionality we can expose through the Background Runner in the future. |
I see, thanks for all the information! I might need to write native code after all. I was already working on moving away from web audio to native audio for a different issue and was just wondering if this plugin could be a quick fix for Pixel devices. Anyway, I'll be closing this issue and just track the geolocation perms on #85 (I'll still probably use this plugin for caching stuff - is probably the best use for this plugin). Thanks again! |
I tried the plugin and I was able to make it work but I can't seem to make the interval work.
I have a runner that just have:
And my config:
But it only ran once, exactly one (1) minute after it was backgrounded. But it never ran again. Did I configure things wrong?
Also, is there way to remove Geolocation permissions? I'm not exactly using them. For context, I'm trying to prevent Android from killing/pausing my app when backgrounded, I'm playing WebAudio on a setInterval indefinitely but Android (most especially Google Pixel devices) keeps pausing the app and audio.
Here's the relevant logs:
The text was updated successfully, but these errors were encountered: