Skip to content

Commit 30ad554

Browse files
authored
feat(ui): exposed additional callkit options (#1138)
* exposed additional callkit options * removed display name as handle * tweak * changelog
1 parent 0854661 commit 30ad554

File tree

9 files changed

+54
-3
lines changed

9 files changed

+54
-3
lines changed

packages/stream_video/test/src/call/call_test.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ void main() {
155155
);
156156

157157
internetStatusController.add(InternetStatus.disconnected);
158-
await Future<void>.delayed(Duration(microseconds: 100));
158+
await Future<void>.delayed(Duration.zero);
159159
internetStatusController.add(InternetStatus.connected);
160160
await Future<void>.delayed(Duration.zero);
161161

packages/stream_video_flutter/CHANGELOG.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,15 @@
11
## Upcoming
22

3+
### ✅ Added
4+
* Added `includesCallsInRecents` to iOS push configuration to control whether CallKit calls appear in Recents.
5+
36
### 🐞 Fixed
7+
* Improved reconnection reliability:
8+
* Added exponential backoff with jitter to fast reconnect attempts.
9+
* Fixed fast reconnect deadline check to correctly trigger fallback to rejoin.
10+
* Fixed network availability verification during subsequent fast reconnect attempts.
11+
* Added `reconnectReason` to reconnect details for sfu logs.
12+
* Fixed race condition where automatic ICE restart could interfere with fast reconnect, causing subscriber video to not recover.
413
* [iOS] Fixed CallKit event suppression to avoid repeated mute toggle loops.
514

615
## 1.2.2

packages/stream_video_push_notification/CHANGELOG.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
## Upcoming
22

3-
🐞 Fixed
3+
### ✅ Added
4+
* Added `includesCallsInRecents` to iOS push configuration to control whether CallKit calls appear in Recents.
5+
6+
### 🐞 Fixed
47
* [iOS] Fixed CallKit event suppression to avoid repeated mute toggle loops.
58

69
## 1.2.2

packages/stream_video_push_notification/ios/stream_video_push_notification/Sources/stream_video_push_notification/StreamVideoPKDelegateManager.swift

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ public class StreamVideoPKDelegateManager: NSObject, PKPushRegistryDelegate,
8888
data.callerName =
8989
nonEmptyString(callDisplayName) ?? nonEmptyString(createdByName) ?? defaultCallText
9090
data.handle = createdById ?? defaultCallText
91+
9192
data.type = videoData
9293
data.extra = ["callCid": callCid]
9394
data.iconName =

packages/stream_video_push_notification/ios/stream_video_push_notification/Sources/stream_video_push_notification/StreamVideoPushConfiguration.swift

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ import Foundation
2020
@objc public var supportsGrouping: Bool
2121
@objc public var supportsUngrouping: Bool
2222
@objc public var ringtonePath: String
23+
@objc public var includesCallsInRecents: Bool
2324

2425
@objc public init(headers: NSDictionary) {
2526
self.headers = headers
@@ -41,6 +42,7 @@ import Foundation
4142
self.supportsGrouping = true
4243
self.supportsUngrouping = true
4344
self.ringtonePath = ""
45+
self.includesCallsInRecents = true
4446
}
4547

4648
@objc public convenience init(args: NSDictionary) {
@@ -76,6 +78,7 @@ import Foundation
7678
self.supportsGrouping = ios["supportsGrouping"] as? Bool ?? true
7779
self.supportsUngrouping = ios["supportsUngrouping"] as? Bool ?? true
7880
self.ringtonePath = ios["ringtonePath"] as? String ?? ""
81+
self.includesCallsInRecents = ios["includesCallsInRecents"] as? Bool ?? true
7982
} else {
8083
// Fallback to top-level properties if ios object doesn't exist
8184
self.iconName = args["iconName"] as? String ?? "CallKitLogo"
@@ -96,6 +99,7 @@ import Foundation
9699
self.supportsGrouping = args["supportsGrouping"] as? Bool ?? true
97100
self.supportsUngrouping = args["supportsUngrouping"] as? Bool ?? true
98101
self.ringtonePath = args["ringtonePath"] as? String ?? ""
102+
self.includesCallsInRecents = args["includesCallsInRecents"] as? Bool ?? true
99103
}
100104
}
101105

@@ -117,6 +121,7 @@ import Foundation
117121
"supportsGrouping": supportsGrouping,
118122
"supportsUngrouping": supportsUngrouping,
119123
"ringtonePath": ringtonePath,
124+
"includesCallsInRecents": includesCallsInRecents,
120125
]
121126

122127
let result: [String: Any] = [

packages/stream_video_push_notification/lib/src/stream_video_push_configuration.dart

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ class IOSPushConfiguration {
150150
this.supportsGrouping,
151151
this.supportsUngrouping,
152152
this.ringtonePath,
153+
this.includesCallsInRecents,
153154
});
154155

155156
factory IOSPushConfiguration.fromJson(Map<String, dynamic> json) =>
@@ -158,9 +159,19 @@ class IOSPushConfiguration {
158159
/// App's Icon. using for display inside Callkit(iOS)
159160
final String? iconName;
160161

161-
/// Type handle call `generic`, `number`, `email`
162+
/// Type of handle CallKit should expect. The SDK sets the user ID as the
163+
/// handle value, so choose the type that matches your user ID format:
164+
/// - `generic`: arbitrary identifier (default).
165+
/// - `number`: phone-like digits, it's formatted as a number in CallKit.
166+
/// - `email`: an email address, it's displayed as an email in CallKit.
162167
final String? handleType;
168+
169+
/// When true, wraps callerName/handle/extra into an encrypted JSON blob
170+
/// before sending to CallKit. Use this to hide raw IDs,
171+
/// but note the visible handle (ex. in Recents) will look like encoded text. Leave
172+
/// false for a clean, user-friendly handle string.
163173
final bool? useComplexHandle;
174+
164175
final bool? supportsVideo;
165176
final int? maximumCallGroups;
166177
final int? maximumCallsPerCallGroup;
@@ -177,6 +188,10 @@ class IOSPushConfiguration {
177188
/// Add file to root project xcode /ios/Runner/Ringtone.caf and Copy Bundle Resources(Build Phases) -> value: "Ringtone.caf"
178189
final String? ringtonePath;
179190

191+
/// Whether calls handled by this provider should be included in the system's Recents list.
192+
/// Defaults to true. Set to false to prevent calls from appearing in Recents.
193+
final bool? includesCallsInRecents;
194+
180195
IOSPushConfiguration copyWith({
181196
String? iconName,
182197
String? handleType,
@@ -194,6 +209,7 @@ class IOSPushConfiguration {
194209
bool? supportsGrouping,
195210
bool? supportsUngrouping,
196211
String? ringtonePath,
212+
bool? includesCallsInRecents,
197213
}) {
198214
return IOSPushConfiguration(
199215
iconName: iconName ?? this.iconName,
@@ -218,6 +234,8 @@ class IOSPushConfiguration {
218234
supportsGrouping: supportsGrouping ?? this.supportsGrouping,
219235
supportsUngrouping: supportsUngrouping ?? this.supportsUngrouping,
220236
ringtonePath: ringtonePath ?? this.ringtonePath,
237+
includesCallsInRecents:
238+
includesCallsInRecents ?? this.includesCallsInRecents,
221239
);
222240
}
223241

@@ -242,6 +260,7 @@ class IOSPushConfiguration {
242260
supportsGrouping: other.supportsGrouping,
243261
supportsUngrouping: other.supportsUngrouping,
244262
ringtonePath: other.ringtonePath,
263+
includesCallsInRecents: other.includesCallsInRecents,
245264
);
246265
}
247266

packages/stream_video_push_notification/lib/src/stream_video_push_configuration.g.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/stream_video_push_notification/lib/src/stream_video_push_params.dart

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -237,6 +237,7 @@ class IOSParams {
237237
this.supportsGrouping,
238238
this.supportsUngrouping,
239239
this.ringtonePath,
240+
this.includesCallsInRecents,
240241
});
241242

242243
factory IOSParams.fromPushConfiguration(IOSPushConfiguration configuration) =>
@@ -259,6 +260,7 @@ class IOSParams {
259260
supportsGrouping: configuration.supportsGrouping,
260261
supportsUngrouping: configuration.supportsUngrouping,
261262
ringtonePath: configuration.ringtonePath,
263+
includesCallsInRecents: configuration.includesCallsInRecents,
262264
);
263265

264266
factory IOSParams.fromJson(Map<String, dynamic> json) =>
@@ -286,6 +288,10 @@ class IOSParams {
286288
/// Add file to root project xcode /ios/Runner/Ringtone.caf and Copy Bundle Resources(Build Phases) -> value: "Ringtone.caf"
287289
final String? ringtonePath;
288290

291+
/// Whether calls handled by this provider should be included in the system's Recents list.
292+
/// Defaults to true. Set to false to prevent calls from appearing in Recents.
293+
final bool? includesCallsInRecents;
294+
289295
IOSParams copyWith({
290296
String? iconName,
291297
String? handleType,
@@ -303,6 +309,7 @@ class IOSParams {
303309
bool? supportsGrouping,
304310
bool? supportsUngrouping,
305311
String? ringtonePath,
312+
bool? includesCallsInRecents,
306313
}) {
307314
return IOSParams(
308315
iconName: iconName ?? this.iconName,
@@ -327,6 +334,8 @@ class IOSParams {
327334
supportsGrouping: supportsGrouping ?? this.supportsGrouping,
328335
supportsUngrouping: supportsUngrouping ?? this.supportsUngrouping,
329336
ringtonePath: ringtonePath ?? this.ringtonePath,
337+
includesCallsInRecents:
338+
includesCallsInRecents ?? this.includesCallsInRecents,
330339
);
331340
}
332341

@@ -351,6 +360,7 @@ class IOSParams {
351360
supportsGrouping: other.supportsGrouping,
352361
supportsUngrouping: other.supportsUngrouping,
353362
ringtonePath: other.ringtonePath,
363+
includesCallsInRecents: other.includesCallsInRecents,
354364
);
355365
}
356366

packages/stream_video_push_notification/lib/src/stream_video_push_params.g.dart

Lines changed: 2 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)