TwilioVoiceWeb class
The web implementation of TwilioVoicePlatform.
- Inheritance
-
- Object
- PlatformInterface
- SharedPlatformInterface
- TwilioVoicePlatform
- MethodChannelTwilioVoice
- TwilioVoiceWeb
Constructors
Properties
- call → Call
-
no setteroverride
-
callEventsController
→ StreamController<
String> -
no setterinherited
-
callEventsListener
→ Stream<
CallEvent> -
Sends call events
no setteroverride
-
callEventsStream
→ Stream<
String> -
no setterinherited
- device ↔ Device?
-
getter/setter pair
- 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
-
Not currently implemented for web
TODO implement this or use web notifications from existing package
https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/user_interface/Notifications
no getteroverride
- webCallkit ↔ WebCallkitPlatform
-
getter/setter pair
Methods
-
hasBluetoothPermissions(
) → Future< bool> -
Queries browser for bluetooth permissions.
Not supported on web.
override
-
hasCallPhonePermission(
) → Future< bool> -
Checks if device has 'android.permission.CALL_PHONE' permission
inherited
-
hasManageOwnCallsPermission(
) → Future< bool> -
Checks if device has permission to manage system calls
inherited
-
hasMicAccess(
) → Future< bool> -
Queries current window for microphone permission. Returns true if permission is granted, false otherwise.
Documentation: https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query
override
-
hasReadPhoneNumbersPermission(
) → Future< bool> -
Checks if device has read phone numbers permission
inherited
-
hasReadPhoneStatePermission(
) → Future< bool> -
Checks if device has read phone state permission
inherited
-
hasRegisteredPhoneAccount(
) → Future< bool> -
Checks if device has a registered phone account
inherited
-
isPhoneAccountEnabled(
) → Future< bool> -
Checks if App's phone account is enabled
inherited
-
isRejectingCallOnNoPermissions(
) → Future< bool> -
Returns true if call is rejected when no
CALL_PHONEpermissions are granted nor Phone Account (viaisPhoneAccountEnabled) is registered. Defaults to false.inherited -
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
inherited
-
parseCallEvent(
String state) → CallEvent -
Sends call events
inherited
-
registerClient(
String clientId, String clientName) → Future< bool?> -
Add registered client by
id, namepair in local storage. If an existing client with the same id is already registered, it will be replaced. See LocalStorageWeb.addRegisteredClientoverride -
registerPhoneAccount(
) → Future< bool> -
Register phone account with TelecomManager
inherited
-
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.inherited -
requestBackgroundPermissions(
) → Future< bool?> -
Request notifications permission. Returns true if permission is granted, false otherwise.
Documentation: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions/request
override
-
requestBluetoothPermissions(
) → Future< bool?> -
Request bluetooth permissions.
Not supported on web.
override
-
requestCallPhonePermission(
) → Future< bool?> -
request 'android.permission.CALL_PHONE' permission
inherited
-
requestManageOwnCallsPermission(
) → Future< bool?> -
Requests system permission to manage calls
inherited
-
requestMicAccess(
) → Future< bool?> -
Request microphone permission. Returns true if permission is granted, false otherwise.
Documentation: https://developer.mozilla.org/en-US/docs/Mozilla/Add-ons/WebExtensions/API/permissions/request
Documentation: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia
This is a 'hack' to acquire media permissions. The permissions API is not supported in all browsers.
override
-
requestReadPhoneNumbersPermission(
) → Future< bool?> -
Request read phone numbers permission
inherited
-
requestReadPhoneStatePermission(
) → Future< bool?> -
Request read phone state permission
inherited
-
requiresBackgroundPermissions(
) → Future< bool> -
Queries current window for notifications permission. Returns true if permission is granted, false otherwise.
Documentation: https://developer.mozilla.org/en-US/docs/Web/API/Permissions/query
override
-
setDefaultCallerName(
String callerName) → Future< bool?> -
Set default caller name for incoming calls if no caller name is provided / registered.
See LocalStorageWeb.saveDefaultCallerName
override
-
setOnDeviceTokenChanged(
OnDeviceTokenChanged deviceTokenChanged) → void -
inherited
-
setTokens(
{required String accessToken, String? deviceToken}) → Future< bool?> -
Creates and registered the Twilio Device. Returns true if successful, false otherwise.
See twilio_js.Device.new
Note:
deviceTokenis ignored for weboverride -
showBackgroundCallUI(
) → Future< bool?> -
This feature is not available for web
override
-
toString(
) → String -
A string representation of this object.
inherited
-
unregister(
{String? accessToken}) → Future< bool?> -
Unregister device from Twilio. Returns true if successful, false otherwise.
accessTokenis ignored for web See twilio_js.Device.unregisteroverride -
unregisterClient(
String clientId) → Future< bool?> -
Remove registered client by id, if the client is not registered, do nothing.
See LocalStorageWeb.removeRegisteredClient
override
-
updateCallKitIcon(
{String? icon}) → Future< bool?> -
Set iOS call kit icon
inherited
-
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 Methods
-
registerWith(
Registrar registrar) → void