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

# Security Extensions

> Android SDK implementation examples for Security extensions including Disappearing Messages

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

## 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="Implement SDK methods">
    Use the code examples below to schedule messages for automatic deletion.
  </Step>

  <Step title="Build your UI">
    Update your UI to indicate which messages will disappear and when.
  </Step>
</Steps>

***

## Disappearing Messages

Send messages that automatically disappear after a specified time interval.

### Schedule Message for Deletion

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val body = JSONObject()
    body.put("msgId", ID_OF_THE_SENT_MESSAGE)
    body.put("timeInMS", 1633521809051) // Change to a future timestamp

    // Once the message is sent successfully, call this.
    CometChat.callExtension("disappearing-messages", "DELETE", "/v1/disappear", body,
        object : CometChat.CallbackListener<JSONObject>() {
            override fun onSuccess(responseObject: JSONObject) {
                // Will disappear successfully.
            }
            override fun onError(e: CometChatException) {
                // Some error occurred.
            }
        }
    )
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    JSONObject body = new JSONObject();
    body.put("msgId", ID_OF_THE_SENT_MESSAGE);
    body.put("timeInMS", 1633521809051); // Change to a future timestamp

    // Once the message is sent successfully, call this.
    CometChat.callExtension("disappearing-messages", "DELETE", "/v1/disappear", body,
      new CometChat.CallbackListener<JSONObject>() {
        @Override
        public void onSuccess(JSONObject responseObject) {
            // Will disappear successfully.
        }
        @Override
        public void onError(CometChatException e) {
            // Some error occured.
        }
    });
    ```
  </Tab>
</Tabs>
