You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Feat: [Web] Add Twilio Device `updateToken(String)` function to allow updating of active device tokens.
5
14
* Fix: [Web] Twilio Device does not unregister on `unregister()` method call due to 'device.off' not visible in js object causing device event listeners to remain attached on unregistered device.
Copy file name to clipboardExpand all lines: README.md
+34-35Lines changed: 34 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,6 @@
1
1
# twilio_voice
2
2
3
-
Provides an interface to Twilio's Programmable Voice SDK to allow voice-over-IP (VoIP) calling into
4
-
your Flutter applications.
3
+
Provides an interface to Twilio's Programmable Voice SDK to allow voice-over-IP (VoIP) calling into your Flutter applications.
5
4
~~This plugin was taken from the original `flutter_twilio_voice` as it seems that plugin is no longer maintained, this one is.~~ Project ownership & maintenance handed over by [diegogarcia](https://github.com/diegogarciar). For the foreseeable future, I'll be actively maintaining this project.
6
5
7
6
#### 🐞Bug? Issue? Something odd?
@@ -121,27 +120,27 @@ notifications:
121
120
To register a Phone Account, request access to `READ_PHONE_NUMBERS` permission first:
122
121
123
122
```dart
124
-
TwilioVoice.instance.requestReadPhoneNumbersPermission(); // Gives Android permissions to read Phone Accounts
123
+
TwilioVoicePlatform.instance.requestReadPhoneNumbersPermission(); // Gives Android permissions to read Phone Accounts
@@ -151,7 +150,7 @@ Placing a call with Telecom app via Connection Service requires a `PhoneAccount`
151
150
Finally, to grant access to place calls, run:
152
151
153
152
```dart
154
-
TwilioVoice.instance.requestCallPhonePermission(); // Gives Android permissions to place calls
153
+
TwilioVoicePlatform.instance.requestCallPhonePermission(); // Gives Android permissions to place calls
155
154
```
156
155
157
156
See [Customizing the Calling Account](#customizing-the-calling-account) for more information.
@@ -161,7 +160,7 @@ See [Customizing the Calling Account](#customizing-the-calling-account) for more
161
160
To enable the `ConnectionService` and make/receive calls, run:
162
161
163
162
```dart
164
-
TwilioVoice.instance.requestReadPhoneStatePermission(); // Gives Android permissions to read Phone State
163
+
TwilioVoicePlatform.instance.requestReadPhoneStatePermission(); // Gives Android permissions to read Phone State
165
164
```
166
165
167
166
Highly recommended to review the notes for **Android**. See [[Notes]](https://github.com/cybex-dev/twilio_voice/blob/master/NOTES.md#android) for more information.
@@ -516,16 +515,16 @@ Receives calls via [ConnectionService](https://developer.android.com/reference/a
516
515
To receive and place calls you need Microphone permissions, register the microphone permission in
517
516
your info.plist for iOS.
518
517
519
-
You can use `TwilioVoice.instance.hasMicAccess` and `TwilioVoice.instance.requestMicAccess` to check
518
+
You can use `TwilioVoicePlatform.instance.hasMicAccess` and `TwilioVoicePlatform.instance.requestMicAccess` to check
520
519
and request the permission. Permissions is also automatically requested when receiving a call.
521
520
522
521
#### Background calls (Android only on some devices)
523
522
524
523
~~Xiaomi devices, and maybe others, need a special permission to receive background calls.
525
-
use `TwilioVoice.instance.requiresBackgroundPermissions` to check if your device requires a special
524
+
use `TwilioVoicePlatform.instance.requiresBackgroundPermissions` to check if your device requires a special
526
525
permission, if it does, show a rationale explaining the user why you need the permission. Finally
527
526
call
528
-
`TwilioVoice.instance.requestBackgroundPermissions` which will take the user to the App Settings
527
+
`TwilioVoicePlatform.instance.requestBackgroundPermissions` which will take the user to the App Settings
529
528
page to enable the permission.~~
530
529
531
530
Deprecated in 0.10.0, as it is no longer needed. Custom UI has been replaced with native UI.
@@ -535,20 +534,20 @@ Deprecated in 0.10.0, as it is no longer needed. Custom UI has been replaced wit
535
534
Similar to CallKit on iOS, Android implements their own via a [ConnectionService](https://developer.android.com/reference/android/telecom/ConnectionService) integration. To make use of this, you'll need to request `CALL_PHONE` permissions via:
536
535
537
536
```dart
538
-
TwilioVoice.instance.requestCallPhonePermission(); // Gives Android permissions to place outgoing calls
539
-
TwilioVoice.instance.requestReadPhoneStatePermission(); // Gives Android permissions to read Phone State including receiving calls
540
-
TwilioVoice.instance.requestReadPhoneNumbersPermission(); // Gives Android permissions to read Phone Accounts
541
-
TwilioVoice.instance.requestManageOwnCallsPermission(); // Gives Android permissions to manage calls, this isn't necessary to request as the permission is simply required in the Manifest, but added nontheless.
537
+
TwilioVoicePlatform.instance.requestCallPhonePermission(); // Gives Android permissions to place outgoing calls
538
+
TwilioVoicePlatform.instance.requestReadPhoneStatePermission(); // Gives Android permissions to read Phone State including receiving calls
539
+
TwilioVoicePlatform.instance.requestReadPhoneNumbersPermission(); // Gives Android permissions to read Phone Accounts
540
+
TwilioVoicePlatform.instance.requestManageOwnCallsPermission(); // Gives Android permissions to manage calls, this isn't necessary to request as the permission is simply required in the Manifest, but added nontheless.
542
541
```
543
542
544
543
Following this, to register a Phone Account (required by all applications implementing a system-managed `ConnectionService`, run:
545
544
546
545
```dart
547
-
TwilioVoice.instance.registerPhoneAccount(); // Registers the Phone Account
548
-
TwilioVoice.instance.openPhoneAccountSettings(); // Opens the Phone Account settings
546
+
TwilioVoicePlatform.instance.registerPhoneAccount(); // Registers the Phone Account
547
+
TwilioVoicePlatform.instance.openPhoneAccountSettings(); // Opens the Phone Account settings
549
548
550
549
// After the account is enabled, you can check if it's enabled with:
551
-
TwilioVoice.instance.isPhoneAccountEnabled(); // Checks if the Phone Account is enabled
550
+
TwilioVoicePlatform.instance.isPhoneAccountEnabled(); // Checks if the Phone Account is enabled
552
551
```
553
552
554
553
This last step can be considered the 'final check' to make/receive calls on Android.
@@ -558,8 +557,8 @@ This last step can be considered the 'final check' to make/receive calls on Andr
558
557
Finally, a consideration for not all (`CALL_PHONE`) permissions granted on an Android device. The following feature is available on Android only:
559
558
560
559
```dart
561
-
TwilioVoice.instance.rejectCallOnNoPermissions({Bool = false}); // Rejects incoming calls if permissions are not granted
562
-
TwilioVoice.instance.isRejectingCallOnNoPermissions(); // Checks if the plugin is rejecting calls if permissions are not granted
560
+
TwilioVoicePlatform.instance.rejectCallOnNoPermissions({Bool = false}); // Rejects incoming calls if permissions are not granted
561
+
TwilioVoicePlatform.instance.isRejectingCallOnNoPermissions(); // Checks if the plugin is rejecting calls if permissions are not granted
563
562
```
564
563
565
564
If the `CALL_PHONE` permissions group i.e. `READ_PHONE_STATE`, `READ_PHONE_NUMBERS`, `CALL_PHONE` aren't granted nor a Phone Account is registered and enabled, the plugin will either reject the incoming call (true) or not show the incoming call UI (false).
0 commit comments