Skip to content

Use native incoming call notification style with Answer/Decline actions#1

Draft
pfurovYnP wants to merge 1 commit intomasterfrom
codex/implement-native-call-notification
Draft

Use native incoming call notification style with Answer/Decline actions#1
pfurovYnP wants to merge 1 commit intomasterfrom
codex/implement-native-call-notification

Conversation

@pfurovYnP
Copy link
Copy Markdown
Owner

Motivation

  • Incoming calls were delivered as ordinary notifications without native call UI affordances, causing a worse UX compared to other messengers. This change aims to present incoming calls as proper incoming-call notifications with quick answer/decline actions and full-screen intent behavior.

Description

  • Build incoming call notifications using NotificationCompat.CallStyle.forIncomingCall(...) and a Person caller to enable native incoming-call presentation and richer actions in NotificationWorker.kt.
  • Add explicit Answer and Decline PendingIntents where Answer launches CallNotificationActivity with KEY_CALL_VOICE_ONLY and Decline sends a broadcast to dismiss the ringing notification.
  • Add IncomingCallDeclineReceiver to handle decline actions by cancelling the ringing notification and register it in AndroidManifest.xml.
  • Update CallNotificationActivity to detect when it was opened via the notification Answer action (via KEY_CALL_VOICE_ONLY) and automatically proceed to CallActivity.

Testing

  • Attempted to compile Kotlin with ./gradlew :app:compileDebugKotlin, which failed because the task name is ambiguous in this multi-flavor project (requires a specific flavor task). (failed)
  • Attempted flavored compile with ./gradlew :app:compileGplayDebugKotlin, which failed in the environment due to missing Android SDK (ANDROID_HOME / sdk.dir). (failed)
  • Static inspection and local execution of search/replace/format steps were performed to validate code insertion and manifest registration; no unit/instrumentation tests were executed due to unavailable SDK in the environment. (no run)

Codex Task

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant