Skip to content

Commit 76e5576

Browse files
authored
feat(llc): migrated callkit incoming into stream_video_push_notification (#1044)
* migrated callkit incoming into stream_video_push_notification * fixes * android fixes * renaming CallKit to IncomingCall for Android classes * android cleanup * android missed call notification fixes * fix * renaming CallKit to Ringing * changelog * changelog update * tweaks * more tweaks * more tweaks and fixes * more tweaks * fix getPushToken method * fix * pana fixes * pana action fix * pana fix * dart format * format dogfooding * coil version change * coil version fix * analyzer fixes * pana workflow * tweaks * test pana action
1 parent 398ee6d commit 76e5576

File tree

115 files changed

+7691
-861
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

115 files changed

+7691
-861
lines changed

.github/actions/pana/action.yml

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,21 @@
11
name: Pana Workflow
2+
description: "Runs pana and checks the score for the package"
23

34
inputs:
45
min_score:
6+
description: "The minimum pana score required"
57
required: false
6-
type: number
7-
default: 120
8+
default: "120"
89
pana_version:
10+
description: "The pana version to use"
911
required: false
10-
type: string
1112
runs_on:
13+
description: "The runner to use"
1214
required: false
13-
type: string
1415
default: "ubuntu-latest"
1516
working_directory:
17+
description: "The working directory"
1618
required: false
17-
type: string
1819
default: "."
1920

2021
runs:
@@ -24,9 +25,21 @@ runs:
2425
uses: mikefarah/yq@master
2526
with:
2627
cmd: |
28+
# --- stream_video_flutter ---
2729
yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_flutter/pubspec.yaml
30+
yq eval '.dependency_overrides.stream_video = {"path": "../stream_video"}' -i packages/stream_video_flutter/pubspec.yaml
31+
32+
# --- stream_video_push_notification ---
2833
yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_push_notification/pubspec.yaml
34+
yq eval '.dependencies.stream_video_flutter = {"path": "../stream_video_flutter"}' -i packages/stream_video_push_notification/pubspec.yaml
35+
yq eval '.dependency_overrides.stream_video = {"path": "../stream_video"}' -i packages/stream_video_push_notification/pubspec.yaml
36+
yq eval '.dependency_overrides.stream_video_flutter = {"path": "../stream_video_flutter"}' -i packages/stream_video_push_notification/pubspec.yaml
37+
38+
# --- stream_video_noise_cancellation ---
2939
yq eval '.dependencies.stream_video = {"path": "../stream_video"}' -i packages/stream_video_noise_cancellation/pubspec.yaml
40+
yq eval '.dependencies.stream_video_flutter = {"path": "../stream_video_flutter"}' -i packages/stream_video_noise_cancellation/pubspec.yaml
41+
yq eval '.dependency_overrides.stream_video = {"path": "../stream_video"}' -i packages/stream_video_noise_cancellation/pubspec.yaml
42+
yq eval '.dependency_overrides.stream_video_flutter = {"path": "../stream_video_flutter"}' -i packages/stream_video_noise_cancellation/pubspec.yaml
3043
3144
- name: Install Flutter
3245
uses: subosito/flutter-action@v2

dogfooding/android/app/proguard-rules.pro

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@
44
-keep class io.flutter.view.** { *; }
55
-keep class io.flutter.plugins.** { *; }
66

7-
-keep class com.hiennv.flutter_callkit_incoming.** { *; }
8-
97
-keep class java.beans.Transient.** {*;}
108
-keep class java.beans.ConstructorProperties.** {*;}
119
-keep class java.nio.file.Path.** {*;}

dogfooding/assets/logo.png

36.2 KB
Loading

dogfooding/lib/app/app_content.dart

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ class _StreamDogFoodingAppContentState
6363
if (!locator.isRegistered<StreamVideo>()) return;
6464

6565
// Observe call kit events.
66-
_observeCallKitEvents();
66+
_observeRingingEvents();
6767
// Observes deep links.
6868
_observeDeepLinks();
6969
// Observe FCM messages.
@@ -114,15 +114,15 @@ class _StreamDogFoodingAppContentState
114114
}
115115
}
116116

117-
void _observeCallKitEvents() {
117+
void _observeRingingEvents() {
118118
final streamVideo = locator.get<StreamVideo>();
119119

120120
// On mobile we depend on call kit notifications.
121121
// On desktop and web they are (currently) not available, so we depend on a
122122
// websocket which can receive a call when the app is open.
123123
if (CurrentPlatform.isMobile) {
124124
_compositeSubscription.add(
125-
streamVideo.observeCoreCallKitEvents(
125+
streamVideo.observeCoreRingingEvents(
126126
onCallAccepted: (callToJoin) {
127127
// Navigate to the call screen.
128128
final extra = (

dogfooding/lib/app/firebase_messaging_handler.dart

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ Future<void> firebaseMessagingBackgroundHandler(RemoteMessage message) async {
3737
prefs.environment,
3838
);
3939

40-
final subscription = streamVideo.observeCallDeclinedCallKitEvent();
40+
final subscription = streamVideo.observeCallDeclinedRingingEvent();
4141

4242
streamVideo.disposeAfterResolvingRinging(
4343
disposingCallback: () {

dogfooding/lib/di/injector.dart

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import '../core/repos/token_service.dart';
1616
import '../core/repos/user_auth_repository.dart';
1717
import '../core/repos/user_chat_repository.dart';
1818
import '../log_config.dart';
19-
import '../utils/consts.dart';
2019

2120
GetIt locator = GetIt.instance;
2221

@@ -167,9 +166,9 @@ StreamVideo _initStreamVideo(
167166
androidPushProvider: const StreamVideoPushProvider.firebase(
168167
name: 'flutter-firebase',
169168
),
170-
pushParams: const StreamVideoPushParams(
171-
appName: kAppName,
172-
ios: IOSParams(iconName: 'IconMask'),
169+
pushConfiguration: const StreamVideoPushConfiguration(
170+
ios: IOSPushConfiguration(iconName: 'IconMask'),
171+
android: AndroidPushConfiguration(defaultAvatar: 'assets/logo.png'),
173172
),
174173
registerApnDeviceToken: true,
175174
),

packages/stream_video/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,17 @@
1313

1414
## 0.11.1
1515

16+
🚧 Breaking changes
17+
18+
### API renames and type changes
19+
20+
- `onCallKitEvent``onRingingEvent`
21+
- `observeCoreCallKitEvents``observeCoreRingingEvents`
22+
- `observeCallAcceptCallKitEvent``observeCallAcceptRingingEvent`
23+
- `observeCallDeclinedCallKitEvent``observeCallDeclinedRingingEvent`
24+
- `observeCallEndedCallKitEvent``observeCallEndedRingingEvent`
25+
- `CallKitEvent` (type) → `RingingEvent`
26+
1627
🔄 Changed
1728
- The `byParticipantSource` participant sorting now accepts a list of sources. The default sorting for `speaker` and `livestream` presets now include other ingress sources.
1829

Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
# Docs on data driven fixes: https://github.com/flutter/flutter/blob/master/docs/contributing/Data-driven-Fixes.md
2+
3+
version: 1
4+
transforms:
5+
- title: "replace CallKitEvent with RingingEvent"
6+
date: "2025-08-28"
7+
element:
8+
uris:
9+
[
10+
"package:stream_video/src/push_notification/push_notification_manager.dart",
11+
"package:stream_video/stream_video.dart",
12+
]
13+
typedef: "CallKitEvent"
14+
changes:
15+
- kind: "rename"
16+
newName: "RingingEvent"
17+
18+
- title: "replace observeCallDeclinedCallKitEvent with observeCallDeclinedRingingEvent"
19+
date: "2025-08-28"
20+
element:
21+
uris:
22+
[
23+
"package:stream_video/src/stream_video.dart",
24+
"package:stream_video/stream_video.dart",
25+
]
26+
inClass: "StreamVideo"
27+
method: "observeCallDeclinedCallKitEvent"
28+
changes:
29+
- kind: "rename"
30+
newName: "observeCallDeclinedRingingEvent"
31+
32+
- title: "replace onCallKitEvent with onRingingEvent"
33+
date: "2025-08-28"
34+
element:
35+
uris:
36+
[
37+
"package:stream_video/src/stream_video.dart",
38+
"package:stream_video/stream_video.dart",
39+
]
40+
inClass: "StreamVideo"
41+
method: "onCallKitEvent"
42+
changes:
43+
- kind: "rename"
44+
newName: "onRingingEvent"
45+
46+
- title: "replace observeCoreCallKitEvents with observeCoreRingingEvents"
47+
date: "2025-08-28"
48+
element:
49+
uris:
50+
[
51+
"package:stream_video/src/stream_video.dart",
52+
"package:stream_video/stream_video.dart",
53+
]
54+
inClass: "StreamVideo"
55+
method: "observeCoreCallKitEvents"
56+
changes:
57+
- kind: "rename"
58+
newName: "observeCoreRingingEvents"
59+
60+
- title: "replace observeCallAcceptCallKitEvent with observeCallAcceptRingingEvent"
61+
date: "2025-08-28"
62+
element:
63+
uris:
64+
[
65+
"package:stream_video/src/stream_video.dart",
66+
"package:stream_video/stream_video.dart",
67+
]
68+
inClass: "StreamVideo"
69+
method: "observeCallAcceptCallKitEvent"
70+
changes:
71+
- kind: "rename"
72+
newName: "observeCallAcceptRingingEvent"
73+
74+
- title: "replace observeCallEndedCallKitEvent with observeCallEndedRingingEvent"
75+
date: "2025-08-28"
76+
element:
77+
uris:
78+
[
79+
"package:stream_video/src/stream_video.dart",
80+
"package:stream_video/stream_video.dart",
81+
]
82+
inClass: "StreamVideo"
83+
method: "observeCallEndedCallKitEvent"
84+
changes:
85+
- kind: "rename"
86+
newName: "observeCallEndedRingingEvent"

0 commit comments

Comments
 (0)