ntfy icon indicating copy to clipboard operation
ntfy copied to clipboard

Android Notification not opening the right topic

Open SMAW opened this issue 2 years ago • 4 comments

I think this is a bug, but when I leave the Android app in /topic1 and receive an notification for /topic2 and click on the notification, the app opens in /topic1 and not /topic2 as expected.

SMAW avatar May 16 '22 18:05 SMAW

I was not able to reproduce this. Can you send a video/screencast showing the problem @SMAW?

wunter8 avatar Jun 05 '22 22:06 wunter8

It happens to me too. It's definitely real. Not sure what's going on. I'll try to send you some details later.

binwiederhier avatar Jun 05 '22 22:06 binwiederhier

I tried this too in the emulator but I couldn't reproduce it there either. I've definitely seen this happen.

binwiederhier avatar Jun 19 '22 19:06 binwiederhier

After some testing today, it seems like whenever you click on a notification, it will open whatever topic that received the most recent notification. It doesn't seem to care about what topic you were looking at before or what notification you clicked on.

For example, after running curl localhost:8000/topic1; curl localhost:8000/topic2; curl localhost:8000/topic3, the app will open to topic3 when you click on any of the three notifications, even if you dismiss the topic3 notification before clicking on one of the other notifications.

I'm going to try digging into the code to figure out why this is

wunter8 avatar Aug 27 '22 19:08 wunter8

I can confirm that this happens in the SDK 33 emulator.

binwiederhier avatar Nov 27 '22 02:11 binwiederhier

Fixed here: https://github.com/binwiederhier/ntfy-android/commit/3d1d062f4d392516068e607586c4d413f71948b8

binwiederhier avatar Nov 28 '22 11:11 binwiederhier