Programmable Chat has been deprecated and is no longer supported. Instead, we'll be focusing on the next generation of chat: Twilio Conversations. Find out more about the EOL process here.
If you're starting a new project, please visit the Conversations Docs to begin. If you've already built on Programmable Chat, please visit our Migration Guide to learn about how to switch.
We recommend referencing this release per the below. As we release backwards-compatible patches, these references will automatically include fixes in your project.
dependencies { implementation 'com.twilio:chat-android:7.0.1' }
If you need help installing these frameworks in your project, see our installation guidance.
To enable tools like Firebase Crashalytics, our SDKs include symbol information for native components. In order to improve SDK troubleshooting, these symbols should be part of your build process. These will be stripped automatically from your final .apk
file, reducing download size.
Installing the Android SDK in your build environment also gives you the tightest possible .apk
file. Installing the NDK reduces the Chat SDK's footprint in your .apk
by as much as 20%.
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 7.x is the latest Android version.
Support for 6.x will cease on May 17, 2022. Please upgrade to the latest version
Support for 5.x ceased on July 20, 2021.
Support for 4.x ceased on March 5, 2021.
End-of-Life for 3.x occurred on December 10, 2020.
End-of-Life for 2.x occurred on April 10, 2020.
End-of-Life for 1.x occurred on June 30, 2019.
The following versions of the Programmable Chat Android SDK are deprecated and cannot be downloaded using the links below.
Please use Android SDK 5.1.1 or higher. The latest version has significant improvements and changes from the previous versions.
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.
da0c837ddbb47fd9971f801b8c3536696f1cb74d48d6b8d6bb4c9cc234d22f7e
onChannelAdded
event sometimes didn't arrive after restoring application from background
04457c2f02b13c9fe407841c86cc408144afcfcbf8f3133c9b63de96a4d91d24
Major under-the-hood improvement (the "Sessionless" protocol).
This improvement is designed primarily for improved reliability. While this is not a breaking code change, it does carry a meaningful impact on timing:
Channel.setAttributes()
will invoke completion (i.e., success) while
Channel.getAttributes()
still returns the old value. To see the new value, we recommend waiting for an update event via
ChatClientListener#onChannelUpdated
.
e403ee284d774285bfffc3ec5325872dcfbe3b2f26cba0fe69dbc004b908f575
f8d388cb4d3417efb5be67e589d2b85bbf9838f5d7ae2d3f074a6699a704a6a4
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:
1allprojects {2repositories {3mavenCentral()4}5}
c71270b35e1f17cb352e55958f7a2fc451cd31c6689b3906fc012cbf4f262916
ChatClient.Properties.Builder.setUseProxy()
.
onChanelDeleted
doesn't come for a private channel when a member is removed by another user.
v6.2.1
or newer, if you got runtime error:
java.lang.NoClassDefFoundError: Failed resolution of: Lcom/getkeepsafe/relinker/ReLinker
.
javax.net.ssl.SSLSocket
), resulting in a noticeable decrease in final application size compared to release 6.0.0.
setListener
to
addListener
.
removeListener()
to
removeListener(listener)
.
removeAllListeners()
.
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).
null
anymore. Returns actual value received from the backend instead.
Member.UpdateReason.LAST_CONSUMPTION_TIMESTAMP
.
Member.UpdateReason.ATTRIBUTES
(potentially silently breaking change if this value was serialized).
NotificationPayload.getMessageIndex()
and
NotificationPayload.INVALID_MESSAGE_INDEX
for retrieving the message index from push notifications.
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.
Message.Media.getContentTemporaryUrl()
to get a temporary direct link to Media content.
Message.Media.download(OutputStream)
is deprecated.
java.net.URL.readText()
.
The WebSocket message exceeded the locally configured limit
.
This version has been deprecated — please use 5.1.1.
This version has been deprecated June 1, please use 5.1.1.
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 uses
GCMToken
as a parameter type instead of
String
.
registerFCMToken()
/
unregisterFCMToken()
now uses
FCMToken
as a parameter type instead of
String
.
Here are examples of how code should be changed:
For attributes:
1JSONObject json = channel.getAttributes();2json.put("newKey", "newValue");3channel.setAttributes(json);
replace with:
1JSONObject json = channel.getAttributes().getJSONObject();2json.put("newKey", "newValue");3channel.setAttributes(new Attributes(json));
For GCM tokens:
1String token = getToken();2chatClient.registerGCMToken(token);3chatClient.unregisterGCMToken(token);
replace with:
1String token = getToken();2GCMToken gcmToken = new GCMToken(token);34chatClient.registerGCMToken(gcmToken);5chatClient.unregisterGCMToken(gcmToken);
For FCM tokens:
1String token = getToken();2chatClient.registerFCMToken(token);3chatClient.unregisterFCMToken(token);
replace with:
1String token = getToken();2FCMToken fcmToken = new FCMToken(token);34chatClient.registerFCMToken(fcmToken);5chatClient.unregisterFCMToken(fcmToken);
For older changelog entries, including 4.x, please see this changelog.