Repository navigation
feat(voip): migrate Android accept/reject from DDP to REST - #7127
Conversation
PRDPRD: Migrate VoIP Accept/Reject from DDP to REST (Android)Problem StatementThe native Android VoIP implementation opens a per-call DDP WebSocket connection solely to send two signals: accept and reject. This requires The same accept/reject signal can be sent via a single HTTP POST to SolutionReplace DDP-based accept/reject signaling from User Stories
ArchitectureOut of Scope
|
Progress
Slice 1 —
|
| User Story | Covered by |
|---|---|
| 1 — Reliable accept/reject signals | Slices 1–4 |
| 2 — Understandable VoipNotification handlers | Slices 2–5 |
| 3 — Testable without WebSocket | Slices 1, 2, 3 |
| 4 — Same Ejson auth mechanism | Slice 1 |
| 5 — Immediate response (no DDP handshake) | Slices 2, 3, 4 |
| 6 — Remove DDP from VoIP stack | Slice 5 (partial) |
| 7 — Independent from iOS | All slices |
File:
|
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
WalkthroughAdds a new Kotlin REST client to POST /api/v1/media-calls.answer, updates VoIP notification handlers to use that REST client instead of DDP for accept/reject, and switches DDP WebSocket usage to a shared OkHttpClient instance. Changes
Sequence Diagram(s)sequenceDiagram
participant VN as VoipNotification
participant Settings as Settings.Secure
participant MCAR as MediaCallsAnswerRequest
participant Ejson as Ejson (Auth)
participant HTTP as OkHttp
participant API as Media Calls API
VN->>Settings: get ANDROID_ID (contractId)
VN->>MCAR: fetch(context, host, callId, contractId, answer, features, onResult)
MCAR->>Ejson: resolve x-user-id & x-auth-token
alt credentials missing
MCAR->>VN: onResult(false)
else credentials present
MCAR->>MCAR: build JSON body (callId, contractId, type, answer, supportedFeatures?)
MCAR->>HTTP: POST /api/v1/media-calls.answer with headers & body
HTTP->>API: send request
API-->>HTTP: HTTP response
HTTP->>MCAR: onResponse(status)
alt 2xx
MCAR->>VN: onResult(true)
else
MCAR->>VN: onResult(false)
end
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
File:
|
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (3)
android/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt (2)
153-161: Consider logging REST failures for decline action.The callback
{ _ -> }silently discards the result. While fire-and-forget semantics may be acceptable for decline (local UI proceeds regardless), logging failures would aid debugging when reject signals don't reach the server.Proposed fix
MediaCallsAnswerRequest.fetch( context = context, host = payload.host, callId = payload.callId, contractId = deviceId, answer = "reject", supportedFeatures = null - ) { _ -> } + ) { success -> + if (!success) { + Log.w(TAG, "REST reject failed for ${payload.callId}; local decline proceeds") + } + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt` around lines 153 - 161, The current decline call to MediaCallsAnswerRequest.fetch in VoipNotification.kt discards the result via `{ _ -> }`; update the callback to capture the result or error, and log failures using the app logger (include context such as payload.callId and deviceId) so rejected signals that fail to reach the server are recorded; modify the anonymous callback passed to MediaCallsAnswerRequest.fetch (the closure after answer="reject") to inspect the response/error and call the existing logging facility rather than ignoring it.
418-426: Same suggestion: log failures for busy-call rejection.Consistent with the decline path, logging REST failures here would help diagnose issues where busy-call rejections don't reach the server.
Proposed fix
MediaCallsAnswerRequest.fetch( context = context, host = payload.host, callId = payload.callId, contractId = deviceId, answer = "reject", supportedFeatures = null - ) { _ -> } + ) { success -> + if (!success) { + Log.w(TAG, "REST reject (busy) failed for ${payload.callId}") + } + }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt` around lines 418 - 426, The busy-call rejection path currently calls MediaCallsAnswerRequest.fetch without logging failures; update the callback passed to MediaCallsAnswerRequest.fetch (in VoipNotification.kt where deviceId and payload.callId are used) to handle the response/error and call the same logger used on the decline path (e.g., process or repository logger) to record any non-success or exception details, including host, callId and the error message so REST failures are visible in logs. Ensure you preserve the existing parameters (context, host, callId, contractId=deviceId, answer="reject") and only add failure logging in the completion lambda.android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt (1)
82-95: Unusedcontextparameter.The
contextparameter is passed toexecute()but never used —Ejsonis instantiated without it. IfEjsonrelies on static/shared storage keyed by host, consider removing the parameter to avoid confusion. Otherwise, ifEjsonshould use the context, pass it to the constructor.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt` around lines 82 - 95, The execute function's context parameter is unused; either remove it from the execute signature and all callers, or thread it into Ejson by constructing Ejson with the context (e.g., Ejson(context).apply { host = host }) so the instance can access Android resources; update the execute method signature and every place that calls MediaCallsAnswerRequest.execute, or change the Ejson instantiation inside execute to accept context, and ensure imports and constructors are updated accordingly.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In
`@android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt`:
- Around line 110-123: Replace per-request OkHttpClient instantiation with a
shared/reused client (e.g., a companion object or singleton HttpClient) instead
of calling OkHttpClient() inside MediaCallsAnswerRequest; also ensure the
okhttp3.Response is closed in onResponse to avoid leaks (use response.close() or
response.body?.close() / response.use { ... } before returning) and continue to
pass the success boolean to onResult; locate these changes around the
newCall(request).enqueue callback and the onFailure/onResponse overrides
referenced in the diff.
---
Nitpick comments:
In
`@android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt`:
- Around line 82-95: The execute function's context parameter is unused; either
remove it from the execute signature and all callers, or thread it into Ejson by
constructing Ejson with the context (e.g., Ejson(context).apply { host = host })
so the instance can access Android resources; update the execute method
signature and every place that calls MediaCallsAnswerRequest.execute, or change
the Ejson instantiation inside execute to accept context, and ensure imports and
constructors are updated accordingly.
In `@android/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt`:
- Around line 153-161: The current decline call to MediaCallsAnswerRequest.fetch
in VoipNotification.kt discards the result via `{ _ -> }`; update the callback
to capture the result or error, and log failures using the app logger (include
context such as payload.callId and deviceId) so rejected signals that fail to
reach the server are recorded; modify the anonymous callback passed to
MediaCallsAnswerRequest.fetch (the closure after answer="reject") to inspect the
response/error and call the existing logging facility rather than ignoring it.
- Around line 418-426: The busy-call rejection path currently calls
MediaCallsAnswerRequest.fetch without logging failures; update the callback
passed to MediaCallsAnswerRequest.fetch (in VoipNotification.kt where deviceId
and payload.callId are used) to handle the response/error and call the same
logger used on the decline path (e.g., process or repository logger) to record
any non-success or exception details, including host, callId and the error
message so REST failures are visible in logs. Ensure you preserve the existing
parameters (context, host, callId, contractId=deviceId, answer="reject") and
only add failure logging in the completion lambda.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ee27a59b-e07a-4dfa-8c3d-34dd29c7989a
📒 Files selected for processing (2)
android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.ktandroid/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: ESLint and Test / run-eslint-and-test
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/lib/services/voip/**/*.{ts,tsx} : Implement VoIP with WebRTC peer-to-peer audio calls in app/lib/services/voip/ using Zustand stores instead of Redux, with native CallKit (iOS) and Telecom (Android) integration; keep VoIP and VideoConf separate
📚 Learning: 2026-04-07T17:49:17.538Z
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/lib/services/voip/**/*.{ts,tsx} : Implement VoIP with WebRTC peer-to-peer audio calls in app/lib/services/voip/ using Zustand stores instead of Redux, with native CallKit (iOS) and Telecom (Android) integration; keep VoIP and VideoConf separate
Applied to files:
android/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt
🔇 Additional comments (3)
android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt (1)
1-53: Clean implementation of the REST client.The overall structure is well-designed: good KDoc documentation, clear separation between the factory method and instance execution, and proper credential resolution pattern matching the existing
ReplyBroadcastapproach.android/app/src/main/java/chat/rocket/reactnative/voip/VoipNotification.kt (2)
276-286: Accept path handles REST result correctly.The accept flow properly integrates with the existing
finish()callback pattern, preserving the 10-second timeout and JS recovery path on failure. TheddpRegistry.stopClientcall infinish()appropriately cleans up any DDP listener started bystartListeningForCallEnd.
395-403: Retained helper for DDP subscription flush.This function is correctly preserved for use in
startListeningForCallEnd— it flushes any queued DDP method calls after login completes. Since call-end detection remains on DDP (deferred slice), this is still needed.
a611d73 to
38ab136
Compare
There was a problem hiding this comment.
🧹 Nitpick comments (1)
android/app/src/main/java/chat/rocket/reactnative/voip/DDPClient.kt (1)
48-48: Protectconnect()against duplicate calls.Line 48 overwrites the current
webSocketreference. If the sameDDPClientreconnects without a priordisconnect(), the old listener can keep delivering messages into the same callback state. Either reject re-entry up front or tag listener callbacks with a connection generation before swapping the socket.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@android/app/src/main/java/chat/rocket/reactnative/voip/DDPClient.kt` at line 48, The connect() method currently assigns a new WebSocket to the webSocket field unconditionally which can overwrite an active socket and keep old WebSocketListener callbacks delivering messages into the new state; either prevent re-entrancy by checking webSocket (or a boolean isConnected) and returning/erroring if already connected, or implement a connection generation/tag (e.g., connectionId or generation counter stored on DDPClient) and have the anonymous WebSocketListener capture that generation and ignore callbacks if it does not match before swapping webSocket; update disconnect() to clear/reset the flag or advance the generation so stale listeners are ignored.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@android/app/src/main/java/chat/rocket/reactnative/voip/DDPClient.kt`:
- Line 48: The connect() method currently assigns a new WebSocket to the
webSocket field unconditionally which can overwrite an active socket and keep
old WebSocketListener callbacks delivering messages into the new state; either
prevent re-entrancy by checking webSocket (or a boolean isConnected) and
returning/erroring if already connected, or implement a connection
generation/tag (e.g., connectionId or generation counter stored on DDPClient)
and have the anonymous WebSocketListener capture that generation and ignore
callbacks if it does not match before swapping webSocket; update disconnect() to
clear/reset the flag or advance the generation so stale listeners are ignored.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: ccc4ee55-682e-4ba5-8fd4-2faba85f9f0e
📒 Files selected for processing (2)
android/app/src/main/java/chat/rocket/reactnative/voip/DDPClient.ktandroid/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt
🚧 Files skipped from review as they are similar to previous changes (1)
- android/app/src/main/java/chat/rocket/reactnative/voip/MediaCallsAnswerRequest.kt
📜 Review details
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
- GitHub Check: ESLint and Test / run-eslint-and-test
- GitHub Check: format
🧰 Additional context used
🧠 Learnings (1)
📓 Common learnings
Learnt from: CR
Repo: RocketChat/Rocket.Chat.ReactNative PR: 0
File: CLAUDE.md:0-0
Timestamp: 2026-04-07T17:49:17.538Z
Learning: Applies to app/lib/services/voip/**/*.{ts,tsx} : Implement VoIP with WebRTC peer-to-peer audio calls in app/lib/services/voip/ using Zustand stores instead of Redux, with native CallKit (iOS) and Telecom (Android) integration; keep VoIP and VideoConf separate
🔇 Additional comments (1)
android/app/src/main/java/chat/rocket/reactnative/voip/DDPClient.kt (1)
24-30: This ownership shift looks good.Making the transport instance shared removes the need for one
DDPClientto tear it down for every other caller.
Adds android equivalent of ios/Shared/RocketChat/API/MediaCallsAnswerRequest.swift.
POST /api/v1/media-calls.answer with { callId, contractId, type, answer, supportedFeatures }.
Auth via Ejson (x-user-id / x-auth-token) — same pattern as ReplyBroadcast.
Unblocks Slices 2, 3, 4.
|
Android Build Available Rocket.Chat Experimental 4.72.0.108551 Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNTWdOz5E70WaMRW7T0aBz8fBNHzJTDDZDywyYLyGqp2j1flB-kl5bTN9cIcF-Hy3BozIDzmvXBCKqp3w1Xc |
|
Android Build Available Rocket.Chat 4.72.0.108551 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNQw_juYLwTBgFTcF6hh2NRNJp1mlBo_gZj28AB6MWhnSM3GvIg8QX8SjTN8vJH4S1pj7nS1XjJBQxV2eNIL |
Made-with: Cursor
|
Android Build Available Rocket.Chat Experimental 4.72.0.108561 Internal App Sharing: https://play.google.com/apps/test/RQVpXLytHNc/ahAO29uNRwOX3kDlK8-SYEFsd22KSn5Kj4vm7SDWrY6aja1E62FVf8DYNg6E-ahJaofA8ealibl5hJmu1v1hQOqAS9 |
|
Android Build Available Rocket.Chat 4.72.0.108562 Internal App Sharing: https://play.google.com/apps/test/RQQ8k09hlnQ/ahAO29uNT9jFZ6zcb69Ge8FhE1feYM-Y5OheeFiLRCsJ_Xua3QxgSv0k-EtylkH2iGkwmgvQl2OiLpzOoP2Q_pQm0u |
…/Decline (#7215) * merge feat.voip-lib * feat(voip): enhance call handling with UUID mapping and event listeners * Base call UI * feat(voip): integrate Zustand for call state management and enhance CallView UI * feat(voip): add simulateCall function for mock call handling in UI development * refactor(CallView): update button handlers and improve UI responsiveness * Add pause-shape-unfilled icon * Base CallHeader * toggleFocus * collapse buttons * Header components * Hide header when no call * Timer * Add use memo * Add voice call item on sidebar * cleanup * Temp use @rocket.chat/media-signaling from .tgz * cleanup * Check module and permissions to enable voip * Refactor stop method to use optional chaining for media signal listeners * voip push first test * Add VoIP call handling with pending call management - Implemented VoIP push notification handling in index.js, including storing call info for later processing. - Added CallKeep event handlers for answering and ending calls from a cold start. - Introduced a new CallIdUUID module to convert call IDs to deterministic UUIDs for compatibility with CallKit. - Created a pending call store to manage incoming calls when the app is not fully initialized. - Updated deep linking actions to include VoIP call handling. - Enhanced MediaSessionInstance to process pending calls and manage call states effectively. * Remove pending store and create getInitialEvents on app/index * Attempt to make iOS calls work from cold state * lint and format * Patch callkeep ios * Temp send iOS voip push token on gcm * Temp fix require cycle * chore: format code and fix lint issues [skip ci] * CallIDUUID module on android and voip push * Add setCallUUID on useCallStore to persist calls accepted on native Android * remove callkeep from notification * Android Incoming Call UI POC * Refactor VoIP handling: Migrate VoIP-related classes to a new package structure, removing deprecated modules and consolidating functionality. Update imports in MainApplication and NotificationIntentHandler to reflect changes. This cleanup enhances code organization and prepares for future VoIP feature enhancements. * Remove VoipForegroundService * cleanup and use caller instead of callerName * Cleanup and make iOS build again * Refactor VoIP handling: Remove unused event emissions for call answered and declined, switch from SharedPreferences to in-memory storage for pending VoIP call data, and update method signatures for better clarity. This cleanup enhances performance and prepares for future VoIP feature improvements. * Refactor VoIP handling: Introduce a new VoipPayload class to encapsulate call data, streamline notification processing, and enhance method signatures across the VoIP module. This update improves code clarity and prepares for future feature enhancements. * Migrate react-native-voip-push-notifications to VoipModule * Refactor VoIP module: Update package structure by moving VoipTurboPackage to the main package and removing the obsolete NativeVoipSpec class. Adjust imports in MainApplication and VoipModule to reflect these changes, enhancing code organization and maintainability. * Unify emitters * Move CallKeep listeners from MediaSessionInstance to getInitialEvents * Clear callkeep on endcall * Unify getInitialEvents logic * getInitialEvents -> MediaCallEvents * chore: format code and fix lint issues [skip ci] * feat(Android): Add full screen incoming call (#6977) * feat: Update call UI (#6990) * feat: Handle audio routing, e.g., Bluetooth headset vs. internal speaker switching (#6992) * fix: empty space when not on call (#6993) * feat: Dialpad (#7000) * action: organized translations * feat: start call (#7024) * chore: format code and fix lint issues * feat: Pre flight (#7038) * action: organized translations * feat: Receive voip push notifications from backend (#7045) * feat: Refactor media session handling and improve disconnect logic (#7065) * feat: Control incoming call from native (#7066) * feat: Voice message blocks (#7057) * feat: native accept success event (#7068) * feat(voip): call waiting, busy detection, and videoconf blocking (#7077) * action: organized translations * feat(voip): tap-to-hide call controls with animations (#7078) * feat(voip): navigate to call DM from message button and header (#7082) * feat(voip): tablet and landscape layout (#7110) * chore: develop into feat.voip-lib-new (RN 81 + Expo 54 + reanimated 4 + true-sheet + iOS 26) (#7114) * chore: format code and fix lint issues * feat(voip): android landscape layout for IncomingCallActivity (#7116) * Update agents files * feat(voip): Support a11y (#7106) * Fix content cutting on iOS on some edge cases * pods * Ignore .worktrees on jest * chore: Merge develop into feat.voip-lib-new (#7129) * fix(voip): show CallKit UI when call is active in background (#7128) * chore: Update media-signaling to 0.2.0 (#7153) * feat(voip): migrate iOS accept/reject from DDP to REST (#7124) * Fix icons * feat(voip): migrate Android accept/reject from DDP to REST (#7127) * test(voip): integration tests for CallView pipeline (#7161) * feat(voip): display video conf provider as subtitle (#7160) * fix(voip): CallView button grid and correct landscape/dialpad layouts (#7164) * fix(voip): prevent stale MMKV cache on Android first-install accept MMKVKeyManager.initialize ran in MainApplication.onCreate before the JS engine started and opened the default MMKV file via the Tencent 1.2 JAR when it was still empty. Tencent caches instances per-ID in a singleton registry, so that empty-state view was held for the rest of the process. JS later wrote credentials through react-native-mmkv (MMKV Core 2.0), which has its own separate registry. When a VoIP push arrived, Ejson.getMMKV() got the cached empty Tencent instance and reported "No userId found in MMKV for server". Closing and reopening the app cleared the cache, which is why only the very first call after install failed. Drop the open/verify block — the encryption key is already cached from SecureKeystore, so no MMKV handle is needed here. The first Tencent instance is now created inside Ejson.getMMKV() after JS has written, so it scans the file fresh. * fix(voip): prevent duplicate ringtone on Android incoming call (#7158) * fix(voip): set explicit snaps for NewMediaCall bottom sheet (#7165) * Update app/lib/services/voip/MediaSessionStore.ts Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com> * fix: make startVoipFork reactive to permissions-changed (#7151) * fix(android): remove MediaProjectionService from merged manifest (#7190) * fix(voip): Phone account creation (#7170) * feat: add Enable Mobile Ringing toggle in user preferences (#7155) * fix(voip): ship blockers for PushKit, licensing, outbound calls, push tokens (#7167) * fix(android): Play Store mic discoverability, safer FCM logs, avatar auth via headers (#7171) * fix(ios): serialize VoipService bridge statics (#7169) * fix(voip): Android DDP thread safety and VoipPayload bundle parity (#7168) * chore(voip): dead-code and hygiene sweep (#7174) * refactor(voip): decouple navigateToCallRoom from Redux and backfill REST/connect tests (#7176) * test(voip): tighten ringing endCall assertion and add VideoConf VoIP-lock saga coverage (#7177) * fix(ios): harden VoIP DDP WebSocket client on receive failures and TLS (#7173) * refactor(voip): MediaCallEvents Redux adapters and resetVoipState (#7178) * refactor(voip): decouple peer autocomplete from Redux; simplify NewMediaCall (#7175) * fix(ios): add NS_SWIFT_NAME to Challenge.runChallenge for Swift 6.2 compatibility Swift 6.2 (Xcode 26.x / macos-26 runner) auto-renames the Objective-C method runChallenge:didReceiveChallenge:completionHandler: to run(_:didReceive:completionHandler:) when imported into Swift. Add NS_SWIFT_NAME to explicitly pin the Swift import name, preventing the compiler from applying its heuristics. This keeps the existing Swift call site in DDPClient.swift working without changes. * fix(ios): cancel old URLSession/webSocketTask before reconnecting in DDPClient.connect (#7197) * fix(ios): add NSLock to nativeAcceptHandledCallIds and 10s REST timeout to handleNativeAccept (#7198) * feat(android): create VoipCallService with FOREGROUND_SERVICE_MICROPHONE (#7199) * fix(android): start VoipCallService on accept, stop on hangup/timeout, install end-call listener (#7200) * fix(voip): enable DM nav for users with SIP extension (#7203) * fix(android): handle null VoiceConnection in answerIncomingCall, notify JS (#7201) * fix(voip): resolve closure capture ordering in handleNativeAccept (#7209) * fix(android): integrate VoIP modules with SSL-pinned OkHttpClient (#7208) * fix(push): gate id and voipToken behind server version checks, fix VideoConf caller extra (#7210) * fix(voip): remove sensitive data from production logs (#7207) * fix(android): remove isRunning guard + add double-tap guard on Accept/Decline - VoipCallService: remove if (!isRunning) guard, call startForeground unconditionally (idempotent on Android, fixes Android 14+ foreground service requirement) - IncomingCallActivity: add AtomicBoolean guard on handleAccept/handleDecline to prevent double-tap from triggering multiple service starts --------- Co-authored-by: diegolmello <diegolmello@users.noreply.github.com> Co-authored-by: Pierre Lehnen <55164754+pierre-lehnen-rc@users.noreply.github.com>
Proposed changes
Migrate the VoIP accept/reject signal path on Android from the DDP (WebSocket) transport to a synchronous REST call (
POST /api/v1/media-calls.answer), matching the pattern already implemented on iOS.Summary
MediaCallsAnswerRequest.ktREST client9692a23c0handleAcceptAction→ REST669c19105handleDeclineAction→ REST01d119185rejectBusyCall→ RESTd0dc50874VoipNotification8d543e45aDeferred
startListeningForCallEndoff DDP (deferred to separate PRD)DDPClient.kt/VoipPerCallDdpRegistry.kt(blocked by Slice 6)Issue(s)
https://rocketchat.atlassian.net/browse/VMUX-67
How to test or reproduce
MediaCallsAnswerRequest responserejectBusyCallsends REST rejectScreenshots
N/A — no UI changes.
Types of changes
Checklist
Summary by CodeRabbit
Improvements
Stability