In my manifest I have:
"app":
{
"background":
{
"scripts":
[
"main.js"
],
"persistent": true
}
}
but it still shows Inspect views: _generated_background_page.html (Inactive)
and when I look at the console, it is inactive.
And I also have a setInterval
running every 10 seconds. Yet, it still goes inactive!
What do I need to do to keep it from going inactive?
Additional Info:
I added an alarm that fires every minute and this appears to wake my app up. (Need to do more testing) But it means waiting a minute after Chrome startup before the app runs.
One approach would be to have your web service host the helper app, and notify the other apps as necessary. This seems the most "chromium" way (whatever that means). But that would involve an app on one computer messaging an app on another computer, which seems complicated, at best.
You could also try "permissions": ["background"]
(reference).
It appears extensions are allowed persistent background pages, whereas apps aren't. You could change your helper app into a helper extension that messages the other apps.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With