twilio_voice 0.5.0 copy "twilio_voice: ^0.5.0" to clipboard
twilio_voice: ^0.5.0 copied to clipboard

Provides an interface to Twilio's Programmable Voice SDK to allow adding voice-over-IP (VoIP) calling into your Flutter applications.

0.5.0 #

  • feat: [iOS] incoming calls now lookup a contact:
    • e.g. from:+1... - contact lookup by phone app using CXHandle.HandleType.phoneNumber
    • e.g. from:client:id - the plugin resolves the client's id with CXHandle.HandleType.generic
      • note: [iOS, macOS] an unregistered client with no name parameter now shows the default caller name ("Unknown Caller") where it previously showed the raw client id, matching Android.
  • feat: [iOS, macOS, Web] added remaining platforms caller name resolution based on documented Interpreting Parameters rules:
    • custom parameters: __TWI_CALLER_NAME, or
    • resolve(__TWI_CALLER_ID), or
    • phone number / registered client, or fallback
    • default caller name.
  • fix: [Web] an incoming call not answered left a hanging incoming call notification indefinitely.
  • fix: [Web] an unanswered outgoing call ended early cancelled from this device is no longer reported as a missed call
  • fix: [Android, iOS, macOS] isOnCall & activeCall now sync. Launching app with ongoing call now returns correct activeCall object and isOnCall true. (see Issue #179)
  • chore: [Android] plugin Gradle wrapper raised to 8.11.1, the minimum for the declared AGP 8.9.1
  • fix: [Android] setActive() now proactively changes call UI to ongoing call screen when answering incoming call preventing perceived delay while connecting.
  • feat: [iOS, macOS] Swift Package Manager support added, enable it with flutter config --enable-swift-package-manager. Note: projects using CocoaPods will continue to use CocoaPods, and SPM is only used for new projects or those that have opted in.
  • feat: added call quality events for all platforms (see CallQualityEvent and TwilioVoicePlatform.instance.call.qualityWarnings, and Twilio Call Quality Metrics)
  • fix: [android] fixed crash when CallInvite is received due to unmarshalling error with some Telecom/ConnectionService implementations (e.g. Samsung)
  • fix: [iOS] call events now provide raw from/to Twilio sent, client: prefix included. This is present on other platforms.
  • feat: [Android] proguard-rules are now automatically included as consumerProguardFiles in the plugin's build.gradle, so apps no longer need to manually copy them into their own proguard-rules.pro file.
  • Updated Example
  • Updated docs

0.4.1 #

  • feat: add setAllowIncomingWhileBusy(allow: bool) to control whether multiple incoming call invites are allowed (i.e. handle 2 or more calls at once). All platforms default to true;
  • feat: [android] add support for integrating into existing FirebaseMessagingService services or default to built in based on AndroidManifest declaration.

0.4.0 #

  • BREAKING CHANGES:
    • Minimum iOS deployment version updated to iOS 13.0 (from iOS 11.0) to support the latest Twilio iOS SDK, Flutter's minimum iOS, and the Firebase iOS pods.
    • [Web] WASM support: the web implementation migrated from package:js/dart:html/dart:js_util to dart:js_interop + package:web, so apps can now build with flutter build web --wasm. This raises the minimum Dart SDK to 3.3.0 (extension types) and Flutter to 3.22.0. The js dependency has been removed, and web_callkit updated to ^1.0.1 (which bundles/registers its service worker automatically - see its README; the manual service-worker copy is no longer required).
    • [Web, macOS] The Twilio Voice JS SDK (twilio.min.js, v2.18.0) is now bundled with the plugin and loaded automatically.
    • Feat: Completed migration to Federated Plugin structure. This requires one change:
    /// old
    TwilioVoice.instance
      
    // new 
    TwilioVoicePlatform.instance
    
  • feat: [Android, iOS, Web, macOS] Update Twilio SDKs to latest versions, see release notes for:
  • chore: [Android] Update build tooling to Android Gradle Plugin 8.9.1 and Kotlin 2.1.0 (Gradle wrapper 8.11.1), compileSdk 36.
  • Feat: [Web] Add Twilio Device [DeviceState] accessor protecting un/registration.
  • Feat: [Web] Add Twilio Device updateToken(String) function to allow updating of active device tokens.
  • 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.
  • Feat: [Web] Check unnecessary updating device with the same token.
  • Feat: [Web] Update internal [CallStatus] mapping method.
  • Fix: [Web] Await Twilio Device register() and unregister() method calls.
  • Fix: [Web] Prevent duplicate TwilioVoiceWeb instances.
  • Feat: [iOS] Add support for call logging via enableCallLogging(bool) to record call in recents. No other platform currently supports this, see NOTES.md for more details.
  • Fix: showMissedCallNotifications method call not working due to incorrect method channel name.
  • Fix: [Android] fix permission request callback not completing on permission re-request.
  • Fix: [Android] add missing Android Foreground Service phoneCall.
  • Fix: [Android] reactive to microphone permission changes while call is ongoing.
  • Fix: [Android] failure while connecting to incoming/outgoing call with another call in-progress, TVConnectionService now checks for ongoing calls prior to stopping service.
  • Feat: [Android, macOS] support null From/To parameters in raw connect() function.
  • Feat: [Android] new FCM Token ignored on new token registration, now nowifies twilio_voice plugin of updated token.
  • Fix: [Web] code cleanup & refactor
  • Fix: [iOS] remove unnecessary device token log when failed to register with Twilio.
  • Fix: [iOS] send hex-formatted device token to Dart.
  • Feat: [iOS] add missing event to notify of updated device push token
  • Fix: [iOS] remove invalid push token
  • Fix: [iOS] align parameters for makeCall as required or throw malformed with type checks
  • Fix: [macOS] fix future hanging when placing call and an error occurs/not registered with Twilio.
  • Fix: [iOS] set and use DefaultAudioDevice for audio routing and controlling with Twilio SDK
  • Fix: [iOS] remove duplicate plugin registration #222
  • Feat: [iOS] log incoming push notifications not handled by Twilio SDK
  • fix: [iOS] incorrect parsing of systemVersion in pushRegistry delegate for handling push notifications.
  • fix: [iOS] notify callkit of failure to start/answer call or failure to answer completion handler.
  • fix: [iOS] keep CallKit call mute/hold state in-sync when actions are performed on CallKit UI.
  • fix: [iOS] query isHolding only with no event emitted
  • feat: [iOS] CallKit controller used for mute / hold call actions
  • fix: [iOS] unable to disable call logging on iOS due to incorrect parameter from method channel args.
  • fix: [iOS] use registered notification delegate instead of setting UNUserNotificationCenter.current().delegate = self to avoid overwriting other notification delegates.
  • fix: [iOS] add missing "Incoming" call event to unify platform behavior contract for incoming calls.
  • fix: [web] function caching ensuring proper cleanup on calls/devices
  • fix: [web] improved robustness of functions with active/no calls
  • fix: [web] custom parameters are correctly resolved when call is answered
  • fix: [web] change hold toggle to not implemented defaulting to false always. Experimental holding feature in development for web platform (see PR #322)
  • fix: [macos] set developerExtrasEnabled: true only in debug mode with DEBUG directive
  • feat: [web,macos] Twilio Voice JS SDK loading reworked - no longer copied or imported into the app.
  • fix: [web] prevent race condition caused by calling setTokens on non-existent Device creating an orphaned/leaked device.
  • feat: [macos] add missing ringing event for outgoing calls to unify platform behavior contract.
  • feat: [macos] reconnecting now uses correct onCallReconnecting delegate handler instead of onCallError
  • feat: [macos] accepting incoming call now sets correct status
  • feat: [macos] fix logging call events, speakerOn, speakerOff, holdOn, holdOff, bluetoothOn, bluetoothOff, reconnecting and reconnected events now log correctly.
  • feat: [macos] improve robustness of WKWebView JS handlers for serialization & deserialization of JS Objects & JSON data.
  • fix: [macos] setTokens now waits for the plugin's WKWebView to finish initialising (and the Twilio JS SDK to become available) before creating the Device.
  • fix: [macos] fix request mic permission access returning early false
  • fix: [macos] improve performance on startup by refactoring and removing unnecessary initialization code.
  • fix: [macos] fail gracefully when calling setTokens and plugin is not yet ready.
  • fix: [android] fix crash on CancelledCallInvite received via FCM push notification when app is in background.
  • fix: [android] fix potential crash when on CallInvite received when app is backgrounded / dozing on API 26+.
  • fix: [android] use app name as phone account label if not specified.
  • fix: [android] buffer native log events until dart initialization completed and ready to receive events.
  • feat: [android] correctly show missed call honouring showMissedCallNotifications setting when app is backgrounded or terminated.
  • fix: [android] outgoing calls no longer show "Unknown" on the native call screen while connecting.
  • fix: [ios] changing enableCallLogging setting now correctly updates call logging behaviour for subsequent calls.
  • fix: [macos] toggleBluetooth now returns Future with correct value (though bluetooth not yet implemented).
  • fix: [ios] fix invalid Twilio VoIP payload crashing app
  • fix: [ios] fix plugin in limbo when new incoming call fails to register
  • fix: [macOS,web] add missing updateCallKitIcon native implementation to unify platform behaviour contract.
  • Feat: update example.
  • Docs: update CHANGELOG

0.3.2+2 #

  • Fix: [iOS] show caller number or interpretted client name for performStartCallAction
  • Docs: update CHANGELOG

0.3.2+1 #

  • Fix: [iOS] Missed call notifications now show caller name (or full number) on title, and "Missed call" text in body. Issue #299
  • Feat: [iOS] show caller number or interpretted client name for reportingIncomingCall and missed call notification
  • Docs: update CHANGELOG

0.3.2 #

  • Fix: [iOS] Add missing deviceToken when reporting 'DEVICETOKEN' CallEvent. Issue #241
  • Fix: [iOS] Notifications not showing when app is in foreground.

0.3.1 #

  • Fix: [iOS] Fix hangUp() not ending incoming call when call is ringing. Issue #244
  • Feat: [iOS] Add missing answer() native implementation. Issue #244
  • Feat: Add raw Connect({Map<String, dynamic>?}) for all platforms
  • Refactor: [Web] Removed unused web_callkit event listeners.
  • Fix: [Web] Check if call SID is present when call is disconnected (this occurs if the call ends abruptly after starting, and params does not contain CallSid).
  • Fix: [iOS] unregister removes device push token preventing new access token registration (i.e. user 1 logs out, user 2 and more won't receive any calls). Thanks to @VinceDollo & @Erchil66 Issue #273
  • Fix: [Android] placing outgoing call then ending immediately results in no Flutter plugin not registering call ended. Thanks to @RageshAntonyHM & @Erchil66 Issue #275
  • Fix: [Android] Migrate to declarative plugins block from Flutter's app_plugin_loader Gradle plugin. (see: Deprecated imperative apply of Flutter's Gradle plugins)
  • Docs: update CHANGELOG, TODO

0.3.0+1 #

  • Fix: [Web] add missing web_callkit outgoing call notification
  • Docs: update CHANGELOG, README

0.3.0 #

  • BREAKING CHANGES:
    • Feat: [Web] Add web_callkit support. Please see updated Web Setup section in the README for details.
  • Docs: update README, NOTES & CHANGELOG
  • Feat: [Web] Update example with custom incoming ringtone field.
  • Feat: [Web] Add custom sounds for Twilio Device using updateSound(SoundName, String?) or updateSounds(Map<String, String>) methods.
  • Fix: [Android] call.isOnCall() returns true when call is declined
  • Fix: [Android] handle reject vs error disconnect cause with message.
  • Logging: [Android] Added error code fallback
  • Feat: Update example permissions screen & changed local to URL registration method
  • Fix: [macOS] Remove deprecated .alert presentation option. @AndreiMisiukevich
  • Feat: [macOS] Add native microphone permission with AVCaptureDevice (this replaces getUserMedia() from js interop available on localhost/https only). @AndreiMisiukevich
  • Fix/Update: [macOS] correct runtime entitlement for audio-input permission. @AndreiMisiukevich

0.2.2 #

0.2.1 #

  • Fix: [iOS] Race condition ending call remotely and locally results in a "End Call Failed: The operation couldn’t be completed." error. Issue #184
  • Fix: [iOS] Plugin messages sent via Event Sink throwing an error due to sending from background thread. Issue #256

0.2.0+1 #

  • Fix: [Web] window.localStorage deprecated members
  • Updated README.md

0.2.0 #

  • [Android] Support (long-awaited) AGP 8 update
  • [Android, iOS] Update Twilio SDKs to latest versions, see release notes for:
  • Update: example
    • Added: [Web] environment registration support
    • Added defines.config.json file to example to support environment configuration used with flutter run --dart-defines-file=defines.config.json
    • Added: [Web] FIREBASE_ENABLE defines to initialize Firebase only if set to true
    • Update: [Web] Update example with Firebase Analytics (Web, optional)
  • Added: [Web] Added raw Connect({Map<String, dynamic>?}) sent to TwiML webhook.
  • Fix: [Android] showMissedCallNotifications not working due to incorrect method channel name

0.1.3 #

  • Added: CallEvents:
    • Reconnected
    • Reconnecting
  • Fix: [Android] Fix unregister() from Twilio (assign internal device token)
  • Update: [Android] Add MANGE_OWN_CALLS permission to manifest, method channel implementation & example update, see discussion here.
  • Update: example with logout action, new CallEvents

0.1.1 #

  • Fix: [Web] Multiple missed call notifications
  • Fix: [Android] openPhoneAccountsSettings not always opening on various Android (mainly Samsung) devices
  • Fix: Showing CallDirection.outgoing instead of CallDirection.incoming when Incoming call is ringing in CallEventsListeners.
  • Fix: ActiveCall is not null even after the Call is declined.
  • Fix: Android foreground service not starting on Android +11, many thanks to @mohsen-jalali
  • Fix: Android foreground microphone permission not granted on Android +14.
  • Revert: [Android] allow registering clients with an empty name (supporting current implementation).

0.1.0 #

  • Feat: [Android] Turn off the screen when a call is active and the head is against the handset. @solid-software (https://solid.software)
  • Feat: [macOS] Added support for macOS, based on iOS implementation backed by Twilio Voice Web (twilio-voice.js v2.4.1-dev-custom).
  • Feat: [Web] Web support with notifications (via Service Worker) with live example at https://twilio-voice-web.web.app @cybex-dev
  • Feat: [Android, iOS, web] Add handset call status: isMuted(), isOnSpeaker() and isHolding() @cybex-dev
  • Refactor: Hold call signature changed to holdCall({bool shouldHold = true}) @cybex-dev
  • Feat: [iOS] Add support for changing callkit icon (future plans to extended this for Flutter assets) @cybex-dev
  • [twilio_voice_mimp:0.2.5) fix 4 Null Pointer execption Android
  • [twilio_voice_mimp:0.2.4) add Android DE Local
  • [twilio_voice_mimp:0.2.4) add Android IT Local
  • [twilio_voice_mimp:0.2.3) Upgrade to Twilio Android SDK 6.1.2 / iOS SDK 6.4.2
  • [twilio_voice_mimp:0.2.3) small Bugfix for null pointer Exception
  • [twilio_voice_mimp:0.2.2) more Magic is needed with FLAG_MUTABLE (Android 12)
  • [twilio_voice_mimp:0.2.1) PendingIntent gets FLAG_UPDATE_CURRENT replaced by FLAG_IMMUTABLE (Android 12)
  • [twilio_voice_mimp:0.1.2) Upgrade to Twilio Android SDK 6.1.0 / iOS SDK 6.4.0
  • [twilio_voice_mimp:0.1.1) Fix case Constants.ACTION_ACCEPT null pointer
  • [twilio_voice_mimp:0.0.18) remove example / Add AudioSwitch
  • [twilio_voice_mimp:0.0.17) Make Android RingTone louder
  • [twilio_voice_mimp:0.0.16) Unknown Caller ist auch in der App sichtbar
  • [twilio_voice_mimp:0.0.15) Splash Icon missing
  • [twilio_voice_mimp:0.0.14) Compiler anhancements
  • [twilio_voice_mimp:0.0.13) Android CallsScreen now displays ClientID / CallerID
  • [twilio_voice_mimp:0.0.12) iOS XCODE failed
  • [twilio_voice_mimp:0.0.11) iOS Podspecs were failing
  • [twilio_voice_mimp:0.0.10) **German Localization in Android
  • Feat: Add check and request Bluetooth permissions @cybex-dev
  • Feat: [Android] Use Android Native callkit equivalent via ConnectionService. @cybex-dev
  • Change: [Android] Removed (Deprecated) requiresBackgroundPermissions & requestBackgroundPermissions as they are no longer needed for background UI screens. @cybex-dev
  • Change: [Android] Removed (Deprecated) showBackgroundCallUi as it is no longer needed for background UI screens. (this might be reinstated in future, depending on feature requests) @cybex-dev
  • Change: [Android] Removed (Deprecated) backgroundCallUi as it is no longer needed for background UI screens. @cybex-dev
  • Change: [Android] Removed (Deprecated) requestBluetoothPermission, hasBluetoothPermission as these are no longer needed and handled by the native Telecom App. @cybex-dev
  • (on-hold) Feat: [Android] Added custom scheme twi:// @cybex-dev
  • Feat (early-access): [Android] Added customParams interpretation via TVCallInviteParameters and TVCallParameters, see readme for more details. @cybex-dev
  • Feat: [Android] Add CallingAccount (Phone Account) label & description via strings.xml. @cybex-dev
  • Feat: [Android] Add Calling Account (Phone Account) icon (using current app icon via getApplicationInfo().getIcon()). @cybex-dev
  • Fix: request Permissions return result via Flutter future.
  • Fix: [Android] Missing platform method channel for getSid()
  • Fix: [Android] Inconsistent caller/recipient names for inbound calls between ringing & connected states.
  • Fix: [Android] Incorrect call direction for incoming calls
  • Fix: call ringing event always showing CallDirection.outgoing
  • Fix: [Android] Updated CallKit incoming/outgoing name parameter resolution
  • Fix: [Web] Notification actions working intermittently.
  • Fix: [Web] Added suggested service worker integration with CI/CD unifying with flutter_service_worker.js, see here for more info regarding service worker limitations.
  • Update: [Web] Remove additional service-worker files

0.0.9 #

  • Feat: forwarded callInvite custom parameters to flutter

0.0.8 #

  • Renamed callkit logo
  • Merge-Android: Fixed null pointer exception for eventSink occurs in mute call. @GKPK

0.0.7 #

  • Fixed from param on android

0.0.6 #

  • Added android extra call params

0.0.5 #

  • Updated Twilio SDK versions
  • Added example proguard-rules.pro for android

0.0.4 #

  • Fixes deprecation error with Xcode 12.5
  • removed "client" from ids

0.0.3 #

  • Added missed call notifications
  • Updated Android SDK
  • Added localization files

0.0.1 #

  • Initial release
45
likes
150
points
1.68k
downloads

Documentation

API reference

Publisher

verified publisherearthbase.io

Weekly Downloads

Provides an interface to Twilio's Programmable Voice SDK to allow adding voice-over-IP (VoIP) calling into your Flutter applications.

Homepage
Repository (GitHub)
View/report issues

Topics

#twilio #voice #voip #call #phone

License

MIT (license)

Dependencies

flutter, flutter_web_plugins, plugin_platform_interface, web, web_callkit

More

Packages that depend on twilio_voice

Packages that implement twilio_voice