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 require manually giving permission, on Android #520

Closed
gnprice opened this issue Feb 14, 2024 · 0 comments · Fixed by #521
Closed

Notifications require manually giving permission, on Android #520

gnprice opened this issue Feb 14, 2024 · 0 comments · Fixed by #521
Assignees
Labels
a-Android Issues specific to Android, or requiring Android-specific work a-notifications beta feedback Things beta users have specifically asked for
Milestone

Comments

@gnprice
Copy link
Member

gnprice commented Feb 14, 2024

On a fresh install on Android, the app never asks for permission to show notifications, and as a result it never does successfully show a notification (at least on current versions of Android).

The workaround is for the user to go into the system's notification settings for the app (long-press the app icon > App info > Notifications) and enable notifications.

When we first landed Android notification support in #344/#320, I didn't think this problem was present; not sure if I missed it, or if something changed since then. It is something that's easy to miss in manual testing, because after you've touched the setting once, the issue doesn't arise unless you uninstall the app completely in order to install again from scratch.

I reproduce the issue on Android 14 on my Pixel 8. Because it'd be annoying to delete the app and lose my logins, I tweaked it to use a different app ID (and also a different label, to help me tell the different installs apart):

--- a/android/app/build.gradle
+++ b/android/app/build.gradle
@@ -42,2 +42,3 @@ android {
     defaultConfig {
-        applicationId "com.zulip.flutter"
+//        applicationId "com.zulip.flutter"
+        applicationIdSuffix ".tmp"
--- a/android/app/src/main/AndroidManifest.xml
+++ b/android/app/src/main/AndroidManifest.xml
@@ -4,2 +4,2 @@
    <application
-        android:label="Zulip beta"
+        android:label="Zulip beta 2"

We've had a couple of reports of this issue: this chat thread was quite helpful, and there was also this comment on a different issue.

@gnprice gnprice added a-Android Issues specific to Android, or requiring Android-specific work a-notifications beta feedback Things beta users have specifically asked for labels Feb 14, 2024
@gnprice gnprice added this to the Beta 2 milestone Feb 14, 2024
@gnprice gnprice self-assigned this Feb 14, 2024
gnprice added a commit to gnprice/zulip-flutter that referenced this issue Feb 14, 2024
This is necessary (on Android 13+) in order to be able to actually
show a notification in the UI.

Fixes: zulip#520
chrisbobbe pushed a commit that referenced this issue Feb 20, 2024
This is necessary (on Android 13+) in order to be able to actually
show a notification in the UI.

Fixes: #520
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 beta feedback Things beta users have specifically asked for
Projects
Status: Done
Development

Successfully merging a pull request may close this issue.

1 participant