Level up your Twilio API skills in TwilioQuest, an educational game for Mac, Windows, and Linux. Download Now

Menu

Expand
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?

Changelog: Twilio IP Messaging Android SDK

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.

IP Messaging Android v0.10

Twilio Common Android v0.6

Change Logs

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.


IP Messaging Android 0.10.2 (November 30, 2016)

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()

IP Messaging Android 0.10.1 (November 23, 2016)

Note: This release of IP Messaging must be used in conjunction with the Android Twilio Common 0.6.1 version

New Features
  • Exposed new SDK Client ConnectionState
IPMessagingClient.getConnectionState()
IPMessagingClientListener.onConnectionStateChange()

IP Messaging Android 0.10.0 (October 28, 2016)

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

IP Messaging Android 0.9.1 (July 29, 2016)

Note: This release of IP Messaging must be used in conjunction with the Android Twilio Common 0.6.1 version

Bug Fixes
  • Fixed a bug where the Client Channel list was not correctly updated when relevant events were received from the service

IP Messaging Android 0.9.0 (July 27, 2016)

Twilio Common Android 0.6.1 (July 27, 2016)

Note: This release of IP Messaging must be used in conjunction with the Android Twilio Common 0.6.1 version

Breaking Changes
  • (Twilio Common): TwilioAccessManager is renamed to AccessManager
  • Removed previously deprecated SDK and Client initialization methods
  • Removed previously deprecated interface Constants.InitListener
  • Removed previously deprecated method Channels.loadChannelsWithListener(StatusListener)
  • Removed previously deprecated method IPMessagingClient#getIdentity()
  • Removed previously deprecated method StatusListener.onError()
  • Removed previously deprecated method CreateChannelListener.onError()
  • Renamed TwilioIPMessagingClient class to IPMessagingClient (without prefix)
  • Changed signature of getMessagesBefore and getMessagesAfter to use long index

New Features

  • Added IPMessagingClient.removeListener() and Channel.removeListener() API calls
  • Added Messages.setNoMessagesConsumed() method to reset a Channels message consumption horizon to none

Deprecations (Future Breaking Changes)

  • Deprecated Messages.getMessages(), please use Messages.getLastMessages() instead
  • Deprecated method ChannelListener.onAttributesChange
  • Deprecated TwilioIPMessagingSDK class and its initialization methods. Replaced with call to IPMessagingClient.create(Context context, AccessManager accessManager, IPMessagingClient.Properties clientProperties, Constants.CallbackListener<IPMessagingClient> listener)

IP Messaging Android 0.8.1 (June 29, 2016)

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.

IP Messaging Android 0.8.0 (June 21, 2016)

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 to org.json.JSONObject as to support actual arbitrary JSON attributes as per spec.
  • Added Channel getDateCreated()/getDateCreatedAsDate()/getDateUpdated()/getDateUpdatedAsDate() methods
Bug Fixes
  • Fixed a crash that occurred when sending and receiving certain emoji characters
  • Fixed a crash that occurred when setting a null Body for when sending messages
  • Fixed a crash that occured when setting a null FriendlyName when updating UserInfo

IP Messaging Android 0.7.0 (May 27, 2016)

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 single method: createClient(TwilioAccessManager accessManager, TwilioIPMessagingClient.Properties clientPorperties, Constants.CallbackListener listener).
  • TwilioIPMessagingClient.Properties is 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 synched.
  • 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 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 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> messages);
  • getMessagesAfter(int index, int count, Constants.CallbackListener> messages);
  • getLastMessages(int count, Constants.CallbackListener> messages);
  • Significant increase in client init and sync speeds.
Other:
  • New interface Constants.CallbackListener. It is used for asynchronous operations that pass object reference to callback.
  • Deprecated interface Constants.InitListener.
  • Deprecated method IPMessagingClientListener.onAttributesChange.
  • Deprecated previously used SDK and Client init methods. For more info see point 1
  • Private channels are now added to channels list on client initialization
  • Replaced ChannelListener.onChannelHistoryLoaded(Channel channel) with onSynchronizationChange(Channel channel).
  • Replaced IPMessagingClientListener.onChannelHistoryLoaded(Channel channel) with onChannelSynchronizationChange(Channel channel)
Bug Fixes:
  • Fixed issue with missing message SID in channel message list
  • Fixed an issue where the SDK would crash on attempting to retrieve a channels list with more than 512 combined public and private channels

IP Messaging Android 0.6.0 (April 4, 2016)

Note: This release of IP Messaging must be used in conjunction with the latest Android Twilio Common 0.3.1 release (see below)

Breaking Changes
  • IP Messaging: Informational error responses when async operation fails
  • Created new ErrorInfo class containing error code and message.
  • BREAKING: Replaced IPMessagingClientListener method onError(int errorCode, String errorText) with onError(ErrorInfo error);
  • 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:
  • x86
  • x86_64
  • arm-v7
  • arm-v8

Twilio Common Android 0.3.1 (April 4, 2016)

Breaking Changes
  • Interface changes for Twilio commons:
  • BREAKING: Change the public API callback on TwilioAccessManagerListener from onAccessManagerTokenExpire to onTokenExpired
  • BREAKING: Change the public API method on TwlioAccessManager from setListener to addListener

  • Jar packaging and naming changed:

  • twilio-common-android-0.3.1.tar.bz2 extacts to directory twilio-common-android-0.3.1
  • jar name used to be twilio-common-android.jar and now twilio-common-android-0.3.1.jar

IP Messaging Android 0.5.0 (March 18, 2016)

New features
  • UserInfo with FriendlyName and Attributes
  • 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.
  • Added new class UserInfo with methods:
  • String getFriendlyName();
  • void setFriendlyName(String friendlyName, StatusListener listener);
  • Map<String, String> getAttributes();
  • void setAttributes(Map<String, String> attributes, StatusListener listener);
  • String getIdentity();

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
  • Remove redundant method MemberImpl.getAttributes()

IP Messaging Android 0.4.13 (February 19, 2016)

New features
  • Message Consumption Horizon and Read Status
  • 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 user 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)

Bug Fixes
  • 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)

Bug Fixes
  • 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)

New features

  • TwilioAccessManager is a new class for managing the Access Token lifecycle. This class provides token lifecycle events and 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)

New features

  • 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.

Bug Fixes

  • Fixed a JNI crash when calling listener.
  • Fixed an issue with joining public channels.
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.