Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
182 commits
Select commit Hold shift + click to select a range
3c9a701
feat: apps engine action buttons in the composer action sheet
OtavioStasiak Sep 16, 2026
c765159
feat: apps engine action button store, filters and translations
OtavioStasiak Sep 16, 2026
6edb71e
chore: format code and fix lint issues
OtavioStasiak Sep 16, 2026
76b7475
feat: trigger apps engine action buttons
OtavioStasiak Sep 16, 2026
65d3600
chore: new i18n labels
OtavioStasiak Sep 16, 2026
b241f43
chore: unit tests
OtavioStasiak Sep 16, 2026
5eb3910
feat: useAppActionButtons
OtavioStasiak Sep 16, 2026
57cec21
action: organized translations
OtavioStasiak Sep 16, 2026
0d1d666
fix: remove unused imports
OtavioStasiak Sep 16, 2026
955b77f
fix: translation
OtavioStasiak Sep 16, 2026
79e12d6
Merge branch 'develop' into feat.apps-engine-ai
OtavioStasiak Sep 16, 2026
b1a070a
chore: rollback unused changes
OtavioStasiak Sep 17, 2026
b98ee80
code improvements
OtavioStasiak Sep 17, 2026
4b7932a
chore: move UIKit action handlers to app/lib/apps
OtavioStasiak Sep 17, 2026
577d2d4
e2e tests
OtavioStasiak Sep 17, 2026
50df26e
Merge branch 'develop' into feat.apps-engine-ai
OtavioStasiak Sep 17, 2026
3aefacb
fix: e2e tests
OtavioStasiak Sep 17, 2026
457f50c
fix: reset apps store on disconnect
OtavioStasiak Sep 23, 2026
cc93147
fix: resubscribe apps stream on reconnect
OtavioStasiak Sep 23, 2026
fcd0e09
chore: drop apps barrel, emit toasts via typed emitter
OtavioStasiak Sep 23, 2026
d708959
fix: send tmid with composer ai actions
OtavioStasiak Sep 23, 2026
700f791
fix: scope apps stream refetches and room button filtering
OtavioStasiak Sep 23, 2026
a22983f
Merge branch 'develop' into feat.apps-engine-ai
OtavioStasiak Sep 23, 2026
cb079f7
feat: register VideoConfWebView route in inside and master-detail stacks
OtavioStasiak Sep 23, 2026
7448760
feat: open Pexip conferences in-app and add Join discussion to call m…
OtavioStasiak Sep 23, 2026
f128579
action: organized translations
OtavioStasiak Sep 23, 2026
934920d
fix: refresh video conference message block from the room videoconf s…
OtavioStasiak Sep 25, 2026
161f373
Merge branch 'develop' into feat.open-conferences-chat
OtavioStasiak Sep 25, 2026
4d15c8c
chore: format code and fix lint issues
OtavioStasiak Sep 25, 2026
392a1fe
feat: apps engine action buttons in the sidebar
OtavioStasiak Sep 25, 2026
1f2748d
translation
OtavioStasiak Sep 25, 2026
d96aeb8
tests
OtavioStasiak Sep 25, 2026
a96d931
Merge branch 'develop' into feat.app-on-profile
OtavioStasiak Sep 25, 2026
fb73770
action: organized translations
OtavioStasiak Sep 25, 2026
0d043d0
fix: lint
OtavioStasiak Sep 25, 2026
ce55a1a
fix: tests
OtavioStasiak Sep 25, 2026
92d37ae
fix: translation
OtavioStasiak Sep 29, 2026
e40ec28
Merge branch 'develop' into feat.app-on-profile
OtavioStasiak Sep 29, 2026
6b386d6
fix(apps): ignore stale fetch responses after store reset
OtavioStasiak Sep 30, 2026
d45c8d9
fix(apps): stop stream listener when subscribe fails
OtavioStasiak Sep 30, 2026
28208f8
refactor(apps): reuse showToast helper instead of a second toast emitter
OtavioStasiak Sep 30, 2026
0b6d07f
test(apps): cover live filtering, retry and unsupported toasts
OtavioStasiak Sep 30, 2026
72599c1
cleanup
OtavioStasiak Sep 30, 2026
afd7065
cleanup
OtavioStasiak Sep 30, 2026
aad17b2
feat: add Pexip call store
OtavioStasiak Oct 1, 2026
83fcf94
feat: add minimizable Pexip call overlay
OtavioStasiak Oct 1, 2026
922cb18
feat: match videoconf message block with web and mount Pexip call ove…
OtavioStasiak Oct 1, 2026
634d7d7
feat: split room header into voice and video call buttons like web
OtavioStasiak Oct 1, 2026
e0d32d9
feat: open Pexip calls in the in-app call overlay
OtavioStasiak Oct 1, 2026
1eaf4c5
i18n
OtavioStasiak Oct 1, 2026
7da7937
test: loopback proxy
OtavioStasiak Oct 2, 2026
1cf945f
turn off the proxy when call ends
OtavioStasiak Oct 2, 2026
a19409a
improve experience of pexip
OtavioStasiak Oct 2, 2026
52e6efe
cleanup
OtavioStasiak Oct 5, 2026
ac919a9
code improvements
OtavioStasiak Oct 5, 2026
54f6683
fix: tests
OtavioStasiak Oct 5, 2026
c4bae0b
fix(apps): keep ModalBlockView content above Android navigation bar
OtavioStasiak Oct 7, 2026
e97dfc2
feat(voip): add apps-engine media call widget action buttons service
OtavioStasiak Oct 7, 2026
e22137f
feat(voip): open media call app actions
OtavioStasiak Oct 7, 2026
98d7fe4
Merge branch 'develop' into feat.create-videoconf-pexip
OtavioStasiak Oct 7, 2026
74e46f4
feat(pexip): dock call in split view above room chat
OtavioStasiak Oct 7, 2026
d403c08
fix: tests
OtavioStasiak Oct 7, 2026
144635b
remove unuised button
OtavioStasiak Oct 7, 2026
4909613
feat: voip split screen
OtavioStasiak Oct 8, 2026
ce5ac91
fix: translation
OtavioStasiak Oct 8, 2026
656873b
fix: address review findings on video conference flow
OtavioStasiak Oct 8, 2026
b4bd0f3
fix: route core.pexip calls to VideoConfWebView and sync video confer…
OtavioStasiak Oct 8, 2026
3e07fe1
fix: show not-answered state for solo group calls and guard discussio…
OtavioStasiak Oct 8, 2026
081ad2e
fix: show not-answered state for solo group calls and guard discussio…
OtavioStasiak Oct 8, 2026
feec315
Merge branch 'develop' into feat.open-conferences-chat
OtavioStasiak Oct 8, 2026
122f3ec
action: organized translations
OtavioStasiak Oct 8, 2026
c816fb1
feat: start voice escalation
OtavioStasiak Oct 8, 2026
ae1dca1
feat: bring Pexip call overlay, loopback proxy and web-style header b…
OtavioStasiak Oct 8, 2026
b0ac3dc
action: organized translations
OtavioStasiak Oct 8, 2026
bfa95a0
feat: let the other participant join an escalated voice call
OtavioStasiak Oct 8, 2026
ae1d9b0
fix: address video conference review feedback
OtavioStasiak Oct 14, 2026
f2aaadb
fix: harden video conference review follow-ups
OtavioStasiak Oct 14, 2026
14696a8
Merge branch 'develop' into feat.open-conferences-chat
OtavioStasiak Oct 14, 2026
c671cd5
fix: tests
OtavioStasiak Oct 14, 2026
68fdaff
Merge branch 'develop' into feat.open-conferences-chat
OtavioStasiak Oct 14, 2026
57e2ff5
comment to test on mobile
OtavioStasiak Oct 14, 2026
c7589b3
Merge branch 'develop' into feat.voice-scalation
OtavioStasiak Oct 14, 2026
18f5352
fix: test
OtavioStasiak Oct 14, 2026
6e35c3d
fix: test
OtavioStasiak Oct 14, 2026
694d951
improve experience of voice escalation on mobile
OtavioStasiak Oct 15, 2026
a208477
Merge branch 'develop' into feat.app-on-profile
OtavioStasiak Oct 20, 2026
1bdf6e8
fix(apps): share sidebar app actions across platforms
OtavioStasiak Oct 20, 2026
5dc2b4c
fix(apps): drop extra keyboard gap in ModalBlockView
OtavioStasiak Oct 20, 2026
f431ea8
test(apps): cover sidebar app actions through the shared hook
OtavioStasiak Oct 20, 2026
e2de0ed
fix(apps): close settings modal before sidebar app action on tablets
OtavioStasiak Oct 20, 2026
fa2c26f
Merge branch 'develop' into feat.voice-scalation
OtavioStasiak Oct 22, 2026
e8ec2e4
Merge branch 'develop' into feat.apps-engine-voip
OtavioStasiak Oct 22, 2026
b930942
Merge branch 'develop' into feat.create-videoconf-pexip
OtavioStasiak Oct 22, 2026
9d9ce74
Merge branch 'develop' into feat.create-videoconf-pexip
OtavioStasiak Oct 22, 2026
9b77099
fix: android keyboard
OtavioStasiak Oct 22, 2026
6d23212
fix(pexip): review fixes and cleanups
OtavioStasiak Oct 22, 2026
f4e5479
fix(pexip): relisten on the same port after the proxy socket is recla…
OtavioStasiak Oct 22, 2026
fd1a0d4
fix(pexip): don't report a proxy start cancelled by stop
OtavioStasiak Oct 22, 2026
78465da
fix(pexip): rewrite redirects with an explicit :443 or protocol-relat…
OtavioStasiak Oct 22, 2026
24dd1e1
fix(pexip): block VoIP calls during a Pexip call and end it when a Vo…
OtavioStasiak Oct 22, 2026
f080016
fix(pexip): disable video call in room actions and info while in anot…
OtavioStasiak Oct 22, 2026
0231b00
fix(pexip): keep join enabled on the block of the active call
OtavioStasiak Oct 22, 2026
792ba3f
fix(pexip): end the Pexip call when a call is accepted from a push
OtavioStasiak Oct 22, 2026
04f5575
fix(pexip): always dock the call from chat and back
OtavioStasiak Oct 22, 2026
5be38eb
fix(pexip): stop hiding toasts from VoiceOver during a full-screen call
OtavioStasiak Oct 22, 2026
6518b58
fix(pexip): handle keep-awake activation failure
OtavioStasiak Oct 22, 2026
a4ee381
Merge branch 'develop' into feat.open-conferences-chat
OtavioStasiak Oct 23, 2026
367a7f7
fix: address video conference review follow-ups
OtavioStasiak Oct 23, 2026
e153322
feat: take over a media call from another session
OtavioStasiak Oct 26, 2026
64ddb22
Merge branch 'develop' into feat.media-call-takeover
OtavioStasiak Nov 3, 2026
633e06f
improve experience
OtavioStasiak Nov 3, 2026
b5da401
Merge branch 'develop' into feat.media-call-takeover
OtavioStasiak Nov 4, 2026
24d8b10
fix: show continue call here only in the DM with the call peer
OtavioStasiak Nov 5, 2026
09ecd94
fix: show continue call here for SIP-extension calls and in the sidebar
OtavioStasiak Nov 5, 2026
a3f27d4
Merge branch 'develop' into feat.media-call-takeover
OtavioStasiak Nov 5, 2026
6fe5e58
test: ci
OtavioStasiak Nov 9, 2026
e9df365
new_matchfile
OtavioStasiak Nov 9, 2026
1ef9baa
Merge branch 'test.ci-iOS' into feat.media-call-takeover
OtavioStasiak Nov 9, 2026
f02fafa
fix: show neutral call label on rooms list
OtavioStasiak Nov 9, 2026
fc7bf73
fix: keep VoIP incoming call heads-up visible on Android
OtavioStasiak Nov 9, 2026
931c1d3
fix: keep new call search results above the keyboard on Android
OtavioStasiak Nov 9, 2026
cffff59
fix: show correct hold state in VoIP call header
OtavioStasiak Nov 9, 2026
c92f076
Merge branch 'test.ci-iOS' into fix.dmv-bugs
OtavioStasiak Nov 9, 2026
dfdec6f
fix: CI android build
OtavioStasiak Nov 9, 2026
62be15d
Merge branch 'test.ci-iOS' into fix.dmv-bugs
OtavioStasiak Nov 9, 2026
10f6d41
fix(voip): gate video escalation on the conference-escalation call fe…
OtavioStasiak Nov 9, 2026
5d5a52e
Merge remote-tracking branch 'origin/feat.open-conferences-chat' into…
OtavioStasiak Nov 9, 2026
9b72ff6
Merge remote-tracking branch 'origin/feat.app-on-profile' into feat.d…
OtavioStasiak Nov 9, 2026
451b6b3
Merge remote-tracking branch 'origin/feat.create-videoconf-pexip' int…
OtavioStasiak Nov 9, 2026
bdf976e
Merge remote-tracking branch 'origin/feat.apps-engine-voip' into feat…
OtavioStasiak Nov 9, 2026
e9c6d52
Merge remote-tracking branch 'origin/feat.voice-scalation' into feat.…
OtavioStasiak Nov 9, 2026
a98170f
fix: trigger media call app actions through withTriggerId
OtavioStasiak Nov 9, 2026
576dd6e
Merge remote-tracking branch 'origin/feat.media-call-takeover' into f…
OtavioStasiak Nov 9, 2026
474941b
Merge remote-tracking branch 'origin/fix.dmv-bugs' into feat.dmv-branch
OtavioStasiak Nov 9, 2026
916fd83
test: expect Pexip joins to open the in-app call overlay
OtavioStasiak Nov 9, 2026
75d867c
chore: format merged VoIP tests
OtavioStasiak Nov 9, 2026
e6012b9
chore: sync media-signaling with server feat/dmv
OtavioStasiak Nov 10, 2026
c5906a0
feat: derive call controls from server call features
OtavioStasiak Nov 10, 2026
ece3862
debug: voip accept issue
OtavioStasiak Nov 10, 2026
44445ae
Merge remote-tracking branch 'origin/develop' into feat.app-on-profile
OtavioStasiak Nov 11, 2026
391e560
fix(apps): match custom roles referenced by name in action button fil…
OtavioStasiak Nov 11, 2026
9bbc43c
Merge remote-tracking branch 'origin/feat.app-on-profile' into feat.d…
OtavioStasiak Nov 11, 2026
29e3df9
feat: render UIKit radio_button elements in modals
OtavioStasiak Nov 11, 2026
380d344
Merge remote-tracking branch 'origin/feat.add-missing-uikit-elements'…
OtavioStasiak Nov 11, 2026
ed84114
enable escalation
OtavioStasiak Nov 11, 2026
1656c20
Merge branch 'feat.voice-scalation' into feat.dmv-branch
OtavioStasiak Nov 11, 2026
316d882
feat(voip): alert when desk phone control is enabled
OtavioStasiak Nov 11, 2026
c167e35
fix(voip): declare conference-escalation and dialpad when accepting n…
OtavioStasiak Nov 11, 2026
7f0d6f1
feat(voip): join the conference as soon as the other side escalates t…
OtavioStasiak Nov 11, 2026
5352f2e
revert: remove the VoIP debug logs and logs screen
OtavioStasiak Nov 12, 2026
c148515
fix(voip): make video escalation end the call and start a regular vid…
OtavioStasiak Nov 13, 2026
e8a0fd2
Merge branch 'feat.voice-scalation' into feat.dmv-branch
OtavioStasiak Nov 13, 2026
85c219d
feat: join an ongoing video conference from the room header
OtavioStasiak Nov 17, 2026
0f1407e
chore: reduce useRoomActions complexity
OtavioStasiak Nov 17, 2026
b7ef54b
test: mock useVideoConf in VoIP lifecycle integration test
OtavioStasiak Nov 17, 2026
29f828e
feat: show custom categories when grouping by type is off
OtavioStasiak Nov 17, 2026
12cfe49
feat: support the web sidebar grouping preferences for teams and chan…
OtavioStasiak Nov 17, 2026
cc26b15
Merge remote-tracking branch 'origin/feat.custom-categories-without-t…
OtavioStasiak Nov 17, 2026
63ac085
Merge remote-tracking branch 'origin/develop' into feat.dmv-branch
OtavioStasiak Nov 18, 2026
19b22d0
feat(voip): join the conference when web escalates the voice call
OtavioStasiak Nov 24, 2026
2e253dd
Merge branch 'feat.voice-scalation' into feat.dmv-branch
OtavioStasiak Nov 24, 2026
f690414
Merge branch 'develop' into feat.dmv-branch
OtavioStasiak Nov 24, 2026
5056a16
Merge branch 'develop' into feat.dmv-branch
OtavioStasiak Nov 25, 2026
1e53634
feat(voip): add encrypted tag to the call view
OtavioStasiak Nov 27, 2026
c35abe8
fix(voip): keep the caller name clear of the taller call panel and la…
OtavioStasiak Nov 27, 2026
6e2b691
fix(voip): lift the caller info by the full height the encrypted tag …
OtavioStasiak Nov 27, 2026
bad3938
fix(voip): keep the area under the caller info tappable
OtavioStasiak Nov 27, 2026
88d1f6f
Merge branch 'feat.voip-encrypted-tag' into feat.dmv-branch
OtavioStasiak Nov 27, 2026
bb788d0
fix(android): keep the ringing VoIP call notification when the app co…
OtavioStasiak Dec 1, 2026
8568a26
Merge branch 'fix.voip-notification-cleared-on-foreground' into feat.…
OtavioStasiak Dec 1, 2026
a77680f
fix(android): show the incoming call screen when the app resumes whil…
OtavioStasiak Dec 1, 2026
b348ade
Merge branch 'fix.voip-notification-cleared-on-foreground' into feat.…
OtavioStasiak Dec 1, 2026
cf99010
test(push-troubleshoot): spec full-screen incoming calls item
OtavioStasiak Dec 3, 2026
442781b
test(push-troubleshoot): mock isAndroid without spreading the real de…
OtavioStasiak Dec 3, 2026
a79ceac
feat(voip): expose full-screen intent access to JS on Android
OtavioStasiak Dec 3, 2026
bbcc48e
feat(push-troubleshoot): show full-screen incoming calls access on An…
OtavioStasiak Dec 3, 2026
833dd43
test(fsi): attack tests for full-screen incoming calls
OtavioStasiak Dec 3, 2026
9989339
test(push-troubleshoot): format attack tests and make the no-op foreg…
OtavioStasiak Dec 3, 2026
702977c
refactor(voip): share the full-screen intent check with the call noti…
OtavioStasiak Dec 4, 2026
eece772
refactor(push-troubleshoot): move full-screen access into a hook and …
OtavioStasiak Dec 4, 2026
4984632
Merge branch 'feat.android-full-screen-intent-access' into feat.dmv-b…
OtavioStasiak Dec 4, 2026
d30295f
test: copy the readonly default group order in the ungrouped list test
OtavioStasiak Dec 4, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/build-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ jobs:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
FASTLANE_REPO_PAT: ${{ secrets.FASTLANE_REPO_PAT }}
FASTLANE_REPO_PAT: ${{ secrets.TEST_FASTLANE_NEW_PAT }}
BUGSNAG_KEY_OFFICIAL: ${{ secrets.BUGSNAG_KEY_OFFICIAL }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
GOOGLE_SERVICES_IOS: ${{ secrets.GOOGLE_SERVICES_IOS }}
Expand Down Expand Up @@ -207,6 +207,6 @@ jobs:
MATCH_PASSWORD: ${{ secrets.MATCH_PASSWORD }}
APP_STORE_CONNECT_API_KEY_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ID }}
APP_STORE_CONNECT_API_KEY_ISSUER_ID: ${{ secrets.APP_STORE_CONNECT_API_KEY_ISSUER_ID }}
FASTLANE_REPO_PAT: ${{ secrets.FASTLANE_REPO_PAT }}
FASTLANE_REPO_PAT: ${{ secrets.TEST_FASTLANE_NEW_PAT }}
APP_STORE_CONNECT_API_KEY_BASE64: ${{ secrets.APP_STORE_CONNECT_API_KEY_BASE64 }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import com.zoontek.rnbootsplash.RNBootSplash
import android.content.Intent
import android.content.res.Configuration
import chat.rocket.reactnative.notification.NotificationIntentHandler
import chat.rocket.reactnative.voip.VoipNotification

class MainActivity : ReactActivity() {

Expand Down Expand Up @@ -42,6 +43,11 @@ class MainActivity : ReactActivity() {
NotificationIntentHandler.handleIntent(this, intent)
}

override fun onResume() {
super.onResume()
VoipNotification.showRingingCallScreen(this)
}

override fun invokeDefaultOnBackPressed() {
moveTaskToBack(true)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,8 @@ abstract class NativePushNotificationSpec(reactContext: ReactApplicationContext)

@ReactMethod
abstract fun clearPendingNotification()

@ReactMethod
abstract fun dismissNotificationsExceptIncomingCalls(promise: Promise)
}

Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package chat.rocket.reactnative.notification

import android.app.NotificationManager
import android.content.Context
import androidx.core.app.NotificationCompat
import chat.rocket.reactnative.voip.VoipNotification
import com.facebook.react.bridge.Promise
import com.facebook.react.bridge.ReactApplicationContext
import com.facebook.react.bridge.ReactMethod
Expand Down Expand Up @@ -74,5 +77,21 @@ class PushNotificationModule(reactContext: ReactApplicationContext) : NativePush
// Ignore errors
}
}
}

/**
* Cancels every notification this app posted except the ringing VoIP call, which must stay
* until the call is answered, declined or times out.
*/
@ReactMethod
override fun dismissNotificationsExceptIncomingCalls(promise: Promise) {
try {
val manager = reactApplicationContext.getSystemService(Context.NOTIFICATION_SERVICE) as NotificationManager
manager.activeNotifications
.filter { NotificationCompat.getChannelId(it.notification) != VoipNotification.CHANNEL_ID }
.forEach { manager.cancel(it.tag, it.id) }
promise.resolve(null)
} catch (e: Exception) {
promise.reject("ERROR", e.message, e)
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
package chat.rocket.reactnative.voip

import android.app.NotificationManager
import android.content.Context
import android.os.Build

fun Context.canUseFullScreenIntent(): Boolean {
if (Build.VERSION.SDK_INT < Build.VERSION_CODES.UPSIDE_DOWN_CAKE) return true
return getSystemService(NotificationManager::class.java)?.canUseFullScreenIntent() ?: false
}
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
package chat.rocket.reactnative.voip

import android.content.ActivityNotFoundException
import android.content.Context
import android.content.Intent
import android.media.AudioAttributes
import android.media.AudioDeviceInfo
import android.media.AudioManager
import android.media.MediaPlayer
import android.net.Uri
import android.os.Build
import android.os.Handler
import android.os.Looper
import android.provider.Settings
import android.util.Log
import chat.rocket.reactnative.BuildConfig
import chat.rocket.reactnative.R
Expand Down Expand Up @@ -431,6 +435,27 @@ class VoipModule(reactContext: ReactApplicationContext) : NativeVoipSpec(reactCo
}
}

override fun canUseFullScreenIntent(): Boolean = reactApplicationContext.canUseFullScreenIntent()

override fun openFullScreenIntentSettings() {
try {
val uri = Uri.parse("package:${reactApplicationContext.packageName}")
fun open(action: String) =
reactApplicationContext.startActivity(Intent(action, uri).addFlags(Intent.FLAG_ACTIVITY_NEW_TASK))
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
try {
open(Settings.ACTION_MANAGE_APP_USE_FULL_SCREEN_INTENT)
} catch (e: ActivityNotFoundException) {
open(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
}
} else {
open(Settings.ACTION_APPLICATION_DETAILS_SETTINGS)
}
} catch (e: Exception) {
Log.e(TAG, "openFullScreenIntentSettings failed", e)
}
}

/**
* Required for NativeEventEmitter in TurboModules.
* Called when JS starts listening to events.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -97,6 +97,29 @@ class VoipNotification(private val context: Context) {
Log.d(TAG, "VoIP notification cancelled with ID: $notificationId")
}

/**
* Brings back [IncomingCallActivity] when the app returns to the foreground (e.g. the user
* unlocked the device) while the incoming call notification is still ringing.
*/
@JvmStatic
fun showRingingCallScreen(activity: Activity) {
val manager = activity.getSystemService(Context.NOTIFICATION_SERVICE) as? NotificationManager ?: return
val payload = manager.activeNotifications
.filter { NotificationCompat.getChannelId(it.notification) == CHANNEL_ID }
.firstNotNullOfOrNull { VoipPayload.fromBundle(it.notification.extras) }
?: return
val remainingLifetimeMs = payload.getRemainingLifetimeMs()
if (!payload.isVoipIncomingCall() || remainingLifetimeMs == null || remainingLifetimeMs <= 0L) {
return
}
activity.startActivity(
Intent(activity, IncomingCallActivity::class.java).apply {
flags = Intent.FLAG_ACTIVITY_NEW_TASK
putExtras(payload.toBundle())
}
)
}

@JvmStatic
fun scheduleTimeout(context: Context, payload: VoipPayload) {
val delayMs = payload.getRemainingLifetimeMs()
Expand Down Expand Up @@ -320,7 +343,7 @@ class VoipNotification(private val context: Context) {
callId = payload.callId,
contractId = deviceId(context),
answer = "accept",
supportedFeatures = listOf("audio", "hold")
supportedFeatures = listOf("audio", "hold", "dialpad", "conference-escalation")
) { success ->
// Late-success guard: if the handler deadline already fired (finished == true)
// and the server accepted the call, we must send a reject so server state
Expand Down Expand Up @@ -867,12 +890,7 @@ class VoipNotification(private val context: Context) {
Log.d(TAG, "Showing incoming call notification for VoIP call from: $caller")
}

// Check if we can use full-screen intent (Android 14+)
val canUseFullScreen = if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.UPSIDE_DOWN_CAKE) {
notificationManager?.canUseFullScreenIntent() ?: false
} else {
true // Always available on Android 13 and below
}
val canUseFullScreen = context.canUseFullScreenIntent()

// Create full-screen intent to IncomingCallActivity
val fullScreenIntent = Intent(context, IncomingCallActivity::class.java).apply {
Expand Down Expand Up @@ -947,22 +965,20 @@ class VoipNotification(private val context: Context) {
setOngoing(true)
setOnlyAlertOnce(true)
setTimeoutAfter(remainingLifetimeMs)
addExtras(voipPayload.toBundle())
addAction(0, context.getString(R.string.incoming_call_reject), declinePendingIntent)
addAction(0, context.getString(R.string.incoming_call_accept), acceptPendingIntent)

if (avatarBitmap != null) {
setLargeIcon(avatarBitmap)
}

// Set full-screen intent only if permission is granted
if (canUseFullScreen) {
setFullScreenIntent(fullScreenPendingIntent, true)
if (BuildConfig.DEBUG) {
Log.d(TAG, "Full-screen intent enabled - locked device will show Activity, unlocked will show HUN")
}
} else {
Log.w(TAG, "Full-screen intent permission not granted - showing HUN only (fallback)")
// Still set content intent so tapping notification opens the activity
// Always request it: when the permission is denied (Android 14+), the system flags the
// notification FSI_REQUESTED_BUT_DENIED and keeps the heads-up on screen instead of
// collapsing it after a few seconds.
setFullScreenIntent(fullScreenPendingIntent, true)
if (!canUseFullScreen) {
Log.w(TAG, "Full-screen intent permission not granted - showing sticky HUN only (fallback)")
setContentIntent(fullScreenPendingIntent)
}
}
Expand Down
53 changes: 38 additions & 15 deletions app/AppContainer.tsx
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import { useContext, useEffect } from 'react';
import { createStaticNavigation } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { StyleSheet, View } from 'react-native';
import { useSelector } from 'react-redux';

import { type IApplicationState } from './definitions/redux';
Expand All @@ -19,6 +20,15 @@ import { setCurrentScreen } from './lib/methods/helpers/log';
import { themes } from './lib/constants/colors';
import { emitter } from './lib/methods/helpers/emitter';
import MediaCallHeader from './containers/MediaCallHeader/MediaCallHeader';
import PexipCall from './containers/PexipCall';
import PexipCallSplitSpacer from './containers/PexipCall/PexipCallSplitSpacer';
import { usePexipSplitLayout } from './containers/PexipCall/usePexipSplitLayout';
import { useIsPexipCallFull, useIsPexipCallSplit } from './lib/services/videoConf/usePexipCallStore';

const styles = StyleSheet.create({
content: { flex: 1 },
row: { flexDirection: 'row' }
});

const useIsLoading = () =>
useSelector(
Expand Down Expand Up @@ -68,6 +78,10 @@ const { navigationRef } = Navigation;
const AppContainer = () => {
const { theme } = useContext(ThemeContext);
const root = useSelector((state: IApplicationState) => state.app.root);
const isPexipSplit = useIsPexipCallSplit();
const { isLandscape } = usePexipSplitLayout();
const isPexipSplitLandscape = isPexipSplit && isLandscape;
const isPexipFull = useIsPexipCallFull();

useEffect(() => {
if (root) {
Expand All @@ -85,21 +99,30 @@ const AppContainer = () => {
return (
<>
<MediaCallHeader />
<AppNavigation
theme={navigationTheme(theme)}
ref={navigationRef}
onReady={() => {
emitter.emit('navigationReady');
}}
onStateChange={state => {
const previousRouteName = Navigation.routeNameRef.current;
const currentRouteName = getActiveRouteName(state);
if (previousRouteName !== currentRouteName) {
setCurrentScreen(currentRouteName);
}
Navigation.routeNameRef.current = currentRouteName;
}}
/>
<View
style={[styles.content, isPexipSplitLandscape && styles.row]}
accessibilityElementsHidden={isPexipFull}
importantForAccessibility={isPexipFull ? 'no-hide-descendants' : 'auto'}>
<PexipCallSplitSpacer />
<View style={styles.content}>
<AppNavigation
theme={navigationTheme(theme)}
ref={navigationRef}
onReady={() => {
emitter.emit('navigationReady');
}}
onStateChange={state => {
const previousRouteName = Navigation.routeNameRef.current;
const currentRouteName = getActiveRouteName(state);
if (previousRouteName !== currentRouteName) {
setCurrentScreen(currentRouteName);
}
Navigation.routeNameRef.current = currentRouteName;
}}
/>
</View>
</View>
<PexipCall />
</>
);
};
Expand Down
24 changes: 20 additions & 4 deletions app/containers/ActionSheet/ActionSheet.tsx
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { useBackHandler } from '@react-native-community/hooks';
import { useBackHandler, useKeyboard } from '@react-native-community/hooks';
import * as Haptics from 'expo-haptics';
import {
type ComponentRef,
Expand Down Expand Up @@ -28,196 +28,212 @@
import { Handle } from './Handle';
import { type TActionSheetOptions } from './Provider';
import BottomSheetContent from './BottomSheetContent';
import { HANDLE_HEIGHT, getSheetContentPaddingBottom, useActionSheetDetents } from './useActionSheetDetents';
import {
HANDLE_HEIGHT,
getKeyboardAwareHeights,
getSheetContentPaddingBottom,
useActionSheetDetents
} from './useActionSheetDetents';
import { useActionSheetItemHeight } from './useActionSheetItemHeight';
import styles from './styles';

export const ACTION_SHEET_ANIMATION_DURATION = 250;

const ActionSheet = memo(
forwardRef(({ children }: { children: ReactElement }, ref) => {
const { colors } = useTheme();
const { height: windowHeight, width: windowWidth } = useWindowDimensions();
const sheetRef = useRef<TrueSheet>(null);
const handleRef = useRef<ComponentRef<typeof View>>(null);
const [data, setData] = useState<TActionSheetOptions>({} as TActionSheetOptions);
const [isVisible, setIsVisible] = useState(false);
const [contentHeight, setContentHeight] = useState(0);
const { bottom } = useSafeAreaInsets();
const { bottom, top } = useSafeAreaInsets();
const { keyboardShown, keyboardHeight } = useKeyboard();
const onCloseSnapshotRef = useRef<TActionSheetOptions['onClose']>(undefined);
const dismissedOnCloseRef = useRef<TActionSheetOptions['onClose']>(undefined);

const itemHeight = useActionSheetItemHeight();

const phaseRef = useRef<'idle' | 'presenting' | 'presented' | 'dismissing'>('idle');
const desiredOptionsRef = useRef<TActionSheetOptions | null>(null);
const pendingPresentTimeoutRef = useRef<ReturnType<typeof setTimeout> | undefined>(undefined);

useEffect(() => () => clearTimeout(pendingPresentTimeoutRef.current), []);

const dismissSheet = () => sheetRef.current?.dismiss().catch(() => {});

const hide = () => {
desiredOptionsRef.current = null;
clearTimeout(pendingPresentTimeoutRef.current);
const phase = phaseRef.current;
if (phase === 'idle' || phase === 'dismissing') return;
phaseRef.current = 'dismissing';
dismissSheet();
Keyboard.dismiss();
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
};

useEffect(() => {
if (isVisible) return;
const dismissedOnClose = dismissedOnCloseRef.current;
dismissedOnCloseRef.current = undefined;
dismissedOnClose?.();
}, [isVisible]);

// Keep contentHeight to avoid flickering on next show
const onDidDismiss = () => {
phaseRef.current = 'idle';
dismissedOnCloseRef.current = onCloseSnapshotRef.current;
onCloseSnapshotRef.current = undefined;
setIsVisible(false);
if (desiredOptionsRef.current && phaseRef.current === 'idle') {
pendingPresentTimeoutRef.current = setTimeout(presentDesiredSheet);
}
};

const presentDesiredSheet = () => {
const options = desiredOptionsRef.current;
if (!options || phaseRef.current === 'dismissing') return;
desiredOptionsRef.current = null;
setData(options);
onCloseSnapshotRef.current = options.onClose;
if (phaseRef.current !== 'idle') return;
phaseRef.current = 'presenting';
setIsVisible(true);
Keyboard.dismiss();
Haptics.impactAsync(Haptics.ImpactFeedbackStyle.Light);
sheetRef.current?.present().catch(onDidDismiss);
};

const show = (options: TActionSheetOptions) => {
clearTimeout(pendingPresentTimeoutRef.current);
desiredOptionsRef.current = options;
presentDesiredSheet();
};

useBackHandler(() => {
if (isVisible) {
hide();
}
return isVisible;
});

useImperativeHandle(ref, () => ({
showActionSheet: show,
hideActionSheet: hide
}));

const focusHandle = () => {
const node = findNodeHandle(handleRef.current);
if (node) AccessibilityInfo.setAccessibilityFocus(node);
};

const onDidPresent = () => {
if (phaseRef.current !== 'presenting') {
dismissSheet();
return;
}
phaseRef.current = 'presented';
// On Android the bottom sheet is hosted in a separate window; TalkBack
// needs a moment after the present animation before it can target nodes
// inside it, so defer the focus call slightly.
if (isAndroid) {
setTimeout(focusHandle, 300);
return;
}
focusHandle();
};

const renderHeader = () => (
<GestureHandlerRootView style={{ flex: 0 }}>
<Handle ref={handleRef} onPress={hide} />
{isValidElement(data?.customHeader) ? data.customHeader : null}
</GestureHandlerRootView>
);

const isPortrait = windowHeight > windowWidth;
const effectiveSnaps = (isPortrait ? data?.portraitSnaps : data?.landscapeSnaps) || data?.snaps;

const { detents, maxHeight, scrollEnabled } = useActionSheetDetents({
windowHeight,
itemHeight,
optionsLength: data?.options?.length || 0,
snaps: effectiveSnaps,
headerHeight: data?.headerHeight,
hasCancel: data?.hasCancel,
contentHeight
});

const { sheetMaxHeight, contentMaxHeight } = getKeyboardAwareHeights({
maxHeight,
windowHeight,
topInset: top,
keyboardHeight,
keyboardShown,
hugContent: data.hugContent
});

const hasOptions = !!data?.options?.length;
const hasSnaps = !!effectiveSnaps?.length;
const disableContentPanning = data?.enableContentPanningGesture === false;
const isScrollable = hasOptions || (hasSnaps && !disableContentPanning);
const contentScrollEnabled = hasOptions ? scrollEnabled : isScrollable;

const handleContentLayout = ({ nativeEvent: { layout } }: LayoutChangeEvent) => {
const padding = getSheetContentPaddingBottom({
bottom,
fullContainer: data.fullContainer,
hugContent: data.hugContent,
scrollEnabled: contentScrollEnabled
});
setContentHeight(Math.max(0, layout.height - padding));
};

const contentMinHeight =
data.fullContainer && effectiveSnaps?.length
? (() => {
const snap = effectiveSnaps[0];
const fraction = typeof snap === 'number' ? Math.min(1, Math.max(0.1, snap)) : (parseFloat(String(snap)) || 50) / 100;
return Math.max(0, windowHeight * fraction - HANDLE_HEIGHT);
})()
: undefined;

return (
<>
{children}
<TrueSheet
ref={sheetRef}
detents={detents}
maxHeight={maxHeight}
maxHeight={sheetMaxHeight}
backgroundColor={colors.surfaceLight}
cornerRadius={16}
dimmed
grabber={false}
draggable={!disableContentPanning}
header={renderHeader()}
scrollable={isScrollable}
style={styles.container}
onDidPresent={onDidPresent}
onDidDismiss={onDidDismiss}>
<GestureHandlerRootView style={styles.contentContainer}>
<BottomSheetContent
options={data?.options}
hide={hide}
hasCancel={data?.hasCancel}
onLayout={handleContentLayout}
fullContainer={data.fullContainer}
hugContent={data.hugContent}
contentMaxHeight={contentMaxHeight}
contentMinHeight={isIOS ? contentMinHeight : undefined}
scrollEnabled={contentScrollEnabled}>
{data?.children}
</BottomSheetContent>
</GestureHandlerRootView>
</TrueSheet>
</>
);
})

Check warning on line 236 in app/containers/ActionSheet/ActionSheet.tsx

View workflow job for this annotation

GitHub Actions / format

eslint(complexity)

function has a complexity of 25. Maximum allowed is 20.

Check warning on line 236 in app/containers/ActionSheet/ActionSheet.tsx

View workflow job for this annotation

GitHub Actions / ESLint and Test / run-eslint-and-test

eslint(complexity)

function has a complexity of 25. Maximum allowed is 20.
);

export default ActionSheet;
8 changes: 7 additions & 1 deletion app/containers/ActionSheet/BottomSheetContent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ interface IBottomSheetContentProps {
onLayout: ViewProps['onLayout'];
fullContainer?: boolean;
hugContent?: boolean;
contentMaxHeight?: number;
contentMinHeight?: number;
scrollEnabled?: boolean;
}
Expand All @@ -34,6 +35,7 @@ const BottomSheetContent = memo(
onLayout,
fullContainer,
hugContent,
contentMaxHeight,
contentMinHeight,
scrollEnabled
}: IBottomSheetContentProps) => {
Expand Down Expand Up @@ -80,7 +82,11 @@ const BottomSheetContent = memo(
return (
<View
testID='action-sheet'
style={[fullContainer && !hugContent ? styles.fullContainer : undefined, minHeightStyle, { paddingBottom }]}
style={[
fullContainer && !hugContent ? styles.fullContainer : undefined,
minHeightStyle,
{ paddingBottom, maxHeight: contentMaxHeight }
]}
onLayout={onLayout}>
{children}
</View>
Expand Down
Loading
Loading