Menu

Rate this page:

Thanks for rating this page!

We are always striving to improve our documentation quality, and your feedback is valuable to us. How could this documentation serve you better?

3.x Changelog

3.0.0-preview6

October 30th, 2018

Enhancements

  • The Android Voice SDK is built with an audio only variant of WebRTC 67. The table below shows the size reduction from compiling with an audio only variant release:

    ABI 3.0.0-preview5 APK Size Impact 3.0.0-preview6 APK Size Impact
    universal 17.8MB 15.1MB
    armeabi-v7a 4MB 3.4MB
    arm64-v8a 4.6MB 3.9MB
    x86 4.9MB 4MB
    x86_64 4.9MB 4.1MB

Library Size Report

ABI APK Size Impact
universal 15.1MB
armeabi-v7a 3.4MB
arm64-v8a 3.9MB
x86 4MB
x86_64 4.1MB

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a client or PSTN number that have a long duration before answering may not get connected.
  • CLIENT-4943 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 Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4673 Error codes 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117
  • CLIENT-5242 Occasional native crash in AsyncTask of registration/unregistration and event publishing. The crash has only been observed on API 18 devices and results from a thread safety bug in Android. Similar crashes have been reported in the popular networking library OkHttp #1520 #1338. If this bug is impacting your applications, please open an issue on our quickstart and we will investigate potential fixes.

3.0.0-preview5

October 1st, 2018

Enhancements

  • Added custom parameters to CallInvite with a new method called getCustomParamaters().
// Pass custom parameters in TwiML
<?xml version="1.0" encoding="UTF-8"?>
    <Response>
        <Dial answerOnBridge="false" callerId="client:alice">
            <Client>
                <Identity>bob</Identity>
                <Parameter name="caller_first_name" value="alice"  />
                <Parameter name="caller_last_name" value="smith"  />
            </Client>
        </Dial>
    </Response>

callInvite.getCustomParameters() returns a map of key-value pair passed in the TwiML.

"caller_first_name" -> "alice"
"caller_last_name" -> "smith"

Library Size Report

ABI APK Size Impact
universal 17.8MB
armeabi-v7a 4MB
arm64-v8a 4.6MB
x86 4.9MB
x86_64 4.9MB

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a client or PSTN number that have a long duration before answering may not get connected.
  • CLIENT-4943 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 Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4673 Error codes 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117
  • CLIENT-5242 Occasional native crash in AsyncTask of registration/unregistration and event publishing. The crash has only been observed on API 18 devices and results from a thread safety bug in Android. Similar crashes have been reported in the popular networking library OkHttp #1520 #1338. If this bug is impacting your applications, please open an issue on our quickstart and we will investigate potential fixes.

3.0.0-preview4

September 27th, 2018

Enhancements

  • Upgraded to WebRTC 67
  • Upgraded to Java 8. Add the following snippet to your build.gradle to enable Java 8 features required to build the 3.x Voice Android SDK:

    Groovy android { compileOptions { sourceCompatibility 1.8 targetCompatibility 1.8 } } - Report registration and unregistration events to Twilio Insights.

Library Size Report

ABI APK Size Impact
universal 18.1MB
armeabi-v7a 4.1MB
arm64-v8a 4.7MB
x86 5MB
x86_64 5MB

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a client or PSTN number that have a long duration before answering may not get connected.
  • CLIENT-4943 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 Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117
  • CLIENT-5242 Occasional native crash in AsyncTask of registration/unregistration and event publishing. The crash has only been observed on API 18 devices and results from a thread safety bug in Android. Similar crashes have been reported in the popular networking library OkHttp #1520 #1338. If this bug is impacting your applications, please open an issue on our quickstart and we will investigate potential fixes.

3.0.0-preview3

September 4th, 2018

Enhancements

API Changes:
  • Nullability annotations have been added. Methods that expect @NonNull parameters throw NullPointerException. Methods that validate parameters for a specified input throw IllegalStateException if invalid.
  • Moved CallState to Call.State
  • Provide a stateless mechanism for processing push messages related to call invites and call invite cancellations. This API no longer raises errors when processing invalid messages, instead a boolean value is returned when handleMessage(context, data) is called. The boolean value is true when the provided data results in a CallInvite or CancelledCallInvite. If handleMessage(context, data) returns false it means the data provided was not a Twilio Voice push message. The CallInvite has an accept() and reject() method. While the CancelledCallInvite simply provides the to, from, and callSid fields also available in the CallInvite. The method getCallSid() can be used to associate a CallInvite with a CancelledCallInvite.
  • Migrated the API CallInvite to CallInvite and CancelledCallInvite.
       // Processing push messages in 2.X
       handleMessage(context, data, new MessageListener() {
           @Override
           void onCallInvite(CallInvite callInvite) {
                 // Check state and process invite
                 if (callInvite.getState().equals(PENDING)) {
                     // Show notification to answer or reject call
                 } else if(callInvite.getState().equals(CANCELLED)) {
                     // Hide notification
                 }
           }

           @Override
           void onError(MessageException messageException) {
               // Invalid data was provided
           }
       });

       // Processing push messages in 3.X
       boolean handled = handleMessage(context, data, new MessageListener() {
           @Override
           void onCallInvite(CallInvite callInvite) {
               // Show notification to answer or reject call
           }

           @Override
           void onCancelledCallInvite(CancelledCallInvite callInvite) {
               // Hide notification
           }
       });

       if(!handled) {
           // This message is not a Twilio voice push message
       }
  • Introduced call.getStats() method that returns a list of StatsReport with metrics for all the audio tracks in a call.
    call.getStats(new StatsListener() {
        @Override
        public void onStats(@NonNull List<StatsReport> statsReports) {
            // Process statsReports
        }
    });

Library Size Report

ABI APK Size Impact
universal 20.7MB
armeabi-v7a 4.5MB
arm64-v8a 5.4MB
x86 5.8MB
x86_64 5.5MB

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a client or PSTN number that have a long duration before answering may not get connected.
  • CLIENT-4943 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 Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4698 Params that are passed to your TwiML Application while making calls are not URL encoded
  • CLIENT-4547 Insights is not published
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117
  • CLIENT-5242 Occasional native crash in AsyncTask of registration/unregistration and event publishing. The crash has only been observed on API 18 devices and results from a thread safety bug in Android. Similar crashes have been reported in the popular networking library OkHttp #1520 #1338. If this bug is impacting your applications, please open an issue on our quickstart and we will investigate potential fixes.

3.0.0-preview2

August 27th, 2018

Enhancements

API Changes:
  • Introduced CallState.RINGING
  • Introduced a new callback method Call.Listener.onRinging(). This callback is emitted once before the Call.Listener.onConnected() callback when the callee is being alerted of a Call. The behavior of this callback is determined by the answerOnBridge flag provided in the Dial verb of your TwiML application associated with this client. If the answerOnBridge flag is false, which is the default, the Call.Listener.onConnected() callback will be emitted immediately after Call.Listener.onRinging(). If the answerOnBridge flag is true, this will cause the call to emit the onConnected callback only after the call is answered. See answeronbridge for more details on how to use it with the Dial TwiML verb. If the twiML response contains a Say verb, then the call will emit the Call.Listener.onConnected callback immediately after Call.Listener.onRinging() is raised, irrespective of the value of answerOnBridge being set to true or false

Library Size Report

ABI APK Size Impact
universal 20.7MB
armeabi-v7a 4.5MB
arm64-v8a 5.4MB
x86 5.8MB
x86_64 5.5MB

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a client or PSTN number that have a long duration before answering may not get connected.
  • CLIENT-4943 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 Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4698 Params that are passed to your TwiML Application while making calls are not URL encoded
  • CLIENT-4547 Insights is not published
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117
  • CLIENT-5242 Occasional native crash in AsyncTask of registration/unregistration and event publishing. The crash has only been observed on API 18 devices and results from a thread safety bug in Android. Similar crashes have been reported in the popular networking library OkHttp #1520 #1338. If this bug is impacting your applications, please open an issue on our quickstart and we will investigate potential fixes.

3.0.0-preview1

August 15th, 2018

This is the first WebRTC based release using Chromium WebRTC 57.

This SDK introduces ConnectOptions and AcceptOptions to allow developers to make behavioral changes associated with a Call.

This SDK allows multiple active Calls to be managed by the application.

Enhancements

API Changes:
  • Migrated the enum PJSIP in LogModule to a more granular set of enums (CORE, PLATFORM, SIGNALING and WEBRTC)
  • Introduced ConnectOptions to allow developers to make behaviorial changes associated with the call
  • Migrated the API to make a Call from Voice.call(...) to Voice.connect(...)
// Making a call in 2.X
 Voice.call(context, accessToken, params, listener);

// Making a call in 3.X
ConnectOptions connectOptions = new ConnectOptions.Builder(accessToken)
            .setParams(params)
                    .build();
Voice.connect(context, connectOptions, listener);
  • Migrated the API to accept a CallInvite using AcceptOptions
// Accepting a call in 2.X
CallInvite.accept(context, listener);

// Accepting a call in 3.X
AcceptOptions acceptOptions = new AcceptOptions.Builder()
            .build();
CallInvite.accept(context, acceptOptions, listener);
  • Introduced call holding via Call.hold(boolean) feature
  • Migrated Voice.setRegion(String) to ConnectOptions.Builder.region(String) and AcceptOptions.Builder.region(String)
  • Migrated Voice.getRegion() to ConnectOptions.getRegion() and AcceptOptions.getRegion()

Library Size Report

ABI APK Size Impact
universal 20.7MB
armeabi-v7a 4.5MB
arm64-v8a 5.4MB
x86 5.8MB
x86_64 5.5MB

Known issues

  • CLIENT-5075 The SDK cannot be added alongside the Programmable Video SDK.
  • CLIENT-5062 Calls made to a client or PSTN number that have a long duration before answering may not get connected.
  • CLIENT-4943 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 Travarsal Service.
  • CLIENT-4805 The SDK size is significantly larger than 2.x. A reduced size will be introduced during the beta period.
  • CLIENT-4998 Network handoff, and subsequent connection renegotiation is not supported.
  • CLIENT-2985 IPv6 is not supported.
  • CLIENT-4698 Params that are passed to your TwiML Application while making calls are not URL encoded
  • CLIENT-4547 Insights is not published
  • CLIENT-4672, CLIENT-4673 Error codes 20157 and 20151 report different message and explanation text than Voice 2.0 SDKs
  • CLIENT-4537 PCMU is the only supported codec. We plan on adding support for Opus moving forward. #117
  • CLIENT-5242 Occasional native crash in AsyncTask of registration/unregistration and event publishing. The crash has only been observed on API 18 devices and results from a thread safety bug in Android. Similar crashes have been reported in the popular networking library OkHttp #1520 #1338. If this bug is impacting your applications, please open an issue on our quickstart and we will investigate potential fixes.

Need some help?

We all do sometimes; code is hard. Get help now from our support team, or lean on the wisdom of the crowd browsing the Twilio tag on Stack Overflow.

Loading Code Sample...