Skip to content
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

Notifications sometimes delayed when app not running, on Android #597

Open
gnprice opened this issue Mar 28, 2024 · 0 comments
Open

Notifications sometimes delayed when app not running, on Android #597

gnprice opened this issue Mar 28, 2024 · 0 comments
Labels
a-Android Issues specific to Android, or requiring Android-specific work a-notifications
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Mar 28, 2024

I've sometimes observed recently a symptom similar to the old #342: notifications appear just fine when the app is in the foreground, and just fine when it's running in the background, but fail to appear when the app is not running at all.

I'm not sure whether this affects normal users, i.e. those who aren't doing development on the app. (Details below on why.) So:

  • I'd be interested to hear reports from anyone who thinks they might be seeing this symptom.
  • I'd be interested to hear reports from anyone who's observed carefully enough that they feel pretty confident they are not ever seeing this symptom.

Two related issues, related in that they would make it more practical for people to make that second set of observations by making our notifications in zulip-flutter more closely match those of zulip-mobile:


The reasons I'm not sure this affects normal users are:

  • I get plenty of notifications all the time, even when it's the weekend or the start of the day and the app must have not been running because I haven't opened it in hours or days. So it seems clear it works most of the time, though I wouldn't necessarily catch if it occasionally didn't.

  • I've only ever noticed the symptom while using a debug build (while working on changes like notif: Switch to our own Pigeon-based plugin for showing a notification #592). If I then switch to a release build with flutter run --release, then even if I do the exact same test steps, the notifications work. If that pattern holds, then this doesn't affect normal users.

  • I've only ever noticed the symptom while testing notification changes, and specifically checking that notifications work while not already running… and the test recipe for that involves force-quitting the app again and again, often in quick succession.

    So I suspect a trigger for it might be that closing the app is taken as a bad sign by the system — the user force-closed the app! maybe it was misbehaving for them — and so because I was doing it again and again, the system eventually decided the app shouldn't be trusted with the privilege of starting up in the background. If so, then that would also be unlikely (though less unlikely than a debug build) for a user who isn't developing the app.

  • On the other hand, the symptoms are flaky — sometimes things just start working again. That makes it hard to be confident that the above two patterns are real and not an accident of what's happened to occur at the times I've been looking most closely.

@chrisbobbe observed the same issue recently, while testing #592 and then equally when retesting on main; and then also observed things mysteriously start working again.

Oh, and to avoid ambiguity: just like I observed when #342 was live, when there's a notification that failed to show up promptly for this reason, it seems like it consistently does show up later, after I launch the app.

@gnprice gnprice added a-Android Issues specific to Android, or requiring Android-specific work a-notifications labels Mar 28, 2024
@gnprice gnprice added this to the Launch milestone May 9, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
a-Android Issues specific to Android, or requiring Android-specific work a-notifications
Projects
Status: No status
Development

No branches or pull requests

1 participant