Menu

Expand
Rate this page:

Changelog: Twilio Chat Android SDK

We intend to sunset the Programmable Chat API on July 25, 2022 to focus on the next generation of chat: the Twilio Conversations API. Learn more. We have also prepared this Migration Guide to assist in the transition from Chat to Conversations.

Twilio Programmable Chat SDKs use Semantic Versioning. 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.

Support for 4.x ceased on March 5, 2021. Please upgrade to the latest version.

Support for 3.x ceased on December 10, 2019. Please upgrade to the latest version.

Support for 2.x ceased on April 10, 2019. Please upgrade to the latest version.

End-of-Life for 1.x occured on June 30, 2019. Please upgrade to the latest version.

Latest releases for the Programmable Chat Android SDK

We recommend using these links in your projects. As we patch bugs, these links will automatically be updated with the fixes.

Programmable Chat Android v6.2

  • [aar] Downloadable Chat SDK archive.
  • [docs] Chat SDK documentation, hosted on Twilio CDN.

Upgrade to Programmable Chat Android SDK v5.1.1 or higher

The following versions of the Programmable Chat Android SDK are deprecated and cannot be downloaded using the links below.

  • v5.0.1 and v5.1.0
  • v4.2.1, v4.2.2, and v4.2.3

Please use Android SDK v5.1.1 or higher. The latest version has significant improvements and changes from the previous versions.

Install the Android NDK

Our SDKs use native components that include symbol information to enable tools like Fabric’s Crashlytics. In order to improve SDK troubleshooting, these symbols should be part of your build process, but they must eventually be stripped from your final .apk file to reduce download size.

In order to produce the most compact .apk file, you must install the Android NDK on your build machine. Just by having it installed, symbol stripping will take place and you’ll have the tightest .apk file possible.

AccessManager deprecation

With the release of Chat Android SDK 4.0.0, the standalone AccessManager is no longer necessary; its functionality is now integrated into the Chat SDK. Your old implementations that use AccessManager will continue to operate normally, until you implement two new methods on ChatClientListener: onTokenAboutToExpire() and onTokenExpired(). After that you can safely remove AccessManager from your project.

In response to these new delegate methods, you should get a fresh token and add it to your ChatClient instance by calling its updateToken() method.

Changelogs

Links are provided to specific patch versions here. We don’t recommend using these links unless you have a specific need for a certain patch.


Programmable Chat Android 6.2.1 (Mar 17, 2021)

  • [aar] sha256:f8d388cb4d3417efb5be67e589d2b85bbf9838f5d7ae2d3f074a6699a704a6a4
  • [docs]

Changes

  • Reduced SDK footprint
  • Fixed a bug when user update event with reason ReachabilityOnline is not received in some cases

Starting from this release all artifacts are published on mavenCentral instead of jcenter. Root build.gradle have to be updated by adding mavenCentral() repository:

allprojects {
    repositories {
        mavenCentral()
    }
}

Programmable Chat Android 6.2.0 (Nov 20, 2020)

Changes

  • Added connection via proxy support. See ChatClient.Properties.Builder.setUseProxy()
  • Fixed a bug when onChanelDeleted doesn't come for private channel when member removed by other user
  • Fixed a bug which could lead to client synchronisation stuck

Known issues

  • Update to v6.2.1 or newer, if you got runtime error: java.lang.NoClassDefFoundError: Failed resolution of: Lcom/getkeepsafe/relinker/ReLinker

Programmable Chat Android 6.1.1 (Oct 21, 2020)

[aar] [docs] [javadocs]

Changes

  • Fixed a bug which could lead to crashes on member attributes update

Programmable Chat Android 6.1.0 (Jul 30, 2020)

[aar] [docs] [javadocs]

Changes

  • SDK has switched to android native SSLSocket implementation (javax.net.ssl.SSLSocket), resulting in a noticeable decrease in final application size compared to previous release 6.0.0.

Programmable Chat Android 6.0.0 (Jul 20, 2020)

[aar] [docs] [javadocs]

Breaking Changes

  • ChatClient can now have multiple observers.
    • Renamed setListener to addListener
    • Changed removeListener() to removeListener(listener)
    • Added removeAllListeners()
  • Now Channel.getUnconsumedMessagesCount() returns null instead of 0 if the message consumption horizon was not set.
    • Messages.setNoMessagesConsumedWithResult() always returns null instead of 0 (because it resets the consumption horizon).
  • Media message body is not hardcoded to always return null anymore. Returns actual value received from the backend instead.
  • Added Member.UpdateReason.LAST_CONSUMPTION_TIMESTAMP.
    • This as a result also changed the value of Member.UpdateReason.ATTRIBUTES (potentially silently breaking change if this value was serialized).

Changes

  • Added NotificationPayload.getMessageIndex() and NotificationPayload.INVALID_MESSAGE_INDEX for retrieving the message index from push notifications.
  • Exposed Message.dateUpdated, dateUpdatedAsDate and lastUpdatedBy.
    • lastUpdatedBy will be null if messages were not edited, or it will contain the identity of the last user who edited this message.
  • Added Message.Media.getContentTemporaryUrl() to get a temporary direct link to Media content.
    • Message.Media.download(OutputStream) is deprecated.
    • To download Media by direct URL, use some external mechanism, such as Android Download Manager or java.net.URL.readText().

Programmable Chat Android 5.1.1 (Jun 1, 2020)

[aar] [docs] [javadocs]

Changes

  • Fixed the bug when connection is dropped with message: "The WebSocket message exceeded the locally configured limit"

Programmable Chat Android 5.1.0 (May 20, 2020)

This version has been deprecated June 1, please use 5.1.1.

[aar] [docs] [javadocs]

Changes

  • Added ability to specify custom command timeout for operations like send message, join to a channel, etc.

Programmable Chat Android 5.0.1 (Apr 2, 2020)

This version has been deprecated June 1, please use 5.1.1.

[aar] [docs] [javadocs]

Changes

  • Improved stability, fixed crashes.

Programmable Chat Android 5.0.0 (Mar 5, 2020)

[aar] [docs] [javadocs]

Breaking changes

  • Introduced a type-safe interface Attributes for Channel, Message, Member and User. Attributes type allows attributes to be represented as JSON types JSONObject, JSONArray, String, Number or NULL. You could query attributes to understand what type you've received.
  • registerGCMToken()/unregisterGCMToken() now use GCMToken as a parameter type instead of String
  • registerFCMToken()/unregisterFCMToken() now use FCMToken as a parameter type instead of String

Here are the examples of how code should be changed:

For attributes:

JSONObject json = channel.getAttributes();
json.put("newKey", "newValue");
channel.setAttributes(json);

replace with

JSONObject json = channel.getAttributes().getJSONObject();
json.put("newKey", "newValue");
channel.setAttributes(new Attributes(json));

For GCM tokens:

String token = getToken();
chatClient.registerGCMToken(token);
chatClient.unregisterGCMToken(token);

replace with

String token = getToken();
GCMToken gcmToken = new GCMToken(token);

chatClient.registerGCMToken(gcmToken);
chatClient.unregisterGCMToken(gcmToken);

For FCM tokens:

String token = getToken();
chatClient.registerFCMToken(token);
chatClient.unregisterFCMToken(token);

replace with

String token = getToken();
FCMToken fcmToken = new FCMToken(token);

chatClient.registerFCMToken(fcmToken);
chatClient.unregisterFCMToken(fcmToken);

Bug fixes:

  • Fixed incorrect behavior when user identity contained a back-tick character (`)
  • Fixed unregistering from notifications while offline

4.X

For older changelog entries including 4.x, click Changelog

Rate this page:

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.

        
        
        

        Thank you for your feedback!

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

        Sending your feedback...
        🎉 Thank you for your feedback!
        Something went wrong. Please try again.

        Thanks for your feedback!

        Refer us and get $10 in 3 simple steps!

        Step 1

        Get link

        Get a free personal referral link here

        Step 2

        Give $10

        Your user signs up and upgrade using link

        Step 3

        Get $10

        1,250 free SMSes
        OR 1,000 free voice mins
        OR 12,000 chats
        OR more