3 ms·
I recently imp'd web push for an internal admin tool, tested on android AFAICT it only works if chrome has been started recently, and you have to turn off back
by awinter-py 4y ago
I recently imp'd web push for an internal admin tool, tested on android
AFAICT it only works if chrome has been started recently, and you have to turn off background throttling for chrome maybe. (guessing this is highly vendor, version, and device specific though). But it was fine for something I check daily anyway
Python library support for sending this is present but shaky -- guessing apple's endorsement will improve the ecosystem for this
Not sure about consumer space, but for communicating with technical users who know you well, this is so much of an easier rollout process than an app -- literally 'hours vs months' comparison
- jeroenhd 4y agoAFAIK notifications should come in as long as Chrome's daemon is running. This should run on boot, unless Chrome has been manually force killed, or if Chrome has crashed. It's possible extremely aggressive battery savers or extreme power saving modes will kill these services as well and require Chrome to start, but you shouldn't need to launch Chrome manually in most cases (or Firefox, or any other browser). There's simply no way to fix this restriction, not on the web nor on native apps.
- awinter-py 4y agohmmmmm I'm on up to date droid OS with an older pixel device I wonder if 'aggressive throttling' is the norm on older devices? Also, I remember reading about a non-google android handset vendor who shipped custom throttling logic (but don't quote me on this) it's been a while since I tested, and because I don't know how to inspect the daemon state directly, I'm not sure of any of this, but iirc: 1. I had to switch chrome to 'unrestricted' from default 'optimized' in the OS settings 'app battery usage' screen, or else notifications would fail starting a few hours after the last time chrome was foregrounded 2. chrome had to be started once after boot (less sure of this) it's certainly possible something else in my stack is causing problems, or I have misconfigured retry on the send-side
- jeroenhd 4y agoI think something funky is going on on your device. Maybe Chrome or one of its tabs are running into some kind of memory leak? Maybe the OS is failing to kill enough other running applications and is letting Chrome hit some kind of memory limit? Maybe there's a bug in Chrome on certain devices? I'm still on a heavily modified Android 11 and my phone is receiving browser notifications fine, reboot or not. I know many of Google's pixels contain relatively weak CPUs to keep cost and battery consumption down, but that shouldn't be a reason for Chrome to keep crashing in the background. You can try going to chrome://serviceworker-internals/ and checking for any weird background service workers that may interfere with your browser. That page can also be used to troubleshoot serviceworkers (which can/are used for sending notifications).
- awinter-py 4y agothanks -- will poke around