Skip to content

Commit 33b590d

Browse files
committed
docs: add custom callkit notification integration
1 parent bd1f2de commit 33b590d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -243,6 +243,19 @@ Notifications are presented as **alerts**. If you notifications aren't shown or
243243
- if there are already notifications shown (https://stackoverflow.com/a/36383155/4628115)
244244
- if system is in 'Do Not Disturb' or 'Focus' mode.
245245

246+
If you need manual control over some notifications, e.g. notifying twilio of a queued/missed call from FCM/service worker, you can do so by hooking into the [web_callkit](https://pub.dev/packages/web_callkit) directly. For example,
247+
248+
```dart
249+
// import
250+
import 'package:web_callkit/web_callkit.dart';
251+
252+
// Get call sid used as unique identifier
253+
void _notifyMissedCall() async {
254+
final callSid = await TwilioVoice.instance.call.getSid();
255+
WebCallkit.instance.reportCallDisconnected(callSid!, response: CKDisconnectResponse.missed);
256+
}
257+
```
258+
246259
### MacOS Setup:
247260

248261
The plugin is essentially a [WKWebView](https://developer.apple.com/documentation/webkit/wkwebview)

0 commit comments

Comments
 (0)