Bug 1757138 Comment 12 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

> My initial thought was that we didn't have a straightforward way to ensure that the background task that writes the file runs before responding to the notification finishes

I don't think we need that guarantee, a best effort to start writing to disk when we get the notification is enough. The last activity to be active is always highly prioritized in Android, so the chance that we get killed immediately after receiving `application-background` is very low.
> My initial thought was that we didn't have a straightforward way to ensure that the background task that writes the file runs before responding to the notification finishes

I don't think we need that guarantee, a best effort to start writing to disk when we get the notification is enough. The last app to be active is always highly prioritized on Android, so the chance that we get killed immediately after receiving `application-background` is very low.

Back to Bug 1757138 Comment 12