Backport/6079/improve answering calls#6085
Conversation
Switched call notification to NotificationCompat.CallStyle. This adds answer/decline buttons to the notification so that users can answer incoming calls. Adds caller avatar to notification. Signed-off-by: Jens Zalzala <jens@shakingearthdigital.com>
Signed-off-by: Jens Zalzala <jens@shakingearthdigital.com>
Signed-off-by: Jens Zalzala <jens@shakingearthdigital.com>
Do not cancel the notifications in getRoomnstead, but do it with NotificationManagerCompat.from(this).cancel(notificationId) in processExtras (see commit dcde0be). It seems that things can go wrong that cancelExistingNotificationsForRoom was not reached which caused an indefinite ringing. The underlying cause why this is not reached is NOT fixed with this commit, but instead dismissing the notification in processExtras seems to be like a more reliable approach. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
new method from 6a6d4d2 with darkMode support is not backported to avoid backport chains. Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
Signed-off-by: Marcel Hibbe <dev@mhibbe.de>
There was a problem hiding this comment.
Pull request overview
Backport of Talk Android changes to improve the incoming-call experience (notification actions, ringing behavior after answering, and lock-screen behavior), aligning stable branch behavior with PR #6015.
Changes:
- Add
NotificationCompat.CallStyleincoming-call notification with answer/decline actions and caller avatar support. - Cancel the ringing notification when an incoming call is answered, and adjust lock-screen/keyguard handling.
- Register a new
DeclineCallReceiverand update Gradle verification metadata.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| gradle/verification-metadata.xml | Updates dependency verification metadata entries (sha entries / also-trust). |
| app/src/main/java/com/nextcloud/talk/receivers/DeclineCallReceiver.kt | Adds receiver used by the notification “Decline” action to cancel the call notification. |
| app/src/main/java/com/nextcloud/talk/jobs/NotificationWorker.kt | Builds improved incoming call notifications (CallStyle), adds answer/decline PendingIntents, adjusts threading. |
| app/src/main/java/com/nextcloud/talk/activities/CallBaseActivity.java | Changes keyguard/lock-screen behavior when showing call UI. |
| app/src/main/java/com/nextcloud/talk/activities/CallActivity.kt | Cancels incoming-call notification after answering; adjusts initial camera enabling behavior. |
| app/src/main/AndroidManifest.xml | Registers DeclineCallReceiver. |
Comments suppressed due to low confidence (1)
app/src/main/java/com/nextcloud/talk/activities/CallBaseActivity.java:82
dismissKeyguard()no longer dismisses the keyguard (it only sets show-when-locked/turn-screen-on flags). This makes the method name misleading and also leavesenableKeyguard()clearingFLAG_DISMISS_KEYGUARDeven though it's no longer set anywhere in this flow. Consider renaming the method (or updating documentation) and keeping the enable/disable flag handling consistent.
void dismissKeyguard() {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.O_MR1) {
setShowWhenLocked(true);
setTurnScreenOn(true);
} else {
getWindow().addFlags(WindowManager.LayoutParams.FLAG_SHOW_WHEN_LOCKED);
getWindow().addFlags(WindowManager.LayoutParams.FLAG_TURN_SCREEN_ON);
}
}
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
APK file: https://www.kaminsky.me/nc-dev/android-artifacts/6085.apk |
|
when I start a voice call from web, I get call notification on android and I click on video call from the notification itself and I join the call without video enabled. When I start a video call from web, I receive a call notification, I click on video call from the call notification itself, I join the call with video enabled. The button Video call might be confusing here. We can rename it to something more generic like Join a call. |
Disabling the video was the outcome of the poll in the team meeting. Also see #6015 (comment)
Same behavior as for other messengers, so should be fine |

manual backport of #6015
replacing #6079
🖼️ Screenshots
🚧 TODO
🏁 Checklist
/backport to stable-xx.x