Skip to content

PR 2/3: Experimental Native Call - headless - #7745

Open
BillCarsonFr wants to merge 5 commits into
feature/valere/native_call_entry_pointfrom
feature/valere/native_call_stack
Open

BillCarsonFr wants to merge 5 commits into
feature/valere/native_call_entry_pointfrom
feature/valere/native_call_stack

Conversation

@BillCarsonFr

@BillCarsonFr BillCarsonFr commented Sep 21, 2026

Copy link
Copy Markdown
Member

Content

This PR allows to accept incoming audio call without any UI (via the notifcation to accept then hangup).

In a nutshell, there is an ElementCallStack that needs to be created (it is done lazilly see getOrBuild and per account -for multi account-), this setups the wireing needed for the rust core to talk and listen to the matrix client. I exists when there is no call.

From the stack object, you can now access the ElementCallController, this is the thing that will actually start/join a call and maintain an active call.

The flow is the following:

  • There is a push notification for a rtc.notification
  • Goes to the IncomingCallActivity that forwards to the ElementCallEntryPoint
  • The ElementCallEntryPoint reads the lab flag and forwards to the NativeCallEntryPoint
  • The NativeCallEntryPoint use the ElementCallController to start the call

Motivation and context

Screenshots / GIFs

Tests

  • Step 1
  • Step 2
  • Step ...

Tested devices

  • Physical
  • Emulator
  • OS version(s):

Checklist

  • I am aware of the etiquette.
  • This PR was made with the help of AI:
    • Yes. In this case, please request a review by Copilot.
    • No.
  • Changes have been tested on an Android device or Android emulator with API 24
  • UI change has been tested on both light and dark themes
  • Accessibility has been taken into account. See https://github.com/element-hq/element-x-android/blob/develop/CONTRIBUTING.md#accessibility
  • Pull request is based on the develop branch
  • Pull request title will be used in the release note, it clearly defines what will change for the user
  • Pull request includes screenshots or videos if containing UI changes
  • You've made a self review of your PR

@BillCarsonFr
BillCarsonFr added this pull request to stack #7746 September 21, 2026 17:20
@github-actions

github-actions Bot commented Sep 21, 2026

Copy link
Copy Markdown
Contributor

📱 Scan the QR code below to install the build (arm64 only) for this PR.
QR code
If you can't scan the QR code you can install the build via this link: https://i.diawi.com/etmhFT

Comment thread features/callnative/impl/src/main/AndroidManifest.xml Fixed
Comment thread features/callnative/impl/src/main/AndroidManifest.xml Fixed
@codecov

codecov Bot commented Sep 21, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 31.40496% with 83 lines in your changes missing coverage. Please review.
✅ Project coverage is 80.99%. Comparing base (c32d1d5) to head (5de162e).

Files with missing lines Patch % Lines
...features/callnative/impl/ElementCallControllers.kt 0.00% 49 Missing ⚠️
...res/callnative/impl/ElementXRoomContextProvider.kt 0.00% 20 Missing ⚠️
...roid/features/call/impl/ui/IncomingCallActivity.kt 0.00% 10 Missing ⚠️
...trix/impl/di/DefaultElementCallTransportFactory.kt 0.00% 4 Missing ⚠️
Additional details and impacted files
@@                            Coverage Diff                             @@
##           feature/valere/native_call_entry_point    #7745      +/-   ##
==========================================================================
- Coverage                                   81.05%   80.99%   -0.07%     
==========================================================================
  Files                                        2794     2798       +4     
  Lines                                       82690    82804     +114     
  Branches                                    11384    11398      +14     
==========================================================================
+ Hits                                        67027    67063      +36     
- Misses                                      11277    11355      +78     
  Partials                                     4386     4386              

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@BillCarsonFr BillCarsonFr added the PR-Wip For anything that isn't ready to ship and will be enabled at a later date label Sep 21, 2026
Comment thread appnav/src/main/kotlin/io/element/android/appnav/loggedin/MatrixRtcBootstrap.kt Outdated
@BillCarsonFr
BillCarsonFr force-pushed the feature/valere/native_call_stack branch from a3503fa to f535b7d Compare September 22, 2026 12:00
BillCarsonFr and others added 5 commits September 22, 2026 21:10
The component and the matrix-rust-rtc core publish as GitHub release assets rather than to Maven, so two filtered ivy repositories resolve them; both become plain coordinates the day they reach Maven Central.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The factory lives in libraries/matrix/impl because that is the only module compiled against the Rust SDK, and is app-scoped because a call is started for whichever account it belongs to rather than the one on screen.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Keyed by session id in app scope rather than session-scoped, because answering a call notification after a cold start has no session graph to reach a session-scoped stack from.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Found on a device: with no UI to answer the microphone permission or unset the maximized snapshot, the call parks forever and blanks the screen through the proximity wake lock.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The notification's Answer action named ElementCallActivity outright, so answering always opened the WebView whatever FeatureFlags.NativeCall was set to.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
@BillCarsonFr
BillCarsonFr force-pushed the feature/valere/native_call_stack branch from bb6c040 to 5de162e Compare September 22, 2026 19:11
@BillCarsonFr

Copy link
Copy Markdown
Member Author

@jmartinesp I modified the PR and forced push it. Your previous comment is on code that has been removed.
I marking as ready to review.

There is a point about the dependency that I am not sure about, right now the native call component and the matrix-rust-rtc core publish as GitHub release asset. Is this is a blocker? Should I publish on maven?

Other than that I updated the PR description to say more about the content.

@BillCarsonFr
BillCarsonFr marked this pull request as ready for review September 22, 2026 19:22
@BillCarsonFr
BillCarsonFr requested a review from a team as a code owner September 22, 2026 19:22
@BillCarsonFr
BillCarsonFr requested review from bmarty and removed request for a team September 22, 2026 19:22
@sonarqubecloud

Copy link
Copy Markdown

@jmartinesp jmartinesp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code in the PR seems ok, and I tested the feature and it worked well overall.

There is a point about the dependency that I am not sure about, right now the native call component and the matrix-rust-rtc core publish as GitHub release asset. Is this is a blocker? Should I publish on maven?

I think this is ok, but ideally we'd publish the libraries to maven central in the future.

Other than that, a few things I noticed which I'm not sure if are part of the integration or the EC native project:

  • When you are in a call for a DM and the other user hangs up, the call doesn't end for you AFAICT. I always have to hang up manually in the notification.
  • Clicking on 'mute microphone' doesn't modify the notification, so it always displays 'mute microphone' (also, the text is cut-off).
  • At least once, I started a call from EW, replied on EXA an although I could see the call happening on both devices, none received sound AFAICT. Muting and unmuting did nothing. I haven't found a way to reproduce this though, it seemed quite random.

@BillCarsonFr

Copy link
Copy Markdown
Member Author

Other than that, a few things I noticed which I'm not sure if are part of the integration or the EC native project

I haven't tested that PR stand-alone a lot. Do you have these issue with the 3/3 top of the stack?

@jmartinesp

Copy link
Copy Markdown
Member

I haven't tested that PR stand-alone a lot. Do you have these issue with the 3/3 top of the stack?

I haven't tested that one yet, but I can take a look.

@jmartinesp

jmartinesp commented Sep 23, 2026

Copy link
Copy Markdown
Member

Yes, it still has both DM and mute microphone issues + a few new ones with PiP. I guess the PiP change triggered within the EC native UI is different than the one we trigger when leaving the screen in EXA?

This branch has not been deployed

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

Labels

PR-Wip For anything that isn't ready to ship and will be enabled at a later date

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants