Skip to content

Handle “accept call” action in onNewIntent and update intent reference - #1477

Closed
rahul-lohra wants to merge 4 commits into
developfrom
feature/rahullohra/notifications-accept
Closed

Handle “accept call” action in onNewIntent and update intent reference#1477
rahul-lohra wants to merge 4 commits into
developfrom
feature/rahullohra/notifications-accept

Conversation

@rahul-lohra

@rahul-lohra rahul-lohra commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

🎯 Goal

This PR ensures correct intent handling for call actions by:

  1. Calling setIntent(intent) inside onNewIntent() so that lifecycle methods like onResume() always receive the latest intent.
  2. Handling the "accept call" action directly within onNewIntent() to allow faster and more reliable call acceptance when the activity is already running.

🛠 Implementation details

Describe the implementation

🎨 UI Changes

Add relevant screenshots

Before After
Screen.Recording.2025-07-18.at.12.14.16.PM.mov
Screen.Recording.2025-07-18.at.12.17.22.PM.mov

@rahul-lohra rahul-lohra self-assigned this Jul 18, 2025
@rahul-lohra
rahul-lohra requested a review from a team as a code owner July 18, 2025 06:38
@github-actions

github-actions Bot commented Jul 18, 2025

Copy link
Copy Markdown
Contributor

SDK Size Comparison 📏

SDK Before After Difference Status
stream-video-android-core 11.40 MB 11.40 MB 0.00 MB 🟢
stream-video-android-ui-xml 5.70 MB 5.70 MB 0.00 MB 🟢
stream-video-android-ui-compose 5.86 MB 5.88 MB 0.02 MB 🟢

@sonarqubecloud

Copy link
Copy Markdown

Quality Gate Failed Quality Gate failed

Failed conditions
0.0% Coverage on New Code (required ≥ 80%)

See analysis details on SonarQube Cloud

when (intent.action) {
NotificationHandler.ACTION_ACCEPT_CALL -> {
// Exit case
// TODO Later

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Exit the current call and join the new one. If they are different. If we are accepting the same call, do nothing.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should also be customisable behaviour so an open function as hook should be added.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sure

@rahul-lohra
rahul-lohra marked this pull request as draft July 28, 2025 05:28
@rahul-lohra

Copy link
Copy Markdown
Contributor Author

Closed. It is included as part of #1478

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants