feat: add custom notification title and message for VoIP calls (also stopCallService method)
This commit is contained in:
parent
f722fc0e5f
commit
ab5df9fd28
7 changed files with 106 additions and 26 deletions
|
|
@ -42,16 +42,31 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
|||
}
|
||||
|
||||
@override
|
||||
Future<bool> makeCall(String callTo, bool isVideoEnabled) async {
|
||||
return (await methodChannel.invokeMethod<bool>(
|
||||
'makeCall',
|
||||
<String, dynamic>{'callTo': callTo, 'isVideoEnabled': isVideoEnabled},
|
||||
))!;
|
||||
Future<bool> makeCall(
|
||||
String callTo,
|
||||
bool isVideoEnabled,
|
||||
String notificationTitle,
|
||||
String notificationMessage,
|
||||
) async {
|
||||
return (await methodChannel
|
||||
.invokeMethod<bool>('makeCall', <String, dynamic>{
|
||||
'callTo': callTo,
|
||||
'isVideoEnabled': isVideoEnabled,
|
||||
'notificationTitle': notificationTitle,
|
||||
'notificationMessage': notificationMessage,
|
||||
}))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> answerCall() async {
|
||||
return (await methodChannel.invokeMethod<bool>('answerCall'))!;
|
||||
Future<bool> answerCall(
|
||||
String notificationTitle,
|
||||
String notificationMessage,
|
||||
) async {
|
||||
return (await methodChannel
|
||||
.invokeMethod<bool>('answerCall', <String, dynamic>{
|
||||
'notificationTitle': notificationTitle,
|
||||
'notificationMessage': notificationMessage,
|
||||
}))!;
|
||||
}
|
||||
|
||||
@override
|
||||
|
|
@ -92,8 +107,14 @@ class MethodChannelLiblinphoneFlutter extends LiblinphoneFlutterPlatform {
|
|||
|
||||
@override
|
||||
Future<bool> sendDtmf(String tone) async {
|
||||
return (await methodChannel.invokeMethod<bool>('sendDtmf', <String, dynamic>{
|
||||
'tone': tone,
|
||||
}))!;
|
||||
return (await methodChannel.invokeMethod<bool>(
|
||||
'sendDtmf',
|
||||
<String, dynamic>{'tone': tone},
|
||||
))!;
|
||||
}
|
||||
|
||||
@override
|
||||
Future<bool> stopCallService() async {
|
||||
return (await methodChannel.invokeMethod<bool>('stopCallService'))!;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue