Android Chat

Build sophisticated apps with our Android Chat SDK

Build, scale & manage chat apps with CometChat Pro SDK for Android.

Create the chat experience you need using our SDK that can scale as your business & users grow.

Integration Time: 30-60 minutes

Trusted by more than 50000 customers in over 127 countries

Designed for Developers to take control

Get complete control of your UI by integrating CometChat Pro Chat SDK in your Android app and swiftly deploy your ideas into reality.

private String GUID = "GUID";
private String groupType = CometChatConstants.GROUP_TYPE_PUBLIC;
private String password = "";

CometChat.joinGroup(GUID, groupType, password, new CometChat.CallbackListener() {
  @Override
  public void onSuccess(String successMessage) {
    Log.d(TAG, "Group joined successfully");
  }
  @Override
  public void onError(CometChatException e) {
    Log.d(TAG, "Group joining failed with exception: " + e.getMessage());
  }
});

                    
private String listenerID = "UNIQUE_LISTENER_ID";

CometChat.addMessageListener(listenerID, new CometChat.MessageListener() {
  @Override
  public void onTextMessageReceived(TextMessage textMessage) {
    Log.d(TAG, "Text message received successfully: " + textMessage.toString());
  }
  @Override
  public void onMediaMessageReceived(MediaMessage mediaMessage) {
    Log.d(TAG, "Media message received successfully: " + mediaMessage.toString());
  }
});

                    
private String receiverID = "UID";
private String messageText = "Hello world!";
private String messageType = CometChatConstants.MESSAGE_TYPE_TEXT;
private String receiverType = CometChatConstants.RECEIVER_TYPE_USER;

TextMessage textMessage = new TextMessage(receiverID, messageText, messageType, receiverType);

CometChat.sendMessage(textMessage, new CometChat.CallbackListener() {
  @Override
  public void onSuccess(TextMessage textMessage) {
    Log.d(TAG, "Message sent successfully: " + textMessage.toString());
  }
  @Override
  public void onError(CometChatException e) {
    Log.d(TAG, "Message sending failed with exception: " + e.getMessage());
  }
});

                    
private UsersRequest usersRequest = null;
private int limit = 30;

usersRequest = new UsersRequest.UsersRequestBuilder().setLimit(limit).build();

usersRequest.fetchNext(new CometChat.CallbackListener>() {
  @Override
  public void onSuccess(List  list) {
    Log.d(TAG, "User list received: " + list.size());
  }
  @Override
  public void onError(CometChatException e) {
    Log.d(TAG, "User list fetching failed with exception: " + e.getMessage());
  }
});

                    

Easiest way to add & customize chat in your app

Built & battle tested

CometChat Pro deploys over 50K+ automated tests across multiple platforms to ensure our chat works across every browser & updates.

Don’t build it from scratch

Our SDKs help save time by focussing on code that matters without having to reinvent the wheel. Quickstarts, developer documentation, open source sample code and our pre-built sample apps help you get up and running quickly.

Scale with confidence

We help you build a chat app that can be scaled from a startup to an enterprise within minutes without having to outsource your dev team. Our SDKs support every use case right out of the box with minimum latency, unparalleled uptime & flexibility.

Control your UI

CometChat Pro SDKs helps you make & manage your chat UI exactly the way you need. Start from our chat layout & build on top of it. Personalise chat experience for your users by customizing chat bubbles, calling profiles and so much more.

CometChat