# Changelog: Twilio Chat Android SDK

> \[!CAUTION]
>
> 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](https://www.twilio.com/en-us/changelog/programmable-chat-end-of-life-notice).
>
> If you're starting a new project, please visit the [Conversations Docs](/docs/conversations) to begin. If you've already built on Programmable Chat, please visit our [Migration Guide](/docs/conversations/migrating-chat-conversations) to learn about how to switch.

## Latest Release: 7.0.1

We recommend referencing this release per the below. As we release backwards-compatible patches, these references will automatically include fixes in your project.

* **Gradle** `dependencies {
   implementation 'com.twilio:chat-android:7.0.1'
  }`
* **Maven**\
  See [the chat-android Maven Central page](https://search.maven.org/artifact/com.twilio/chat-android/7.0.1/aar) for download links.
* **[SDK Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/7.0.1/docs/)**

If you need help installing these frameworks in your project, see our [installation guidance](/docs/chat/sdk-download-install).

> \[!NOTE]
>
> To enable tools like [Firebase Crashalytics](https://firebase.google.com/docs/crashlytics), 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%.

## Support for Previous Versions of the Chat SDKs

Twilio Programmable Chat SDKs use [Semantic Versioning](https://www.semver.org/). 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.**

> \[!WARNING]
>
> The following versions of the Programmable Chat Android SDK are deprecated and cannot be downloaded using the links below.
>
> * 5.0.1 and 5.1.0
> * 4.2.1, 4.2.2, and 4.2.3
>
> Please use **Android SDK 5.1.1** or higher. The latest version has significant improvements and changes from the previous versions.

## 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 7.0.1 *(Aug 31, 2021)*

* [aar](https://media.twiliocdn.com/sdk/android/chat/releases/7.0.1/twilio-chat-android-7.0.1.aar) sha256:`da0c837ddbb47fd9971f801b8c3536696f1cb74d48d6b8d6bb4c9cc234d22f7e`
* [Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/7.0.1/docs/)

#### Changes

* Fixed a bug when `onChannelAdded` event sometimes didn't arrive after restoring application from background

***

### Programmable Chat Android 7.0.0 *(May 17, 2021)*

* [aar](https://media.twiliocdn.com/sdk/android/chat/releases/7.0.0/twilio-chat-android-7.0.0.aar) sha256:`04457c2f02b13c9fe407841c86cc408144afcfcbf8f3133c9b63de96a4d91d24`
* [Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/7.0.0/docs/)

#### Breaking Changes

* 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:

  * SDK commands will return success or failure up to \~10% more quickly than before.
  * **Real-time updates of data are now likely to arrive *after* the command completes**.\
    For example, `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`.

### Programmable Chat Android 6.2.2 *(Apr 27, 2021)*

* [aar](https://media.twiliocdn.com/sdk/android/chat/releases/6.2.2/twilio-chat-android-6.2.2.aar) sha256:`e403ee284d774285bfffc3ec5325872dcfbe3b2f26cba0fe69dbc004b908f575`
* [Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/6.2.2/docs/)

#### Changes \[#changes-2]

* Fixed a reconnection issue after restoring application from background.

***

### Programmable Chat Android 6.2.1 *(Mar 17, 2021)*

* [aar](https://media.twiliocdn.com/sdk/android/chat/releases/6.2.1/twilio-chat-android-6.2.1.aar) sha256:`f8d388cb4d3417efb5be67e589d2b85bbf9838f5d7ae2d3f074a6699a704a6a4`
* [Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/6.2.1/docs/)

#### Changes \[#changes-3]

* 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:

```bash
allprojects {
    repositories {
        mavenCentral()
    }
}
```

***

### Programmable Chat Android 6.2.0 *(Nov 20, 2020)*

* [aar](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.2.0%2Fchat-android-6.2.0.aar) sha256:`c71270b35e1f17cb352e55958f7a2fc451cd31c6689b3906fc012cbf4f262916`
* [Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/6.2.0/docs/)
* [javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.2.0%2Fchat-android-6.2.0-javadoc.jar)

#### Changes \[#changes-4]

* Added connection via proxy support. See [`ChatClient.Properties.Builder.setUseProxy()`](https://media.twiliocdn.com/sdk/android/chat/releases/6.2.0/docs/classcom_1_1twilio_1_1chat_1_1ChatClient_1_1Properties_1_1Builder.html#abc9107e629dba8e3b278f6b015774041).
* Fixed a bug when `onChanelDeleted` doesn't come for a private channel when a member is removed by another user.
* Fixed a bug that could lead to client synchronization getting 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](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.1.1%2Fchat-android-6.1.1.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/6.1.1/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.1.1%2Fchat-android-6.1.1-javadoc.jar)

#### Changes \[#changes-5]

* Fixed a bug that could lead to crashes when member attributes are updated.

***

### Programmable Chat Android 6.1.0 *(Jul 30, 2020)*

[aar](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.1.0%2Fchat-android-6.1.0.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/6.1.0/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.1.0%2Fchat-android-6.1.0-javadoc.jar)

#### Changes \[#changes-6]

* SDK has switched to Android's native SSLSocket implementation (`javax.net.ssl.SSLSocket`), resulting in a noticeable decrease in final application size compared to release 6.0.0.

***

### Programmable Chat Android 6.0.0 *(Jul 20, 2020)*

[aar](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.0.0%2Fchat-android-6.0.0.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/6.0.0/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F6.0.0%2Fchat-android-6.0.0-javadoc.jar)

#### Breaking Changes \[#breaking-changes-2]

* 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 \[#changes-7]

* 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](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.1.1%2Fchat-android-5.1.1.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/5.1.1/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.1.1%2Fchat-android-5.1.1-javadoc.jar)

#### Changes \[#changes-8]

* 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 — please use 5.1.1.

[aar](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.1.1%2Fchat-android-5.1.1.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/5.1.1/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.1.1%2Fchat-android-5.1.1-javadoc.jar)

#### Changes \[#changes-9]

* Added ability to specify custom [command timeout](https://media.twiliocdn.com/sdk/android/chat/releases/5.1.1/docs/classcom_1_1twilio_1_1chat_1_1ChatClient_1_1Properties_1_1Builder.html#a59859a8ef5515688ab8437340edfaa25) 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](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.1.1%2Fchat-android-5.1.1.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/5.1.1/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.1.1%2Fchat-android-5.1.1-javadoc.jar)

#### Changes \[#changes-10]

* Improved stability, fixed crashes.

***

### Programmable Chat Android 5.0.0 *(Mar 5, 2020)*

[aar](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.0.0%2Fchat-android-5.0.0.aar)
[Documentation](https://media.twiliocdn.com/sdk/android/chat/releases/5.0.0/docs/)
[javadocs](https://bintray.com/twilio/releases/download_file?file_path=com%2Ftwilio%2Fchat-android%2F5.0.0%2Fchat-android-5.0.0-javadoc.jar)

#### 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 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:

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

replace with:

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

For GCM tokens:

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

replace with:

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

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

For FCM tokens:

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

replace with:

```java
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, please see this [changelog](/docs/chat/android/old-changelog).
