signalapp / Signal-Android

A private messenger for Android.
https://signal.org
GNU Affero General Public License v3.0
25.32k stars 6.08k forks source link

Android 8 notification dot does not display until there are multiple threads with unread messages #7580

Closed riyapenn-signal closed 5 years ago

riyapenn-signal commented 6 years ago

I have:


Bug description

On Android 8, the notification dot does not appear on the app icon until there are unread messages in multiple conversations. Notifications still appear in the notification drop down. This issue is only for the app badge/dot that displays on the icon.

Steps to reproduce

Actual result: See notification dot only when there is more than one thread with an unread message Expected result: See notification dot for any unread message

Screenshots

N/A

Device info

User 1

Device: Samsung Galaxy S9 Android version: 8.0.0 Signal version: 4.16.9

User 2 Device: Samsung Galaxy S8 Android version: 8.0.0 Signal version: 4.17.5

User 3 Device: Samsung Galaxy S8+ Android version: 8.0.0 Signal version: 4.16.9

Link to debug log

User 1

One message received, no badge/dot: https://hastebin.com/xoyadaqazo Two threads with new messages and the badge appeared: https://hastebin.com/ixatociwez

User 2 One message received, no badge/dot: https://debuglogs.org/1d1c957eaa4a0e685b55b96a5f29bc49fca4d5c380f3a08f4c5e3f02c3941b56 Two messages received and the badge appeared: https://debuglogs.org/f385f1c6367df132ac06221ca0b238c1058fb1627f9e67d59bdf570f76cd9363

User 3 One message received, no badge/dot: https://hastebin.com/udojuhozic Two messages received and the badge appeared with a count of 2: https://hastebin.com/biwakefoda

ahgoodman commented 6 years ago

I have the same issue: Device: Pixel 2 XL Android Version: 8.1.0 Signal Version: 4.17.5

One message Received no badge: https://debuglogs.org/47f2ef85b8f5fddd3a0773f2c5835ac01a622e10d56bea2f32d4cae7f05801c7

Two messages with badge: https://debuglogs.org/8f88721968c46eaa8268a386e92c3a8d20c3ae16137b9f2a7bb6fc41c695450c

ADepic commented 6 years ago

I'm sorry OP, but you got the android version and signal version mixed up. Apparently your galaxy s9 runs android 4

MrPokeylope commented 6 years ago

I want to join in and mention I'm seeing the same issue on my Galaxy S8. Also occurs on my mom's S8 with the same specs.

Device: Samsung Galaxy S8 Android version: 8.0.0 Signal version: 4.17.5

I'm guessing this was something to do with the re-tooling of the app icon badge functionality in Android 8.0.

jeremymasters commented 6 years ago

Oddly enough, if you read the first message, it still shows the dot because the second one isn't read yet.

whaco1 commented 6 years ago

I experience the same behavior.

Device: Samsung Galaxy S7 Android version: 8.0.0 Signal version: 4.19.3

MickMickle commented 6 years ago

Possible temporary workaround(?): Send a Signal message to yourself from a second instance/account and always leave it unread. Based on other comments here, that may create a constant baseline of "1" unread message on the icon badge, so new messages would start with "2", which is an improvement over nothing.

Maybe the second Signal account could use a Google voice number. I tried to test using my Note 8 Dual Messenger capability in the settings Advanced Features; however, Signal is not shown as supported (only Facebook, WhatsApp, and Messenger (Facebook) show up).

SingerGuy commented 6 years ago

I am experiencing this as well. I have a Samsung Galaxy S7 running Android 8.0 Oreo and Signal 4.21.6. When I have only one unread message I do not get a badge. I have turned badge notification off, restarted the phone, and turned it back on again and the behavior did not change.

MickMickle commented 6 years ago

I tested the possible workaround I described above using Samsung Secure Folder to install a second Signal account with my Google Voice number. If you first send a test message from the second account, you'll have no number on the Signal icon, as expected since that's the issue. Then after you get another message, you'll have the number "2". After reading the second "real" message, but never reading the permanent test message, the baseline number "1" will remain on the icon. However, the downside is that you'll also still have that first test message in the notification panel, which is not acceptable for me. And when you clear that notification in the notification panel, the icon number will disappear. Therefore, this isn't a good workaround.

sowcrayts commented 6 years ago

I am having this problem, too.

Device: Samsung Galaxy S7 Android version: 8.0.0 Signal version: 4.22.4

MickMickle commented 6 years ago

FWIW as a clue to help fix this problem: I just tried out the Microsoft Launcher as an alternative to the stock "Samsung Experience Home" (although I still like Samsung's home screen launcher), and the notification badge shows up just fine on the Signal icon in MS Launcher.

ImAGitHubUser commented 6 years ago

I'm having the same problem as the other reporters.

ANDROID 8.0.0 SAMSUNG S7 Samsung Experience 9.0 SIGNAL 4.24.8

When one thread contains unread messages, no badges appear.

When two or more threads contain unread messages, the badge works.

smefa commented 6 years ago

Same issue for me on Huawei P20 Pro and Android 8.1.0 Signal 4.24.8

jeremymasters commented 6 years ago

I believe this is fixed (at least for me) in 4.25.2

MickMickle commented 6 years ago

That's a good sign, but Google Play store's version is still 4.24.8. How do you get the later version?

jeremymasters commented 6 years ago

It's the beta version so good need to sign up for that. I'd wait for the release, but this should give you hope for the near future.

MickMickle commented 6 years ago

Thanks for the beta info. I joined up easy. But I'm still not getting a badge showing number of messages received over the icon in the home screen. (Testing from a second installation of Signal in the Samsung secure folder.) Any particular settings to adjust? I do have App icon badges turned on in the system settings. I also see in the beta what's new: "★ Use notification channels in your system settings on Android 8.0+ to customize alert behavior for incoming messages, calls, and more."

The working icon badge is just too important to me. I need the fact that I've got a message to be very obvious if I miss the notification when it occurs. And I think the status bar is often a bit subtle.

bme13 commented 6 years ago

Based on the comments from @jeremymasters I would expect this to work in the 4.25 release however for the Samsung S9 the behaviour remains. Attached a logfile with the next test. Starts at 19:14.

The app icon badge setting is turned on in the setting. Don't know if other settings are needed. Since a different launcher was suggested I've tested both MS Launcher and Nova Launcher. For both launchers the notification dot did not work. https://debuglogs.org/a650b52f0aa52320a94d8ee2bb8547b8285b83ccdc4be13ba77f5216b66c286a

jeremymasters commented 6 years ago

I actually need to report that it doesn't work now. I think the reason it was "working" was that there was a bug that included the "signal unlocked" notif as the first notification, which is normally ignored currently. Now it's not doing that since channels stuff was re-tooled some more in 4.25. To be clear, it was working and it's stopped working again. Basically it looks like an issue where it doesn't count the first conversation's notifications (1 or many) for the notification dot/counter until there are other conversations with notifs.

MickMickle commented 6 years ago

I agree that it doesn't work even with the latest beta. I gave feedback via the Android beta channel, but I really have no idea who or where or what good this reporting does. I'll try the MS Launcher later (I actually forgot how to access it) and let you know, because it did let the badge work when I did it.

whaco1 commented 6 years ago

agreed. no notif badge symbols unless two or more conversations have at least one unread message.

MickMickle commented 6 years ago

Although @bme13 did not get an icon badge using a different launcher, I just gave Microsoft Launcher another try on Samsung Note 8, Android 8.0.0. Right off the bat with only one Signal message, I successfully got a "1" dot on the Signal icon on the home screen.

My test method is to send a message to myself from a second installation of Signal in the Samsung Secure Folder which allows the installation of second accounts of various apps (including Signal) on the same phone. If I then switch back and forth between MS Launcher and the default Samsung Experience Home (ver. 9.0), the icon badge with the number "1" disappears and reappears (Settings> Apps> Default Apps> Home Screen). If you can't see the badge in MS Launcher, there's a lengthy FAQ in the MS Launcher settings about, "I’ve enabled “Notification badges” in settings, but I don’t see them in my launcher. Either they have stopped displaying after a period of use, or I never see them in the first place."

bme13 commented 6 years ago

I just tried MS Launcher again and indeed @MickMickle, after changing settings in the launcher itself the icon badge works. Directly showing the first message. I've created a log while using the Samsung launcher using logcat which contains some additional messages about the icon badges.Here's a snippet of that. If needed the complete log is available.

greyson-signal commented 5 years ago

We use notification channels now for Android 8.0, so well-written launchers should be showing the dot appropriately.

jeremymasters commented 5 years ago

I'd like to report that this is still a problem on galaxy s9 (verizon stock). If there is only one contact with notifications, it shows no indicator on the icon. If there are two or more, it shows the correct total count. Not sure if this is because I used some beta versions or not, but it's a little frustrating.

Signal 4.25.10

SingerGuy commented 5 years ago

Still not fixed for my Verizon Samsung Galaxy S7 (SM-G930V) using Signal 4.25.10. I can have multiple messages from a single contact (or MMS group) and have no badge. It is only when I have at least one message from a second contact that the badge appears and accurately reflects the number of messages waiting. Please re-open this issue until it is correctly resolved.

https://debuglogs.org/4221812c1cdaab70b640c6f867cb0d6be5ffb33df2eca36d15ab7e9bd0bf06b6

ImAGitHubUser commented 5 years ago

Agreed. This is not working on Samsung S7 using Signal 4.25.10.

As described above, badges only appear when there is more than 1 unread messages from two or more distinct contacts.

Thank you.

MickMickle commented 5 years ago

Still not working on Samsung Note 8 Unlocked on T-Mobile when only one message has been received. Apparently, Samsung Experience falls into the category of well-written launchers NOT. Let's blame the devices.

jeremymasters commented 5 years ago

My example is:

  1. contact sends me one message
  2. I get notifications in my notification bar, etc, but NOT on the icon ( don't actually read the message yet)
  3. Another contact sends me a message.
  4. NOW I get the icon with two messages (the appropriate total count) showing.
  5. read message at the TOP of the contact list first, leaving the other unread in spot 2
  6. note that the notification dot still is there and shows the correct count
MickMickle commented 5 years ago

I have (had since I first installed Signal) the same bug as @jeremymasters experiences.

greyson-signal commented 5 years ago

I've been able to repro this. I can confirm that the Samsung Galaxy S9 has the same problem that @jeremymasters described.

I've also confirmed the same problem with the notification dot on the Pixel launcher (minus the count, since the Pixel launcher only shows a generic dot regardless of the count).

I'll look into this. FWIW the Android documentation implies that we should't have to do anything special to get the dot. My guess is we're screwing up something when we call NotificationCompat.Builder#setNumber().

mrHJS commented 5 years ago

Any news on this? Problem still there...

greyson-signal commented 5 years ago

@mrHJS Lots of stuff happening right now with the target26 migration, so I just don't have time to look at this at the moment. If anyone else wants to investigate this or even make a PR in the meantime, I'd be more than happy to look at it. Thanks!

inqgithub commented 5 years ago

Just want to add that my Samsung A3 (Android 8.0.0) has this problem too.

dinosmm commented 5 years ago

I've just noticed that my phone has this problem as well.

Model: Galaxy S7 Edge Android: 8.0.0 Signal: 4.29.0 (beta)

No dot. So far I only have one conversation at a time (still not enough Signal contacts!), so I've not been able to test it when there's two messages from two different conversations waiting.

jeremymasters commented 5 years ago

@inqgithub @DonDino2 one of the things here is that if you are just having the issue too, but don't have additional info, go ahead and use the response like the thumbs up or something. If you have more info, list the debug log as well. Entries here email tons of people, so the "me too" comments make it harder to sift out the comments with logs, etc.

bme13 commented 5 years ago

Based on the code in MessageNotifier.java I noticed a difference in handling single and multiple thread notifications. As a test I've build my own signal (first time :smiley: ) with some debug and tested some changes to see if I could get the badger work for a single message on the Samsung S9. It turns out that if I changed the bundled argument from false to true in the sendSingleThreadNotification() call for a single thread notification (line272) I get the message dot with 1 after the first message. Also if I send an second message on a different thread the message increases to 2 and after reading one message the count decreases to 1 again. That also seems to work correctly then. Now I'm not an android programmer and I guess this is not a real solution however I hope this helps to identify the problem.

imcurtispenner commented 5 years ago

I'm having the same issue using a Samsung S9 plus running Android 8.

TheShanMan commented 5 years ago

Same on HTC 10. I talked my friend (has an S9 I think) into trying Signal despite not really wanting another messaging app and this is a big issue to him. I see that targeting API level 26 was done on Oct 3 according to the commits. So 1.5 months later is it time to show this problem a little love, especially given @bme13's effort to find a potential solution?

dlnycs commented 5 years ago

Same exact issue with latest Signal:

Device: Samsung Galaxy S8 Android version: 8.0.0 Signal version: 4.30.7

So many people have this important issue. Can we get it fixed soon? 8 months have elapsed. Thanks.

dlnycs commented 5 years ago

And it happens with the just released 4.30.8, too

dorakas commented 5 years ago

same with

Device: Pixel 3 Android version: 9.0.0 Signal version: 4.30.8

Lol just noticed that the pixel 3 don't has a notification led. What a wonderful design decision.

MickMickle commented 5 years ago

What's the first version that will incorporate the new code (https://github.com/signalapp/Signal-Android/commit/caf93b9203ff14332744d0208f550280f7fcc701)? I'm on the current beta 4.31.3 which doesn't resolve the issue yet. But a huge "Thanks!" for focusing on this problem.

greyson-signal commented 5 years ago

It was just merged into master, so it won't be there until 4.31.4. In the future, if you're curious, you can go to https://github.com/signalapp/Signal-Android/commits/master to see what version it's in (look for the "Bump version to x.x.x" commits and looks what's underneath them).

MickMickle commented 5 years ago

Yep, it appears fixed. Well done! Signal updated on the beta channel a few minutes ago to 4.31.4, and I have the badge now with just one message (test message sent from second account in secure folder of Samsung Note 8, Android 8.0.0).

greyson-signal commented 5 years ago

Cool! Wanted to give a shoutout to @bme13. Your earlier content really helped point me in the right direction to fix the underlying problem. Thank you!

greyson-signal commented 5 years ago

Hey, so unfortunately we've hit a bit of a setback. There have been some reports of people experiencing notification issues after I made this change. The main feature in 4.31.x is typing indicators, and I don't want this to delay that release, so I've reverted the fix for now, but I'm going to continue to look into this for 4.32.x. I know it's frustrating to have a fix come and go, but hopefully you can understand where I'm coming from.

Edu4rdSHL commented 5 years ago

It was working fine in Samsung phone with Android 8.1.0, but I will wait for the next fix @greyson-signal and thank you.

jeremymasters commented 5 years ago

To be fair, there were notification issues for everyone affected by this bug before the fix. I know discussion should take place in the forum, which would be fine. Maybe explain more there, although you're certainly not obligated to do so.

MickMickle commented 5 years ago

I got 4.31.4 while the gettin' was good, and I'm happy with the way it works, fixed the notification badge and I've not encountered any other issues. I froze it there by unchecking "Enable auto update" in Google Play Store for my Android phone. For others' benefit, is there a repository of archived versions for download now that beta has moved on to 4.31.5?

sacanuck commented 5 years ago

Just installed Signal 4.31.6 samsung galaxy a8. Android 8.0.0

the notification problem still exists.