MethodChannelTwilioVoice class
Implementation of TwilioVoicePlatform that uses method channels.
- Inheritance
-
- Object
- PlatformInterface
- SharedPlatformInterface
- TwilioVoicePlatform
- MethodChannelTwilioVoice
- Implementers
Constructors
Properties
- call → TwilioCallPlatform
-
no setteroverride
-
callEventsController
→ StreamController<
String> -
no setterinherited
-
callEventsListener
→ Stream<
CallEvent> -
Sends call events
no setteroverride
-
callEventsStream
→ Stream<
String> -
no setterinherited
- deviceTokenChanged ↔ OnDeviceTokenChanged?
-
getter/setter pairinherited
- eventChannel → EventChannel
-
Communication to flutter code
no setterinherited
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
-
Communication with native code
no setterinherited
- showMissedCallNotifications ← bool
-
Whether or not should the user receive a notification after a missed call, default to true.
no getteroverride
Methods
-
hasBluetoothPermissions(
) → Future< bool> -
Checks if device has bluetooth permissions
Only available on Android
Defaults to false
override
-
hasCallPhonePermission(
) → Future< bool> -
Checks if device has 'android.permission.CALL_PHONE' permission
override
-
hasManageOwnCallsPermission(
) → Future< bool> -
Checks if device has permission to manage system calls
override
-
hasMicAccess(
) → Future< bool> -
Checks if device has microphone permission
override
-
hasReadPhoneNumbersPermission(
) → Future< bool> -
Checks if device has read phone numbers permission
override
-
hasReadPhoneStatePermission(
) → Future< bool> -
Checks if device has read phone state permission
override
-
hasRegisteredPhoneAccount(
) → Future< bool> -
Checks if device has a registered phone account
override
-
isPhoneAccountEnabled(
) → Future< bool> -
Checks if App's phone account is enabled
override
-
isRejectingCallOnNoPermissions(
) → Future< bool> -
Returns true if call is rejected when no
CALL_PHONEpermissions are granted nor Phone Account (viaisPhoneAccountEnabled) is registered. Defaults to false.override -
logLocalEvent(
String description, {String prefix = "LOG", String separator = "|"}) → void -
Logs event to EventChannel.
This is used to send events to the EventChannel for integration into existing communication flow.
The event will be sent as a String with the following format:
inherited
-
logLocalEventEntries(
List< String> entries, {String prefix = "LOG", String separator = "|"}) → void -
Logs event to EventChannel, but uses List.join with
separatorto joinprefixanddescription. This is used to send events to the EventChannel for integration into existing communication flow. The event will be sent as a String with the following format:inherited -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
openPhoneAccountSettings(
) → Future< bool> -
Open phone account settings
override
-
parseCallEvent(
String state) → CallEvent -
Sends call events
override
-
registerClient(
String clientId, String clientName) → Future< bool?> -
Register clientId for background calls
override
-
registerPhoneAccount(
) → Future< bool> -
Register phone account with TelecomManager
override
-
rejectCallOnNoPermissions(
{bool shouldReject = false}) → Future< bool> -
Reject call when no
CALL_PHONEpermissions are granted nor Phone Account (viaisPhoneAccountEnabled) is registered. If set to true, the call is rejected immediately upon received. If set to false, the call is left until the timeout is reached / call is canceled. Defaults to false.override -
requestBackgroundPermissions(
) → Future< bool?> -
Requests background permission
override
-
requestBluetoothPermissions(
) → Future< bool?> -
Request bluetooth permissions
Only available on Android
override
-
requestCallPhonePermission(
) → Future< bool?> -
request 'android.permission.CALL_PHONE' permission
override
-
requestManageOwnCallsPermission(
) → Future< bool?> -
Requests system permission to manage calls
override
-
requestMicAccess(
) → Future< bool?> -
Request microphone permission
override
-
requestReadPhoneNumbersPermission(
) → Future< bool?> -
Request read phone numbers permission
override
-
requestReadPhoneStatePermission(
) → Future< bool?> -
Request read phone state permission
override
-
requiresBackgroundPermissions(
) → Future< bool> -
Checks if device needs background permission
override
-
setDefaultCallerName(
String callerName) → Future< bool?> -
Set default caller name for no registered clients
override
-
setOnDeviceTokenChanged(
OnDeviceTokenChanged deviceTokenChanged) → void -
override
-
setTokens(
{required String accessToken, String? deviceToken}) → Future< bool?> -
register fcm token, and device token for android
override
-
showBackgroundCallUI(
) → Future< bool?> -
Android-only, shows background call UI
Deprecated, has no effect
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
{String? accessToken}) → Future< bool?> -
Unregisters from Twilio
override
-
unregisterClient(
String clientId) → Future< bool?> -
Unregister clientId for background calls
override
-
updateCallKitIcon(
{String? icon}) → Future< bool?> -
Set iOS call kit icon
override
-
updateSound(
SoundName soundName, String? url) → Future< void> -
Update Twilio Device sound defined by SoundName, this will override the default Twilio Javascript sound.
If url is null, the default will be used.
Documentation: https://www.twilio.com/docs/voice/sdks/javascript/twiliodevice#deviceoptionssounds-properties-and-default-sounds
override
-
updateSounds(
{Map< SoundName, String> ? sounds}) → Future<void> -
Update Twilio Device sounds defined by SoundName, this will override the default Twilio Javascript sounds.
If a corresponding null value is provided, the default will be used.
Documentation: https://www.twilio.com/docs/voice/sdks/javascript/twiliodevice#deviceoptionssounds-properties-and-default-sounds
override
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited
Static Properties
- instance → TwilioVoicePlatform
-
no setter