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.
Archived IP Messaging Releases
We recommend using these links in your projects. As we patch bugs, these links will
automatically be updated with the fixes.
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 of a release.
Note: This release of IP Messaging must be used in conjunction with the Android Twilio Common 0.6.1 version
Bug Fixes
Added a call to onClientSynchronization callback in listener upon ChatClient.setListener() with current sync state to help resolve a possible race condition on startup
Fixed an issue where onTypingEnded() was being called immediately after onTypingStarted()
Note: This release of IP Messaging must be used in conjunction with the Android Twilio Common 0.6.1 version
Breaking Changes
Message.getAttributes() now explicitly throws JSONException
New Features
Add Messages.getMessageByIndex() method.
Add connection timeout handling in IPMessagingClient.getChannels(), Channel.getMembers() and Channel.getMessages() - it doesn't hang indefinitely now but will return null after connection timeout is detected by twilsock (usually 30 seconds).
Add Disposable interface to all Java objects with C++ context counterparts - calling dispose() will clean up C++ counterpart object and leave java object unusable.
Memory is actually reclaimed after IPMessagingClient.shutdown(); the client object will be dispose()d making it non-reusable.
Add Member.getChannel() and Message.getChannel() to get Channel object they are contained in.
Add Message.getMessages() to get its parent object
Add NotificationPayload helper class to parse GCM push data in the user's GcmListener.
Add Channels.channelBuilder() to create channel with custom attributes.
Bug Fixes
Change default SDK logging level to DEBUG.
Channels will not lose their set listeners anymore.
Mark SDK classes final - there's no point extending them
Do not silently fail initialisation if null token was passed into IPMessagingClient.create()
Reduced internal memory consumption in twilsock buffer from 128Mb to 8Mb
Removed
Remove Parcelable support from classes that don't need it
Deprecated TwilioIPMessagingSDK class and its initialization methods. Replaced with call to IPMessagingClient.create(Context context, AccessManager accessManager, IPMessagingClient.Properties clientProperties, Constants.CallbackListener<IPMessagingClient> listener)
Note: This release of IP Messaging must be used in conjunction with the latest Android Twilio Common 0.3.1 release (see below)
Bug Fixes
Fixed a bug where onToastNotification(String,String), onToastSubscribed() and onToastFailed(ErrorInfo) GCM callbacks in IPMessagingClientListener where not firing correctly.
Note: This release of IP Messaging must be used in conjunction with the latest Android Twilio Common 0.3.1 release (see below)
New Features
Add convenience signature for Messages.sendMessage(): public Message sendMessage(String messageBody, StatusListener listener);
Added Reachability read-only properties:
TwilioIPMessagingClient.isReachabilityEnabled()
UserInfo.isOnline()
UserInfo.isNotifiable()
Added Message attributes
Format of all attributes (in Channel, Message, and UserInfo) has changed from Map<String,String> to org.json.JSONObject as to support actual arbitrary JSON attributes as per spec.
Note: This release of IP Messaging must be used in conjunction with the latest Android Twilio Common 0.3.1 release (see below)
New Features
Client initialization
Deprecated existing SDK and Client initialization methods. Replaced them with a single method: createClient(TwilioAccessManager accessManager, TwilioIPMessagingClient.Properties clientPorperties, Constants.CallbackListener listener).
TwilioIPMessagingClient.Properties is a properties class for client initialization, with two member fields:
SynchronizationStrategy synchronizationStrategy;
int initialMessageCount;
SynchronizationStrategy sets data synchronization strategy for client initialization phase. Possible values are ALL and CHANNELS_LIST.
ALL fetches all Channels with Members and Messages.
CHANNELS_LIST fetches channels list only, plus metadata for joined, invited public channels and all private channels.
initialMessageCount field controls amount of messages that are loaded by default for each channel when synched. 0 means no messages are synced.
Constants.CallbackListener is invoked when TwilioIPMessagingClient is initialized and ready to use. At this point channel list is synched and client is in usable state. Reference to TwilioIPMessagingClient is passed to callback.
Data synchronization strategy changes
Added new object TwilioIPMessagingClient to client initialization phase. This controls client synchronization strategies on the init phase. For more info, look at point 1. Client initialization.
Added SynchronizationStatus enum to Channel. Possible values are NONE, IDENTIFIER, METADATA, ALL and FAILED. Status can be accessed by invoking method getSynchronizationStatus();
Single Channel can now be loaded with method synchronize(Constants.CallbackListener listener). Listener is invoked when channel is synchronized with reference to channel passed to callback.
IPMessagingClientListener interface has a new method to notify when Client synchronization status has changed: onClientSynchronization(TwilioIPMessagingClient.SynchronizationStatus status); Possible values are STARTED, CHANNELS_COMPLETED, COMPLETED and FAILED.
Support for fetching channel messages on demand with pagination support. Following methods are exposed for Messages:
getMessagesBefore(int index, int count, Constants.CallbackListener<List> messages);
getMessagesAfter(int index, int count, Constants.CallbackListener<List> messages);
BREAKING: Changed interface Constants.CreateChannelListener to abstract class with empty onError() method stub. Added new method onError(ErrorInfo error) to abstract class.
BREAKING: Changed interface Constants.StatusListener to abstract class with empty onError() method stub. Added new method onError(ErrorInfo error) to abstract class.
New Platform support
Native binaries added. Supported platforms are now:
public void onUserInfoChange(UserInfo userInfo) added to IPMessagingClientListener.java interface. This method is invoked properties of a UserInfo changes for any of the currently logged in User's Channel's Members.
public UserInfo getUserInfo() to Member.java interface. Returns UserInfo for that Member.
public UserInfo getMyUserInfo() to TwilioIPMessagingClient.java class. Returns currently logged in Users's UserInfo object.
Note: The addition of the onUserInfoChange(UserInfo userInfo) method to the IPMessagingClientListener.java interface is an additive breaking change in that implementations of the Interface will need to override the new event method.
Bug Fixes
Fixed crash when invited member accepts invitation
Member: getLastConsumedMessageIndex() Return members last consumed message index for this channel
Member: getLastConsumptionTimestamp() Return members last consumed message timestamp for this channel
Message: getMessageIndex() Returns the index number for this message
Messages: getLastConsumedMessageIndex() Return the user's last consumed message index for the channel
Messages: setLastConsumedMessageIndex(long lastConsumedMessageIndex) Set user last consumed message index for the channel
Messages: advanceLastConsumedMessageIndex(long lastConsumedMessageIndex) Increase user last consumed message index for the channel. Index is ignored if it is smaller than user current index
Messages: setAllMessagesConsumed() Set last consumed message index to last message index in channel
Bug Fixes
Fixed a problem with client listeners not working for channel objects retrieved by unique name
Fixed usernames with special characters not working
Fixed an issue where in some cases when moving from a background to a foreground state, automatic reconnection to IP Messaging did not happen
Twilio IP Messaging Android 0.4.10 (January 11, 2016)
A single message changed event is triggered when a message is updated. In previous releases, multiple message changed events could fire for a single message update.
A participant will no longer miss channel updates after leaving and re-joining the same channel in a single session.
Notes and known issues
Access Tokens:
Only Access Tokens provide expiry events. Capability Tokens, an authentication format used earlier during the IP Messaging Private Beta, do not raise expiry events.
Twilio recommends using a minimum Access Token TTL of 4 minutes; TwilioAccessManager will alert the client 3 minutes prior to expiry to ensure sufficient time to obtain and set a new token before expiry.
tokenExpired event is called not at expiry but 3 minutes prior to ensure sufficient time to update to new token.
updateToken() on TwilioAccessManager should be called on a thread other than the one used to receive the event to ensure the token update completes.
Some applications running on Motorola devices may crash when constructing an AccessManager and/or receiving the callback onTokenUpdated(AccessManager* accessManager).
Other items:
loadChannelsWithListener() needs to be called before retrieving channels via pmessagingClient.getChannels().getChannels()
UTF-8 encoded characters are not supported in message bodies. (Note: This issue had previously been reported as affecting only emoji characters, but all UTF-8 characters are impacted.)
Upcoming deprecation warnings
The TwilioIPMessagingClient initialization method createIPMessagingClientWithToken will be deprecated in favor of createIPMessagingClientWithAccessManager:.
The createChannel(java.lang.String friendlyName,Channel.ChannelType type,Constants.CreateChannelListener listener) method on Channels will be deprecated in favor of createChannel(java.util.Map<java.lang.String,java.lang.Object> options, Constants.CreateChannelListener listener).
Twilio IP Messaging Android 0.4.9 (December 16, 2015)
Fixed an issue when first message in a channel was skipped.
Added support for identity with spaces.
Notes and known issues
Access Tokens:
Only Access Tokens provide expiry events. Capability Tokens, an authentication format used earlier during the IP Messaging Private Beta, do not raise expiry events.
Twilio recommends using a minimum Access Token TTL of 4 minutes; TwilioAccessManager will alert the client 3 minutes prior to expiry to ensure sufficient time to obtain and set a new token before expiry.
tokenExpired event is called not at expiry but 3 minutes prior to ensure sufficient time to update to new token.
updateToken() on TwilioAccessManager should be called on a thread other than the one used to receive the event to ensure the token update completes.
Some applications running on Motorola devices may crash when constructing an AccessManager and/or receiving the callback onTokenUpdated(AccessManager* accessManager).
Other items:
Inviting a user to a private channel after they have previously declined an invitation to that channel will not notify the user of the invitation.
loadChannelsWithListener() needs to be called before retrieving channels via pmessagingClient.getChannels().getChannels()
UTF-8 encoded characters are not supported in message bodies. (Note: This issue had previously been reported as affecting only emoji characters, but all UTF-8 characters are impacted.)
Upcoming deprecation warnings
The TwilioIPMessagingClient initialization method createIPMessagingClientWithToken will be deprecated in favor of createIPMessagingClientWithAccessManager:.
The createChannel(java.lang.String friendlyName,Channel.ChannelType type,Constants.CreateChannelListener listener) method on Channels will be deprecated in favor of createChannel(java.util.Map<java.lang.String,java.lang.Object> options, Constants.CreateChannelListener listener).
Twilio IP Messaging Android - 0.4.8 (December 9, 2015)
TwilioAccessManager is a new class for managing the Access Token lifecycle. This class provides token lifecycle events and a mechanism to update the token used by clients through its listeners and exposes a standard interface for managing tokens across both Twilio IP Messaging and Twilio Video SDKs. You can see an example of how to use this new class in the IP Messaging Quickstart Guide.
Your Twilio IP Messaging apps can now register to receive push notifications via Google Cloud Messenger.
A new method, setLogLevel(int level), allows you to set the log level for the IP Messaging client.
The shutdown() method, available on both the TwilioIPMessagingClient and TwilioIPMessagingSDK, cleans up local and network resources.
The SDK fires ChannelListener:onChannelHistoryLoaded(Channel channel) callback once a Channel object finishes loading.
Bug Fixes
Fixed a crash when passing a null value for a Channel's unique name.
API calls that take a listener as an argument can now be used with a null listener.
Notes and known issues
Access Tokens:
Only Access Tokens provide expiry events. Capability Tokens, an authentication format used earlier during the IP Messaging Private Beta, do not raise expiry events.
Twilio recommends using a minimum Access Token TTL of 4 minutes; TwilioAccessManager will alert the client 3 minutes prior to expiry to ensure sufficient time to obtain and set a new token before expiry.
tokenExpired event is called not at expiry but 3 minutes prior to ensure sufficient time to update to new token.
updateToken() on TwilioAccessManager should be called on a thread other than the one used to receive the event to ensure the token update completes.
Some applications running on Motorola devices may crash when constructing an AccessManager and/or receiving the callback onTokenUpdated(AccessManager* accessManager).
Other items:
Inviting a user to a private channel after they have previously declined an invitation to that channel will not notify the user of the invitation.
loadChannelsWithListener() needs to be called before retrieving channels via pmessagingClient.getChannels().getChannels()
Emoji characters are not currently supported.
Upcoming deprecation warnings
The TwilioIPMessagingClient initialization method createIPMessagingClientWithToken will be deprecated in favor of createIPMessagingClientWithAccessManager:.
The createChannel(java.lang.String friendlyName,Channel.ChannelType type,Constants.CreateChannelListener listener) method on Channels will be deprecated in favor of createChannel(java.util.Map<java.lang.String,java.lang.Object> options, Constants.CreateChannelListener listener).
Twilio IP Messaging Android - 0.3.0 (November 20, 2015)
Developers can set an optional unique channel name.
The method Message.updateMessageBody(java.lang.String body, Constants.StatusListener listener) has been added, allowing you to update a message's body.
The method Messages.removeMessage(Message message, Constants.StatusListener listener) has been added, allowing you ro remove a message.
The callbacks ChannelListener.onChannelHistoryLoaded(Channel channel) and IPMessagingClientListener.onChannelHistoryLoaded(Channel channel) have been added.
getVersion() has been added, returning the Twilio IP Messaging SDK version.