Tapping on notification shows a blank screen
See original GitHub issueDescribe the bug
Whenever you tap on a notification for a message, it takes you to a blank screen.
To Reproduce
Steps to reproduce the behavior:
- Send a message to yourself from another account.
- Tap on the notification.
Screen recording
Expected behavior
My expected behavior is that it goes to the respective chat when clicked on the notification.
Smartphone (please complete the following information):
- Device: Samsung M31
- OS: Android 11
Additional context
- App version and store: 1.1.6 - F-Droid
- Homeserver: matrix.org
Self investigation
I tried replicating this bug on Emulators with Android 11,8,7 but they seem to work perfectly fine. Searching for the same problem on https://matrix.to/#/#element-android:matrix.org and others also seem to have this problem.
I looked at the code and the following line seems to be the reason behind the blank screen.
Upon debugging it is evident that getParcelable on the following line returns null.
Finding where the intent for the notification is created, I stumbled upon this comment
This might be what is causing the bug. The pending intent doesn’t seem to have any extra args. But the intent is created with the roomId as it’s data just in case.
So to have a temporary fix, I changed the getParcelable line as follows:
intent?.extras?.getParcelable(EXTRA_ROOM_DETAIL_ARGS) ?: intent?.dataString?.split("?")?.let { RoomDetailArgs(roomId = it[1]) }
Getting the roomId from the Intent’s data fixed it temporarily. But I will await for a better solution to this bug from the element android team.
Issue Analytics
- State:
- Created 2 years ago
- Reactions:1
- Comments:5 (3 by maintainers)
Top GitHub Comments
Same issue with notification: Device: Samsung Galaxy S20 OS: Android 11
Additional context App version and store: 1.1.14 Homeserver: selfhosted private
Same issue with notification: Device: Samsung M11 OS: Android 10
Additional context App version and store: 1.1.6 - F-Droid Homeserver: matrix.org