1st use case: Gmail polling
Correct, I am polling for updates to Gmail, however, most of my extension users use the default option which auto-detects their signed in account and uses the
Gmail inbox feed to poll for new emails.
This allows a user to install my extension and it starts working immediately without requiring any Oauth permissions to be granted by the user if I were to use the FCM method via Gmail's API.
Note that my extension also offers the real time polling of FCM as an option, but the vast majority use the out of the box auto-detect method.
2nd use case: Allowing a user to choose how long a notification is displayed.
Currently the only method is to set the
requireInteraction to true in the chrome.notificiations API and then use a timeout to close it after xx seconds.
3rd use case: Network or error retries
Sometimes I set timeouts to retry network failed requests and ideally that's between 5 and 60 seconds