When I receive notifications from cwa that contain multiple lines of text, I can't expand the notification. Therefore it's not possible to see the entire content of the notification, but just the first line of text. See animated GIF below.

The notification expands and shows it's entire content.
Internal Tracking ID: EXPOSUREAPP-4251
@JanRaber
It looks like the notification showing as a one line truncated text is:
risk_details_deadman_notification_body
@MikeMcC399 thanks for sharing the full notification text.
At this point I'm not yet able to tell if this behaviour specific to my device. I'll try to reproduce this on another Android device. Did anybody experience this issue as well?
Is it intended that notifications are shown as one line truncated text and are not expandable?
@JanRaber
The Deadman notification is an enhancement with quite a bit of new code (see https://github.com/corona-warn-app/cwa-app-android/pull/1513 (EXPOSUREAPP-2332)).
I would wait for a response from the Open Source Team / developers first before investing any more effort into investigating. It looks like the notification call needs a little tweaking.
related: #1067 , https://github.com/corona-warn-app/cwa-app-android/issues/1066#issuecomment-678758294
FYI: @d4rken
@vaubaehn
The Deadman notification comes from
https://github.com/corona-warn-app/cwa-app-android/blob/main/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/deadman/DeadmanNotificationSender.kt
"By default, the notification's text content is truncated to fit one line. If you want your notification to be longer, you can enable an expandable notification by adding a style template with setStyle()"
See https://developer.android.com/training/notify-user/build-notification#builder.
I'm not experienced in this area, but it seems that private fun buildNotification might benefit from using:
.setStyle(NotificationCompat.BigTextStyle()
.bigText(content))
@MikeMcC399
Yes, could be!
I referenced @kbobrowski 's PR and comment, because in the past there was already an issue, where the notification was not expandable.
See here:
sendNotification has a property for expandableLongText: Boolean = false , and in order to expand the text, it needed a call like
fun sendNotification(content: String, visibility: Int) {
if (!CoronaWarnApplication.isAppInForeground) {
sendNotification("", content, visibility, true)
}
}
where that property was set to true(which was missing in that old CWA version, so the text was not expandable).
But I'm not sure if NotificationCompat.Builder
https://github.com/corona-warn-app/cwa-app-android/blob/3ca4752876af458f7bf3a41d392623529e863ecf/Corona-Warn-App/src/main/java/de/rki/coronawarnapp/deadman/DeadmanNotificationSender.kt#L36-L52
should have an expandableLongText by default?
There were so many UI changes since...
But like @JanRaber wrote, it could also be a device/MIUI specific issue, so let's see the result, if he's able to test on a different device.
@vaubaehn
I was able to see the problem on an Android 11 emulator, which had been idle for several days, and I tried out my fix suggestion on a test program, which worked, so I think we just need to let the developers take over now.
@MikeMcC399
I was able to see the problem on an Android 11 emulator, which had been idle for several days, and I tried out my fix suggestion on a test program, which worked, so I think we just need to let the developers take over now.
That's great, good job! :+1: Wouldn't it be nice if you created a PR and contribute? You'd definitely deserve to get the contributer badge! And I'm sure devs would love to offer you to open a PR :)
@vaubaehn
That's great, good job! 馃憤 Wouldn't it be nice if you created a PR and contribute? You'd definitely deserve to get the contributer badge! And I'm sure devs would love to offer you to open a PR :)
I'm flattered by your confidence, however I can't test the app if I were to make changes (I'm not whitelisted), and the functionality involved has compatibility dependencies according to the version of Android in use, so changes would need to be checked on Android versions which I don't have hardware for anyway.
So, I'm happy for the real developers to be looking at this, and I'm glad if any pre-qualification that's been done in this issue speeds up the resolution.
@MikeMcC399
I was able to see the problem on an Android 11 emulator, which had been idle for several days, and I tried out my fix suggestion on a test program, which worked, so I think we just need to let the developers take over now.
Great work! This should be enough to verify that we're not facing a device specific issue.
Dear @JanRaber, @MikeMcC399, @vaubaehn, and community
Thank you for your contributions and detailed analysis. This is forwarded to the developers (Internal Tracking ID: EXPOSUREAPP-4251) in the internal Jira system. Any further developments will be notified here in this Github issue.
Best wishes,
DS
Corona-Warn-App Open Source Team
@dsarkar
Internal Tracking ID: EXPOSUREAPP-4251
Thank you for logging the issue internally! The repo steps from https://github.com/corona-warn-app/cwa-app-android/pull/1513 @AlexanderAlferov are sufficient to show the problem on an Android 11 emulator.
Risk calculation should fail and never succeed in 36 hours (either in foreground or background).
Here are screen shots from advancing the date by 3 days to next Sunday. The text which should be displayed, but which is truncated is:
risk_details_deadman_notification_body
which appears as:
"Please remember to open the Corona-Warn-App regula.." in the example. The truncation will be dependent on the screen size of the device.


@MikeMcC399, thanks for the additional analysis. We update the developers with these details. DS
Most helpful comment
Dear @JanRaber, @MikeMcC399, @vaubaehn, and community
Thank you for your contributions and detailed analysis. This is forwarded to the developers (Internal Tracking ID: EXPOSUREAPP-4251) in the internal Jira system. Any further developments will be notified here in this Github issue.
Best wishes,
DS
Corona-Warn-App Open Source Team