Skip to content

Commit 0b40771

Browse files
hiennguyen92samgued
authored andcommitted
Merge branch 'dev' of github.com:hiennguyen92/flutter_callkit_incoming into dev
# Conflicts: # android/src/main/kotlin/com/hiennv/flutter_callkit_incoming/CallkitNotificationManager.kt
2 parents 8f8abc6 + 234ebbc commit 0b40771

19 files changed

+856
-238
lines changed

CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
## 2.5.2
2+
* Add notification calling for Android `callingNotification`, thank @ebsangam https://github.com/hiennguyen92/flutter_callkit_incoming/pull/662
3+
* Add `logoUrl` properties (inside android prop)
4+
* Fixed issue DMTF IOS, thank @minn-ee https://github.com/hiennguyen92/flutter_callkit_incoming/issues/577
5+
* Fixed issue duplicate missing notification Android
6+
* Fixed some bugs.
7+
18
## 2.5.1
29
* Fix issue security Android, thanks @datpt11 https://github.com/hiennguyen92/flutter_callkit_incoming/issues/651
310

README.md

Lines changed: 61 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,19 @@ Our top sponsors are shown below!
101101
subtitle: 'Missed call',
102102
callbackText: 'Call back',
103103
),
104+
callingNotification: const NotificationParams(
105+
showNotification: true,
106+
isShowCallback: true,
107+
subtitle: 'Calling...',
108+
callbackText: 'Hang Up',
109+
),
104110
duration: 30000,
105111
extra: <String, dynamic>{'userId': '1a2b3c4d'},
106112
headers: <String, dynamic>{'apiKey': 'Abc@123!', 'platform': 'flutter'},
107113
android: const AndroidParams(
108114
isCustomNotification: true,
109115
isShowLogo: false,
116+
logoUrl: 'https://i.pravatar.cc/100',
110117
ringtonePath: 'system_ringtone_default',
111118
backgroundColor: '#0955fa',
112119
backgroundUrl: 'https://i.pravatar.cc/500',
@@ -161,8 +168,16 @@ Our top sponsors are shown below!
161168
nameCaller: 'Hien Nguyen',
162169
handle: '0123456789',
163170
type: 1,
164-
textMissedCall: 'Missed call',
165-
textCallback: 'Call back',
171+
missedCallNotification: const NotificationParams(
172+
showNotification: true,
173+
isShowCallback: true,
174+
subtitle: 'Missed call',
175+
callbackText: 'Call back',
176+
),
177+
android: const AndroidParams(
178+
isCustomNotification: true,
179+
isShowCallID: true,
180+
)
166181
extra: <String, dynamic>{'userId': '1a2b3c4d'},
167182
);
168183
await FlutterCallkitIncoming.showMissCallNotification(params);
@@ -184,7 +199,17 @@ Our top sponsors are shown below!
184199
handle: '0123456789',
185200
type: 1,
186201
extra: <String, dynamic>{'userId': '1a2b3c4d'},
187-
ios: IOSParams(handleType: 'generic')
202+
ios: IOSParams(handleType: 'generic'),
203+
callingNotification: const NotificationParams(
204+
showNotification: true,
205+
isShowCallback: true,
206+
subtitle: 'Calling...',
207+
callbackText: 'Hang Up',
208+
),
209+
android: const AndroidParams(
210+
isCustomNotification: true,
211+
isShowCallID: true,
212+
)
188213
);
189214
await FlutterCallkitIncoming.startCall(params);
190215
```
@@ -466,7 +491,7 @@ Our top sponsors are shown below!
466491
```
467492
<a href='https://github.com/hiennguyen92/flutter_callkit_incoming/blob/master/example/ios/Runner/AppDelegate.swift'>Please check full: Example</a>
468493

469-
4. Properties
494+
Properties
470495

471496
| Prop | Description | Default |
472497
| --------------- | ----------------------------------------------------------------------- | ----------- |
@@ -481,36 +506,47 @@ Our top sponsors are shown below!
481506
| **`textDecline`** | Text `Decline` used in Android | `Decline` |
482507
| **`extra`** | Any data added to the event when received. | `{}` |
483508
| **`headers`** | Any data for custom header avatar/background image. | `{}` |
484-
| **`missedCallNotification`** | Android data needed to customize Miss Call Notification. | Below |
509+
| **`missedCallNotification`** | Android data needed to customize Miss Call Notification. | Below |
510+
| **`callingNotification`** | Android data needed to customize Calling Notification. | Below |
485511
| **`android`** | Android data needed to customize UI. | Below |
486512
| **`ios`** | iOS data needed. | Below |
487513

488514
<br>
489515

490516
* Missed Call Notification
491517

492-
| Prop | Description | Default |
493-
| --------------- | ----------------------------------------------------------------------- | ----------- |
494-
| **`subtitle`** | Text `Missed Call` used in Android (show in miss call notification) | `Missed Call` |
495-
| **`callbackText`** | Text `Call back` used in Android (show in miss call notification) | `Call back` |
496-
| **`showNotification`** | Show missed call notification when timeout | `true` |
497-
| **`isShowCallback`** | Show callback action from miss call notification. | `true` |
518+
| Prop | Description | Default |
519+
| --------------- |--------------------------------------------------------------------------| ----------- |
520+
| **`subtitle`** | Text `Missed Call` used in Android (show in miss call notification) | `Missed Call` |
521+
| **`callbackText`** | Text `Call back` used in Android (show in miss call notification action) | `Call back` |
522+
| **`showNotification`** | Show missed call notification when timeout | `true` |
523+
| **`isShowCallback`** | Show callback action from miss call notification. | `true` |
524+
525+
* Calling Notification
526+
527+
| Prop | Description | Default |
528+
| --------------- |------------------------------------------------------------------------|--------------|
529+
| **`subtitle`** | Text `Missed Call` used in Android (show in calling notification) | `Calling...` |
530+
| **`callbackText`** | Text `Call back` used in Android (show in calling notification action) | `Hang up` |
531+
| **`showNotification`** | Show calling notification when start call/accept call | `true` |
532+
| **`isShowCallback`** | Show hang up action from calling notification. | `true` |
498533
* Android
499534

500-
| Prop | Description | Default |
501-
| --------------------------- |------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
502-
| **`isCustomNotification`** | Using custom notifications. | `false` |
503-
| **`isCustomSmallExNotification`** | Using custom notification small on some devices clipped out in android. | `false` |
504-
| **`isShowLogo`** | Show logo app inside full screen. `/android/src/main/res/drawable-xxxhdpi/ic_logo.png` | `false` |
505-
| **`ringtonePath`** | File name of a ringtone ex: `ringtone_default`. Put file into `/android/app/src/main/res/raw/ringtone_default.mp3` | `system_ringtone_default` <br>using ringtone default of the phone |
506-
| **`backgroundColor`** | Incoming call screen background color. | `#0955fa` |
507-
| **`backgroundUrl`** | Using image background for Incoming call screen. example: http://... https://... or "assets/abc.png" | _None_ |
508-
| **`actionColor`** | Color used in button/text on notification. | `#4CAF50` |
509-
| **`textColor`** | Color used for the text in full screen notification. | `#ffffff` |
510-
| **`incomingCallNotificationChannelName`** | Notification channel name of incoming call. | `Incoming call` |
511-
| **`missedCallNotificationChannelName`** | Notification channel name of missed call. | `Missed call` |
512-
| **`isShowCallID`** | Show call id app inside full screen/notification. | false |
513-
| **`isShowFullLockedScreen`** | Show full screen on Locked Screen(please make sure call `requestFullIntentPermission` for android 14+). | true |
535+
| Prop | Description | Default |
536+
|-------------------------------------------|--------------------------------------------------------------------------------------------------------------------|-------------------------------------------------------------------|
537+
| **`isCustomNotification`** | Using custom notifications. | `false` |
538+
| **`isCustomSmallExNotification`** | Using custom notification small on some devices clipped out in android. | `false` |
539+
| **`isShowLogo`** | Show logo app inside full screen. `/android/src/main/res/drawable-xxxhdpi/ic_logo.png` | `false` |
540+
| **`logoUrl`** | Logo app inside full screen. example: http://... https://... or "assets/abc.png" | _None_ |
541+
| **`ringtonePath`** | File name of a ringtone ex: `ringtone_default`. Put file into `/android/app/src/main/res/raw/ringtone_default.mp3` | `system_ringtone_default` <br>using ringtone default of the phone |
542+
| **`backgroundColor`** | Incoming call screen background color. | `#0955fa` |
543+
| **`backgroundUrl`** | Using image background for Incoming call screen. example: http://... https://... or "assets/abc.png" | _None_ |
544+
| **`actionColor`** | Color used in button/text on notification. | `#4CAF50` |
545+
| **`textColor`** | Color used for the text in full screen notification. | `#ffffff` |
546+
| **`incomingCallNotificationChannelName`** | Notification channel name of incoming call. | `Incoming call` |
547+
| **`missedCallNotificationChannelName`** | Notification channel name of missed call. | `Missed call` |
548+
| **`isShowCallID`** | Show call id app inside full screen/notification. | false |
549+
| **`isShowFullLockedScreen`** | Show full screen on Locked Screen(please make sure call `requestFullIntentPermission` for android 14+). | true |
514550

515551
<br>
516552

android/src/main/AndroidManifest.xml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
<uses-permission android:name="android.permission.WAKE_LOCK" />
88
<uses-permission android:name="android.permission.ACCESS_NOTIFICATION_POLICY" />
99
<uses-permission android:name="android.permission.POST_NOTIFICATIONS"/>
10-
<uses-permission android:name="android.permission.MANAGE_OWN_CALLS"/>
10+
<uses-permission android:name="android.permission.FOREGROUND_SERVICE" />
1111

1212
<application>
1313

@@ -50,5 +50,11 @@
5050
android:exported="true"
5151
android:name="com.hiennv.flutter_callkit_incoming.CallkitSoundPlayerService"/>
5252

53+
<service
54+
android:enabled="true"
55+
android:exported="true"
56+
android:foregroundServiceType="phoneCall"
57+
android:name="com.hiennv.flutter_callkit_incoming.OngoingNotificationService"/>
58+
5359
</application>
5460
</manifest>

0 commit comments

Comments
 (0)