Releases: twilio/twilio-voice-react-native
1.3.0
1.3.0 (Dec 10, 2024)
Changes
-
Added a new API for customizing the displayed name for incoming calls in CallKit on iOS.
Seevoice.setIncomingCallContactHandleTemplate
and the associated API docs for more information. -
Added a new API for customizing the displayed name for outgoing, incoming, and answered call notifications on Android.
Seevoice.setIncomingCallContactHandleTemplate
andvoice.connect
for more information.
Fixes
- Fixed a scenario where posting feedback for a call with the
Echo
issue would not post correctly to Twilio Insights.
1.2.1
1.2.1 (Oct 31, 2024)
Features
Platform Specific Features
Android
- Added opt-out functionality for the built-in Firebase Messaging service.
Please see this document for more details.
Fixes
Platform Specific Fixes
Android
- Fixed crash issue where system restarts service without an Intent (intent == null).
1.2.0
1.2.0 (Sep 16, 2024)
Changes
Call Message Events (GA)
The Call Message Events feature in the Twilio Voice React Native SDK, previously released in 1.0.0
as Beta, is promoted to Generally Available (GA).
-
(Breaking) The error code for attempting to send a call message with a payload size exceeding maximum limits has changed from
31209
to31212
. -
The behavior of
call.sendMessage
has been changed to support futurecontentType
s.
Please see the API Docs for more information.
Platform Specific Changes
Android
- Now pulling version
6.6.2
of the Twilio Voice Android SDK.
iOS
- Now pulling version
6.11.2
of the Twilio Voice iOS SDK.
1.1.1
1.1.1 (Aug 28, 2024)
Changes
Platform Specific Changes
Android
- Bumped
minSdkVersion
to23
to match the latest versions of React Native.
Fixes
Platform Specific Fixes
Android
-
Fixed crash issue on API 34 when activity is not running in background or foreground and an incoming call is received.
-
Fixed some RTCStats members not available on Android. Specifically,
mos
,bytesSent
, andbytesReceived
.
1.1.0
1.1.0 (Aug 20, 2024)
Features
Platform Specific Features
Android
-
Added support for Android 34
-
Missing Android microphone permissions will now be gracefully handled.
When using the JS API,
callInvite.accept()
andvoice.connect()
will now reject the returned Promise with error31401
.When accepting an incoming call through the native notification, the analogous
31401
error can be caught by attaching a listener tovoice.on(Voice.Event.Error, ...)
. See the following example:voice.on(Voice.Event.Error, (error) => { // handle error if (error.code === 31401) { // show the end-user that they did not give the app the proper permissions } });
Fixes
Platform Specific Fixes
iOS
- Fixed Call Messages not being built with the passed
contentType
ormessageType
.
Changes
Call Message Events (Beta)
-
(Breaking) Removed
CallMessage.MessageType
andCallMessage.ContentType
enumerations and types.
Instead, those types have been replaced bystring
. -
(Breaking) Simplified the
Call
andCallInvite
API for sending call messages.Call.sendMessage
andCallInvite.sendMessage
now take a plain-JS object, or interface, as a parameter.
The following is an example of the updated API considering the above changes.
For outgoing calls:
const call = await voice.connect(...);
const outgoingCallMessage = await call.sendMessage({
content: { foo: 'bar' },
contentType: 'application/json',
messageType: 'user-defined-message',
});
For call invites:
voice.on(Voice.Event.CallInvite, (callInvite) => {
const outgoingCallMessage = await callInvite.sendMessage({
content: { foo: 'bar' },
contentType: 'application/json',
messageType: 'user-defined-message',
});
});
- Added new error codes. See the following table for details:
Error Code Description 31210 Raised when a Call Message is sent with an invalid message type. 31211 Raised when a Call Message is sent when the call is not yet ready to send messages. This can typically happen when the Call/CallInvite is not yet in a ringing state.
Platform Specific Changes
Android
- When permissions are not available, the SDK will now raise a new
PermissionsError
with code31401
when attempting to make an outgoing call
or when trying to accept an incoming call.
1.0.0
1.0.0 (Mar 25, 2024)
Twilio Voice React Native SDK has now reached milestone 1.0.0
and is Generally
Available (GA). Included in this version are the following.
Features
Call Message Events (Beta)
- Allow sending and receiving "user-defined" messages during an ongoing Voice Call and during a pending Call Invite.
- To send a CallMessage, and handle
sent
andfailure
cases:
const message = new CallMessage({
content: { key1: 'This is a messsage from the parent call' },
contentType: CallMessage.ContentType.ApplicationJson,
messageType: CallMessage.MessageType.UserDefinedMessage
});
const outgoingCallMessage: OutgoingCallMessage = await call.sendMessage(message);
outgoingCallMessage.addListener(OutgoingCallMessage.Event.Failure, (error) => {
// outgoingCallMessage failed, handle error
});
outgoingCallMessage.addListener(OutgoingCallMessage.Event.Sent, () => {
// outgoingCallMessage sent
});
- To
receive
a CallMessage:
call.addListener(Call.Event.MessageReceived, (message: CallMessage) => {
// callMessage received
});
Fixes
- Fixed and improved the docstrings for the
Voice
andCall
listeners. The descriptions of the events and listeners should now point to the correct docstrings. - Call quality warning events should now properly pass arguments to listener functions.
Changes
-
The API for
call.getInitialConnectedTimestamp()
has now changed.
Please see the API documentation here for details.
The methodcall.getInitialConnectedTimestamp()
now returns aDate
object.const call = voice.connect(...); const date = call.getInitialConnectedTimestamp(); const millisecondsSinceEpoch = date.getTime();
-
The API for Call Invite events has now changed.
The following events have been moved from the
Voice
class to theCallInvite
class:Voice#callInviteAccepted
is nowCallInvite#accepted
Voice#callInviteRejected
is nowCallInvite#rejected
Voice#callInviteNotificationTapped
is nowCallInvite#notificationTapped
Voice#cancelledCallInvite
is nowCallInvite#cancelled
Please see the
Voice
class API documentation here for details.Please see the
CallInvite
class API documentation here for details. -
Call Notifications can be customized on Android.
The following features regarding a call notificaiton can now be modified
- incoming/outgoing/answered call notification tray icon
- name of caller/or recipient
The incoming/outgoing/answered call notification tray icon can be changed by adding a drawable resources with the following id to your application
incoming_call_small_icon
for incoming call notificationsanswered_call_small_icon
for answered call notificationsoutgoing_call_small_icon
for outgoing call notifications
The name of the caller/or recipient of a call in the notification can be set by adding the following string resources with the following ids to your application.
incoming_call_caller_name_text
for incoming call notificationsoutgoing_call_caller_name_text
for outgoing call notificationsanswered_call_caller_name_text
for answered call notifications
NOTE: Forincoming_call_caller_name_text
&answered_call_caller_name_text
, the substring${from}
will be replaced with the caller and foroutgoing_call_caller_name_text
, the substring${to}
will be replaced with the recipient of the call (if available, defaulting to "unknown").
-
Custom functionality around the
displayName
TwiML parameter has been removed.In previous versions of the SDK, passing a custom TwiML parameter
displayName
would override the notification on Android platforms. Now, this functionality has been removed and notification customization is handled with the above features.
Platform Specific Changes
Android
- Call timestamp now in simplified ISO-8601 format, not stored as a double from epoch.
- Uses system provided notification styles for incoming & ongoing calls. This insures visual consistency between devices.
- Fixed issue where call records were not being removed after call was ended.
iOS
- The call connected timestamp is now in simplified ISO-8601 format.
- A new method
CallInvite.updateCallerHandle()
has been added. Use this method to update the caller's name displayed in the iOS system incoming call UI. This method is specific to iOS and unavailable in Android.
1.0.0-beta.4
1.0.0-beta.4 (Jan 11, 2024)
Twilio Voice React Native SDK has now reached milestone beta.4
. Included in this version are the following.
Fixes
Platform Specific Features
JS
- Fixed an issue with exported types. Typescript language server hinting should now properly prioritize the narrower, more helpful, event-emitter types.
- Narrowed the
CustomParameters
type toRecord<string, string>
instead ofRecord<string, any>
. - Fixed inconsistency with
AudioDevice
typings, preferringundefined
overnull
for optional values. - Fixed an issue with
call.isMuted()
andcall.isOnHold()
APIs. They should now always returnboolean | undefined
instead of potentially returningnull
. - Fixed an issue with
call.getFrom()
,call.getTo()
, andcall.getSid()
APIs. They should now always returnstring | undefined
instead of potentially returningnull
.
iOS
- Fixed a bug where the call invite results in a rejected event when the call is hung up by the caller.
- Fixed a bug where the
registered
andunregistered
events are not fired on iOS. - Fixed an issue where timestamps emitted by the iOS layer were in the wrong units (seconds instead of milliseconds).
Android
- Replace frontline notification images with generic phone images
- In call notifications now display when accepting a call from JS application
- Audio routing for incoming and outgoing calls are now correctly routed
- Internal simplification of call accepted/rejected intent message paths
- Refactored internals & added permissions for Bluetooth and notifications. Please Note that these changes require changes to the application integrating the SDK. For more information, please refer to the Beta.4 migration guide.
1.0.0-beta.3
1.0.0-beta.3 (August 26, 2023)
Twilio Voice React Native SDK has now reached milestone beta.3
. Included in this version are the following.
Features
- Added documentation about outgoing call ringback tones.
- Added more call info persistance. The native layers will now persist call state and initial connected timestamps.
Platform Specific Features
iOS
- Added a new API for injecting a caller handle for CallKit when a call invite is received.
Android
- Incoming call notifications can now be tapped to bring the application into the foreground.
- Tapping on an incoming call notification will emit an event.
SeeVoice.Event.CallInviteNotificationTapped
for more information. - Use latest versions of Twilio Voice Android SDK and the Audioswitch libraries.
Fixes
Platform Specific Fixes
iOS
- Fixed a bug where switching from Bluetooth to the iOS earpiece during a call does not have any effect or error.
- Fixed an issue where audio device types were incorrectly labeled using capitalized descriptions. I.e.
Earpiece
instead ofearpiece
. - Fixed return value of
Call.mute
andCall.hold
to return the new mute/hold value. Thanks to our community (@treycucco with PR #164) for this addition!
Android
IncomingCallService
now specifies foreground service type MICROPHONE onAPI >= 30
devices.
This fixes issues with microphone access for backgrounded apps.
Note that this change also resulted in the compiled SDK verison being bumped to33
from29
.
1.0.0-beta.2
1.0.0-beta.2 (June 23, 2023)
Twilio Voice React Native SDK has now reached milestone beta.2
. Included in this version are the following.
Fixes
- Pinned to a specific version of the Twilio Voice iOS SDK. This fixes issues with some builds failing on iOS platforms.
- Fixed the Intent flags on Android platforms. This fixes issues with the application crashing on newer versions of Android.
1.0.0-beta.1
1.0.0-beta.1 (March 10, 2023)
Twilio Voice React Native SDK is now in beta! Please see the following changes with this new release.
Additionally, we are also introducing the new Twilio Voice React Native Reference App as an example implementation of the Twilio Voice React Native SDK and serves to inspire developers who want to leverage the power of Twilio Programmable Voice in their React Native applications. Please see this page for more details.
Changes
- The integration testing app formerly under
example/
has been renamed/moved totest/app/
. - The React Native dependency within the integration testing app has been updated from
0.63.4
to0.66.5
.
API Changes
- The
voice.connect
method now has the following function signatureNot passing an options object or leaving any member of the options object undefined will result in those options using default values.voice.connect(token: string, options?: Voice.ConnectOptions); interface Voice.ConnectOptions { contactHandle?: string; params?: Record<string, string>; }
See the API documentation for descriptions of options here.
Features
- The SDK now exports error classes and emits error objects specific to an error code. See the below code snippet for usage.
See the API Docs for all error classes.
import { TwilioErrors } from '@twilio/voice-react-native-sdk'; // ... voice.on(Voice.Event.Error, (error: TwilioErrors.TwilioError) => { if (error instanceof TwilioErrors.AuthorizationErrors.AccessTokenInvalid) { // Update your UI to reflect an invalid access token. } // Alternatively, your application logic can use the error code. if (error.code === 20101) { // Update your UI to reflect an invalid access token. } });
Fixes
- Fixed an issue where some types on the
Call
andVoice
classes were being incorrectly exported. Types and references toaddEventListener
are instead now correctly exported asaddListener
. - Fixed an issue where available audio devices were sometimes incorrectly emitted and returned by the SDK on Android platforms. This occurs more frequently in development environments when the JS bundle is reloaded, but could happen in production environments as well.
- Fixed a warning that occurred on more recent versions of React Native when the SDK constructed a
NativeEventEmitter
. - Fixed an issue where devices running Android 12+ encountered crashes when receiving an incoming call or making an outgoing call.