Skip to contentSkip to navigationSkip to topbar
On this page

Voice Android SDK Changelog



Welcome to the Programmable Voice Android SDK

welcome-to-the-programmable-voice-android-sdk page anchor

The Twilio Programmable Voice SDKs allow you to add voice-over-IP (VoIP) calling into your native Android applications. See Android Getting Started Guide(link takes you to an external page) to begin using the SDK.

(information)

Info

As of June 2023, legacy Firebase Cloud Messaging (FCM) credentials have been deprecated and will be removed in June 2024, please upgrade to FCM v1 credentials as soon as possible. The Android Voice SDK already supports FCM v1 credentials and a migration guide(link takes you to an external page) has been prepared to help aid developers through the process. For information about the deprecation, please visit Google's announcement(link takes you to an external page).

(warning)

Warning

The Twilio Programmable Voice SDKs use Semantic Versioning(link takes you to an external page). Twilio supports version N-1 for 12 months after the first GA release of version N. We recommend that you upgrade to the latest version as soon as possible to avoid any breaking changes. Version 6.x is the latest Android version.


Dec 3rd 2024

Bug Fixes

bug-fixes page anchor
  • Fixed a bug where the signaling library was throwing an exception while initiating a call with per-app based VPN enabled.
ABIAPK Size Impact
x864.5MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4.1MB
universal16MB

Oct 21st 2024

  • New API Voice.runPreflight(@NonNull final Context context, @NonNull final String accessToken, @NonNull final PreflightTest.Listener listener) to run a preflight test is added.
  • A new class PreflightOptions is added. A const reference to this class type needs to be passed as the first argument to the runPreflight() method. An instance of this class can be constructed using the PreflightOptions.Builder. Setting the accessToken to run preflight test is mandatory. Following are the optional APIs for the PreflightOptions.Builder class.
1
Builder setIceOptions(@NonNull IceOptions iceOptions);
2
Builder setPreferredAudioCodecs(@NonNull List<AudioCodec> preferredAudioCodecs);

The API documentation for the above-mentioned methods can be found in the PreflightOptions.Builder class.

  • A new PreflightTest.Listener interface is added. It needs to be provided as the third argument to the runPreflight() method. This interface provides the callbacks for the PreflightTest. Implement the following callbacks to receive callbacks during the preflight test and to receive the PreflightReport when the test is completed. The report is a JSONObject containing the details of its findings.
1
void onPreflightCompleted(@NonNull final PreflightTest preflightTest, @NonNull final JSONObject report);
2
void onPreflightFailed(@NonNull final PreflightTest preflightTest, @NonNull final CallException error);
3
void onPreflightConnected(final PreflightTest preflightTest);
4
void onPreflightWarning(@NonNull final PreflightTest preflightTest,
5
@NonNull final Set<Call.CallQualityWarning> currentWarnings,
6
@NonNull final Set<Call.CallQualityWarning> previousWarnings);
7
void onPreflightSample(@NonNull final PreflightTest preflightTest, @NonNull final JSONObject sample);

The API documentation for the above-mentioned methods can be found in the PreflightTest.Listener interface.

  • Voice.runPreflight() method returns a PreflightTest object. Following APIs can be used to access different properties of underlying Call and PreflightTest object.
1
void stop();
2
String getCallSid();
3
long getStartTime();
4
long getEndTime();
5
JSONObject getLatestSample();
6
JSONObject getReport();
7
PreflightTest.State getState();

Please note stop() method can be used to prematurely disconnect a PreflightTest resulting in a failure. Please refer to the API documentation of the PreflightTest class for more details.

ABIAPK Size Impact
x864.5MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4.1MB
universal16MB

Sep 10th 2024

  • The Voice SDK now supports Server Name Indication (SNI) during initial TLS handshake with Twilio infrastructure.
  • The CallMessage.Builder.setContentType() API has no effect on the content type of the Call Message object. The content type always defaults to application/json.
ABIAPK Size Impact
x864.4MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.7MB

Sep 3rd 2024

  • Added support for Android 15 with 16k memory page sizes.

Known Issues

known-issues-1 page anchor
  • The CallMessage.Builder.setContentType() API has no effect on the content type of the Call Message object. The content type always defaults to application/json.
ABIAPK Size Impact
x864.3MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

Aug 26th 2024

  • The Call Message Events (Beta), originally released in 6.3.3, has been promoted to GA. This release includes the following breaking changes from the beta.
    • Changed error code 31209 to 31212. This error code is emitted when a call message payload exceeds the authorized limit.
    • Call Message types (CallMessage.messageType) are treated as strings instead of enumerated values.
      • The SDK no longer validates CallMessage.messageType and acts as a pass through for unknown message types in both directions (messages received by the SDK and those sent by the SDK).
      • To send a user defined message, the sendMessage() API should be invoked with a CallMessage object where the messageType is set to one of the supported message types from https://www.twilio.com/docs/voice/sdks/call-message-events(link takes you to an external page)
      • Added new error code 31210 for invalid call message type when sendMessage() API is invoked with a CallMessage object where the messageType is not set to user-defined-message.
    • Call.CallMessageListener methods have been updated to include the CallSid, which is a unique identifier for the Call or the CallInvite. The updated APIs are:
1
public interface CallMessageListener {
2
3
void onMessageReceived(final String callSid, final CallMessage callMesssage);
4
5
void onMessageSent(final String callSid, final String voiceEventSID);
6
7
void onMessageFailure(final String callSid, final String voiceEventSID, final VoiceException error);
8
}
  • Fixed issue preventing execution on Android API 21-23 devices starting with version 6.3.0.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
  • The CallMessage.Builder.setContentType() API has no effect on the content type of the Call Message object. The content type always defaults to application/json.
ABIAPK Size Impact
x864.3MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

June 3rd, 2024

  • Added new error code 31211 when sendMessage() API is invoked with a CallMessage object using the CallInvite object when the CallInvite is not reached the Ringing state yet. onMessageFailure() callback will be invoked in this case with the above mentioned error code.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.3MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

May 21st, 2024

  • New constant-audio-output-level call quality warning added. This warning is triggered when the audio received is of a constant volume and can be used to determine when someone is speaking. Please note, if the remote party mutes the audio track or places the call on hold, this warning will still be raised.
  • Metrics and events reported to Twilio Insights is now encoded via gzip to reduce transmission bandwidth.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.3MB
x86_644.3MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

April 15th, 2024

  • Increased sampling resolution of Voice Insights call quality metrics events.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864.3MB
x86_644.2MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

Mar 12th, 2024

  • A new AudioOptions API has been added, enabling audio processing operations on the local audio track/source.
    • Audio processing operations include Echo Cancellation, Automatic Gain Control, Noise Suppression, High Pass Filtering, setting jitter buffer max size in packets, and setting jitter buffer min delay in milliseconds (msec).
    • By default, all audio processing operations are enabled (set to true), the jitter buffer's maximum size is 200 packets, and the jitter buffer's minimum delay is 0 msec.
    • The default values can be modified and custom AudioOptions can be set as part of ConnectOptions when making outbound calls and/or as part of AcceptOptions when receiving incoming calls.
  • Example of customized AudioOptions when making an outbound call - In this example, Automatic Gain Control and High Pass Filtering are disabled, jitter buffer max size is set to 100 packets and jitter buffer min delay is set to 5 msec.
1
connectOptions = new ConnectOptions.Builder(accessToken)
2
.iceOptions(iceOptions)
3
.audioOptions(new AudioOptions.Builder()
4
.autoGainControl(false)
5
.highpassFilter(false)
6
.audioJitterBufferMaxPackets(100)
7
.audioJitterBufferMinDelayMs(5)
8
.build())
9
.build();
10
Voice.connect(context, connectOptions, callListener);
  • Example of customized AudioOptions when receiving an incoming call - In this example, Echo Cancellation and Noise Suppression are disabled, and jitter buffer max size is set to 50 packets.
1
acceptOptions = new AcceptOptions.Builder()
2
.iceOptions(iceOptions)
3
.audioOptions(new AudioOptions.Builder()
4
.echoCancellation(false)
5
.noiseSuppression(false)
6
.audioJitterBufferMaxPackets(50)
7
.build())
8
.build();
9
callInvite.accept(context, acceptOptions, callListener);
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

The following table outlines the APK size impact for different Application Binary Interfaces (ABIs):

ABIAPK Size Impact
x864.3MB
x86_644.2MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

Feb 12th, 2024

  • Call.CallMessageListener methods have been updated to include the CallSid, which is a unique identifier for the Call or the CallInvite. The updated APIs are:
1
public interface CallMessageListener {
2
3
void onMessageReceived(final String callSid, final CallMessage callMesssage);
4
5
void onMessageSent(final String callSid, final String voiceEventSID);
6
7
void onMessageFailure(final String callSid, final String voiceEventSID, final VoiceException error);
8
9
}
  • LogParameters class includes a Throwable field named tr. This allows us to log stack traces from Exceptions and other Throwable objects.
  • LogParameters objects can now be constructed using LogParameters.Builder() that utilizes a builder pattern avoiding multi argument cumbersome direct constructors.
  • The existing constructors for LogParameters have been deprecated in favor of construction using LogParamters.Builder() and will be removed in the next major release.
  • Removed dead/unused c/c++ jni method, Java_com_twilio_voice_JniUtils_nativeJavaUtf16StringToStdString. This is somewhat related to github issue 572(link takes you to an external page).
  • Added new Call Exception, InvalidCallerIdException that happens when a call is attempted with an invalid caller id error 13214.
  • Report the usage of Default Logger or Custom Logger to Twilio Insights. It only reports the type of Logger but not the actual log messages.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.3MB
x86_644.2MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

Nov 30th, 2023

  • Upgraded to use WebRTC-112.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.3MB
x86_644.2MB
armeabi-v7a3.4MB
arm64-v8a4MB
universal15.6MB

Nov 9th, 2023

  • The SDK now supports sending and receiving in-call user-defined messages. Use the Call::sendMessage(...) method to send messages. Endpoints subscribed to the events of the call will be receiving the messages. The CallMessageInterface::onReceiveMessage(...) callback will be raised to the application when a message is received by the client. Please visit this page for more details about this feature. Additionally, please see the following for more information on how to send and receive messages on the server. This feature is currently in Beta. Example below.
1
private static class TestCallMessageObserver implements Call.CallMessageListener {
2
@Override
3
public void onMessageReceived(CallMessage callMesssage) {
4
Log.d("[test]", "Call Message received");
5
}
6
@Override
7
public void onMessageSent(String voiceEventSID) {
8
Log.d("[test]", "Call Message:" + voiceEventSID + " sent");
9
}
10
@Override
11
public void onMessageFailure(String voiceEventSID, VoiceException error) {
12
Log.d("[test]", "Call Message: " + voiceEventSID + " failed to send: " + error.getMessage());
13
}
14
}
15
.
16
.
17
.
18
// register notification callbacks upon connect
19
ConnectOptions cxnOptions = new ConnectOptions.Builder(accessToken))
20
.callMessageListener(new TestCallMessageObserver())
21
.build();
22
Call call = Voice.connect(context, connectOptions, new Call.Listener() {...});
23
.
24
.
25
.
26
// send a message
27
final CallMessage callMessage = (
28
new CallMessage.Builder(CallMessage.MessageType.UserDefinedMessage))
29
.contentType("application/json")
30
.content((new JSONObject())
31
.put("foo", "bar")
32
.toString())
33
.build();
34
call.sendMessage(callMessage);
35
.
36
.
37
.
38
// receive call message before accpeting invite
39
Voice.handleMessage(this, data, new TestCallMessageObserver());
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.8MB
x86_644.8MB
armeabi-v7a3.6MB
arm64-v8a4.5MB
universal17.4MB

Oct 2nd, 2023

  • Adds a thread member to LogParameters class. The thread member contains the name (or id) of the thread where the log message was generated.
  • Fixed a crash when the incoming call listener goes out of scope after timeout.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.8MB
x86_644.8MB
armeabi-v7a3.6MB
arm64-v8a4.5MB
universal17.4MB

Sept 5th, 2023

  • Provides a LoggerInterface interface. This interface contains a log method that is invoked with a LogParameters object every time a log message becomes available. The LogParameters object contains all the information relevant to the log message being delivered.
  • The Android SDK internally implements the LoggerInterface to provide default logging capabilities to stdout using android.util.Log.
  • Provides a Voice.SetLogger(LoggerInterface) method that allows setting a custom logger that conforms to LoggerInterface to which log messages will be delivered.
  • Provides a Voice.GetLogger() method that returns the logger that was previously set with setLogger. If no custom logger was set, this method returns the default logger currently used by the SDK.
  • Users can send their messages to be logged by the SDK using Voice.GetLogger().log(LogParameters). This logs the message using the SDK's default logger.
  • Users can also implement custom loggers that conform to LoggerInterface to customize the logging mechanism, for eg., logging to a file, sending the logs to a server, etc.
  • The existing Logger class is deprecated and will be removed in the next major version release.
  • Starting with SDK version 6.3.0, the required Android SDK version is 24 not 21. This issue is fixed as of SDK version 6.6.2.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.

Size Report

ABIAPK Size Impact
x864.8MB
x86_644.8MB
armeabi-v7a3.6MB
arm64-v8a4.5MB
universal17.3MB

June 23rd, 2023

Fixed a bug where the incoming call invite could only ring up to 3 minutes instead of the maximum 10 minutes call timeout.

  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864.8MB
x86_644.8MB
armeabi-v7a3.6MB
arm64-v8a4.5MB
universal17.3MB

June 12th, 2023

  • Upgraded to use WebRTC-105.
  • AudioOption, typing_detection is now deprecated, no longer supported by WebRTC.
  • Fixed a crash when using an external audio device due to JAVA stack frame not being constructed.
  • Fixed a crash due to file handle exhaustion.
  • Fixed memory leaks regarding WebRTC shutdown & lingering Media Factory references.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864.8MB
x86_644.8MB
armeabi-v7a3.6MB
arm64-v8a4.5MB
universal17.3MB

July 11th, 2022

  • New edge umatilla is now supported. Set the Voice.setEdge(...) property before connecting or accepting the call.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.9MB

May 26th, 2022

  • Fixed a crash when the home region specifier (twr) in the access token is null.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.9MB

May 9th, 2022

  • The Voice Android SDK now supports Twilio Regional by providing the home region specifier in the access token header when calling the Voice.register() method, the Voice.unregister() method, or the Voice.connect() method.

Existing customers can now migrate their Voice use-cases to data centers in Ireland or Australia to establish data residency within the region. In addition, new customers may now select Ireland or Australia as their region of choice for Voice related use cases. There is no additional cost to use the new data centers in Ireland or Australia. To learn more about Regional Voice, check out our blog post(link takes you to an external page) or head over to our developer docs to get started.

Below is an example of specifying home region in the access token using the Twilio Node.js(link takes you to an external page) helper library:

1
const accessToken = new twilio.jwt.AccessToken(
2
credentials.accountSid,
3
credentials.apiKeySid,
4
credentials.apiKeySecret, {
5
identity,
6
ttl,
7
region: 'au1',
8
},
9
);

The decoded header of your access token should look like this:

1
{
2
"alg": "HS256",
3
"typ": "JWT",
4
"cty": "twilio-fpa;v=1",
5
"twr": "au1"
6
}
  • The SDK compileSDKVersion and targetSDKVersion were updated to 31.
  • Updated getStats(...) API doc.
  • Fixed IceCandidatePairStats javadoc. Added responsesSent attribute to IceCandidatePairStats.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.9MB

February 8th, 2022

  • Upgraded SDK to build with Java 11.
  • Updated the SDK to Android Gradle Plugin 7.0.4.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.9MB

November 19, 2021

  • Updated the SDK to Android Gradle Plugin 4.2.2.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.8MB

November 5, 2021

  • Upgraded the SDK to use AndroidX.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.8MB

November 2, 2021

  • The minimum Android SDK version has been increased from 16 to 21.
  • The voice SDK now validates full remote domain names while setting up the TLS connection.
  • Restrictive networks may fail unless ICE servers are provided via ConnectOptions.Builder.iceOptions(...) or AcceptOptions.Builder.iceOptions(...). ICE servers can be obtained from Twilio Network Traversal Service.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_644MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.8MB

May 24, 2021

  • This release is based on Chromium WebRTC 88.
  • The SDK uses Unified Plan SDP semantics instead of Plan-B.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x864MB
x86_643.9MB
armeabi-v7a3.3MB
arm64-v8a3.8MB
universal14.8MB

March 29, 2021

  • Voice Android artifacts are now published to MavenCentral instead of Bintray.

    • Ensure to include mavenCentral() listed in your project's buildscript repositories section:

      1
      buildscript {
      2
      repositories {
      3
      mavenCentral()
      4
      ...
      5
      }
      6
      }
  • Voice Android SDK now publishes the checksum in the release notes.

  • Fixed a crash when onNetworkChanged was called during the teardown process.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.
ABIAPK Size Impact
x863.9MB
x86_643.9MB
armeabi-v7a3.2MB
arm64-v8a3.7MB
universal14.4MB

March 11, 2021

  • Fixed a potential bug in the core module where the Logger could be accessed after being destroyed by another thread.
  • Releases prior to 6.6.3 do not support Android 15 with 16k pages.