> ## Documentation Index
> Fetch the complete documentation index at: https://cometchat-22654f5b-docs-platform-docs-release.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# User Engagement Extensions

> Android SDK implementation examples for User Engagement extensions including Giphy, Tenor, Message Translation, Polls, Stickers, Stipop, and Reminders

This page contains Android SDK code examples for User Engagement extensions. For feature documentation, setup instructions, and extension settings, see [User Engagement Extensions](/fundamentals/extensions-user-engagement).

## How to Use Extensions with SDK

<Steps>
  <Step title="Enable in Dashboard">
    Login to [CometChat Dashboard](https://app.cometchat.com/login), select your app, then go to **Chat & Messaging → Features** and enable the extension.
  </Step>

  <Step title="Configure settings (if required)">
    Some extensions require API keys or additional configuration. Open the extension settings in the Dashboard.
  </Step>

  <Step title="Implement SDK methods">
    Use the code examples below to call extension APIs and extract extension data from messages.
  </Step>

  <Step title="Build your UI">
    Create UI components to display extension data (e.g., polls, stickers, GIFs).
  </Step>
</Steps>

***

## Giphy

Add GIFs from Giphy to your conversations.

### Get Trending GIFs

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val url = "/v1/trending?offset=1&limit=15"

    CometChat.callExtension("gifs-giphy", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // GIFs data from Giphy
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String URL = "/v1/trending?offset=1&limit=15";

    CometChat.callExtension("gifs-giphy", "GET", URL, null,
    new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // GIFs data from Giphy
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### Search for GIFs

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val query = "awesome"
    val url = "/v1/search?offset=1&limit=15&query=$query"

    CometChat.callExtension("gifs-giphy", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // GIFs data from Giphy
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String query = "awesome";
    String URL = "/v1/search?offset=1&limit=15&query=" + query;

    CometChat.callExtension("gifs-giphy", "GET", URL, null,
    new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // GIFs data from Giphy
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

***

## Tenor

Add GIFs from Tenor to your conversations.

### Get Trending GIFs

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val url = "/v1/trending?offset=1&limit=15"

    CometChat.callExtension("gifs-tenor", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // GIFs data from Tenor
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String URL = "/v1/trending?offset=1&limit=15";

    CometChat.callExtension("gifs-tenor", "GET", URL, null,
    new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // GIFs data from Tenor
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### Search for GIFs

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val query = "awesome"
    val url = "/v1/search?offset=1&limit=15&query=$query"

    CometChat.callExtension("gifs-tenor", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // GIFs data from Tenor
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String query = "awesome";
    String URL = "/v1/search?offset=1&limit=15&query=" + query;

    CometChat.callExtension("gifs-tenor", "GET", URL, null,
    new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // GIFs data from Tenor
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

***

## Message Translation

Translate messages into 70+ languages.

### Translate Message

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    val languages = JSONArray()
    languages.put("ru")
    languages.put("hi")

    body.put("msgId", 12)
    body.put("languages", languages)
    body.put("text", "Hey there! How are you?")

    CometChat.callExtension("message-translation", "POST", "/v2/translate", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // Result of translations
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    JSONArray languages = new JSONArray();
    languages.put("ru");
    languages.put("hi");

    body.put("msgId", 12);
    body.put("languages", languages);
    body.put("text", "Hey there! How are you?");

    CometChat.callExtension("message-translation", "POST", "/v2/translate", body,
     new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // Result of translations
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

***

## Polls

Create and vote on polls in conversations.

### Creating a Poll

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    val options = JSONArray()
    options.put("Milk")
    options.put("Cereal")

    body.put("question", "Milk goes first or the cereal?")
    body.put("options", options)
    body.put("receiver", "cometchat-guid-1")
    body.put("receiverType", "group")

    CometChat.callExtension("polls", "POST", "/v2/create", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // On Success
            }
            override fun onError(e: CometChatException) {
                // On Failure
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    JSONArray options = new JSONArray();
    options.put("Milk");
    options.put("Cereal");

    body.put("question", "Milk goes first or the cereal?");
    body.put("options", options);
    body.put("receiver", "cometchat-guid-1");
    body.put("receiverType", "group");

    CometChat.callExtension("polls", "POST", "/v2/create", body,
     new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            //On Success
        }
        @Override
        public void onError(CometChatException e) {
            //On Failure
        }
    });
    ```
  </Tab>
</Tabs>

### Voting in a Poll

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    body.put("vote", "3")
    body.put("id", "d5441d53-c191-4696-9e92-e4d79da7463")

    CometChat.callExtension("polls", "POST", "/v2/vote", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // Vote submitted successfully
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    body.put("vote", "3");
    body.put("id", "d5441d53-c191-4696-9e92-e4d79da7463");

    CometChat.callExtension("polls", "POST", "/v2/vote", body,
     new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // Vote submitted successfully
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### Getting Results

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val pollId = "d5441d53-c191-4696-9e92-e4d79da7463"
    val url = "/v2/results?id=$pollId"

    CometChat.callExtension("polls", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(jsonObject: JSONObject) {
                // Poll results
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String pollId = "d5441d53-c191-4696-9e92-e4d79da7463";
    String URL = "/v2/results?id=" + pollId;

    CometChat.callExtension("polls", "GET", URL, null,
     new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject jsonObject) {
            // Poll results
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

***

## Stickers

Load and send stickers in conversations.

### Loading Stickers

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    CometChat.callExtension("stickers", "GET", "/v1/fetch", null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Stickers received here.
            }
            override fun onError(e: CometChatException) {
                // Some error occurred.
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CometChat.callExtension("stickers", "GET", "/v1/fetch", null,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Stickers received here.
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured.
        }
    });
    ```
  </Tab>
</Tabs>

***

## Stipop

Access Stipop's sticker platform.

### Get Trending Stickers

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val lang = "en"
    val limit = 20
    val pageNumber = 1
    val countryCode = "US"
    val url = "/v1/trending?lang=$lang&limit=$limit&pageNumber=$pageNumber&countryCode=$countryCode"

    CometChat.callExtension("stickers-stipop", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Stickers in response
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String lang = "en";
    int limit = 20;
    int pageNumber = 1;
    String countryCode = "US";
    String URL = "/v1/trending?lang=" + lang + "&limit=" + limit + "&pageNumber=" + pageNumber + "&countryCode=" + countryCode;

    CometChat.callExtension("stickers-stipop", "GET", URL, null,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Stickers in response
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### Search for Stickers

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val lang = "en"
    val limit = 20
    val pageNumber = 1
    val query = "happy"
    val url = "/v1/search?lang=$lang&limit=$limit&pageNumber=$pageNumber&query=$query"

    CometChat.callExtension("stickers-stipop", "GET", url, null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Stickers in response
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    String lang = "en";
    int limit = 20;
    int pageNumber = 1;
    String query = "happy";
    String URL = "/v1/search?lang=" + lang + "&limit=" + limit + "&pageNumber=" + pageNumber + "&query=" + query;

    CometChat.callExtension("stickers-stipop", "GET", URL, null,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Stickers in response
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

***

## Reminders

Set reminders for messages or custom events.

### Set Message Reminders

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    body.put("about", 1)
    body.put("isCustom", false)
    body.put("timeInMS", 1638351344989L)

    CometChat.callExtension("reminders", "POST", "/v1/reminder", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Reminder created successfully
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    body.put("about", 1);
    body.put("isCustom", false);
    body.put("timeInMS", 1638351344989L);

    CometChat.callExtension("reminders", "POST", "/v1/reminder", body,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Reminder created successfully
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### Set Personal Reminders

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    body.put("about", "Drinking water")
    body.put("isCustom", true)
    body.put("timeInMS", 1638351344989L)

    CometChat.callExtension("reminders", "POST", "/v1/reminder", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Personal reminder created successfully
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    body.put("about", "Drinking water");
    body.put("isCustom", true);
    body.put("timeInMS", 1638351344989L);

    CometChat.callExtension("reminders", "POST", "/v1/reminder", body,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Personal reminder created successfully
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### List Reminders

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    CometChat.callExtension("reminders", "GET", "/v1/fetch", null,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Reminders list
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CometChat.callExtension("reminders", "GET", "/v1/fetch", null,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Reminders list
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>

### Delete Reminders

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    body.put("reminderId", "e9cda52a-3839-4fd5-a010-b70db136f0f1")

    CometChat.callExtension("reminders", "DELETE", "/v1/reminder", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Reminder deleted successfully
            }
            override fun onError(e: CometChatException) {
                // Some error occurred
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    body.put("reminderId", "e9cda52a-3839-4fd5-a010-b70db136f0f1");

    CometChat.callExtension("reminders", "DELETE", "/v1/reminder", body,
        new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Reminder deleted successfully
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured
        }
    });
    ```
  </Tab>
</Tabs>
