> ## Documentation Index
> Fetch the complete documentation index at: https://www.cometchat.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Raise Hand

> CometChat Calling SDK v5 - Raise Hand for Android

Allow participants to raise their hand to get attention during calls. This feature is useful for large meetings, webinars, or any scenario where participants need to signal they want to speak.

## Raise Hand

Signal that you want to speak or get attention:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()
    callSession.raiseHand()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();
    callSession.raiseHand();
    ```
  </Tab>
</Tabs>

## Lower Hand

Remove the raised hand indicator:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()
    callSession.lowerHand()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();
    callSession.lowerHand();
    ```
  </Tab>
</Tabs>

## Listen for Raise Hand Events

Monitor when participants raise or lower their hands using `ParticipantEventListener`:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val callSession = CallSession.getInstance()

    callSession.addParticipantEventListener(this, object : ParticipantEventListener() {
        override fun onParticipantHandRaised(participant: Participant) {
            Log.d(TAG, "${participant.name} raised their hand")
            // Show notification or visual indicator
            showHandRaisedNotification(participant)
        }

        override fun onParticipantHandLowered(participant: Participant) {
            Log.d(TAG, "${participant.name} lowered their hand")
            // Remove notification or visual indicator
            hideHandRaisedIndicator(participant)
        }

        // Other callbacks...
        override fun onParticipantJoined(participant: Participant) {}
        override fun onParticipantLeft(participant: Participant) {}
        override fun onParticipantListChanged(participants: List<Participant>) {}
        override fun onParticipantAudioMuted(participant: Participant) {}
        override fun onParticipantAudioUnmuted(participant: Participant) {}
        override fun onParticipantVideoPaused(participant: Participant) {}
        override fun onParticipantVideoResumed(participant: Participant) {}
        override fun onParticipantStartedScreenShare(participant: Participant) {}
        override fun onParticipantStoppedScreenShare(participant: Participant) {}
        override fun onParticipantStartedRecording(participant: Participant) {}
        override fun onParticipantStoppedRecording(participant: Participant) {}
        override fun onDominantSpeakerChanged(participant: Participant) {}
    })
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    CallSession callSession = CallSession.getInstance();

    callSession.addParticipantEventListener(this, new ParticipantEventListener() {
        @Override
        public void onParticipantHandRaised(Participant participant) {
            Log.d(TAG, participant.getName() + " raised their hand");
            // Show notification or visual indicator
            showHandRaisedNotification(participant);
        }

        @Override
        public void onParticipantHandLowered(Participant participant) {
            Log.d(TAG, participant.getName() + " lowered their hand");
            // Remove notification or visual indicator
            hideHandRaisedIndicator(participant);
        }

        // Other callbacks...
    });
    ```
  </Tab>
</Tabs>

## Check Raised Hand Status

The `Participant` object includes a `raisedHandTimestamp` property to check if a participant has their hand raised:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    callSession.addParticipantEventListener(this, object : ParticipantEventListener() {
        override fun onParticipantListChanged(participants: List<Participant>) {
            val raisedHands = participants.filter { it.raisedHandTimestamp > 0 }
                .sortedBy { it.raisedHandTimestamp }
            
            // Display participants with raised hands in order
            updateRaisedHandsList(raisedHands)
        }
    })
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    callSession.addParticipantEventListener(this, new ParticipantEventListener() {
        @Override
        public void onParticipantListChanged(List<Participant> participants) {
            List<Participant> raisedHands = new ArrayList<>();
            for (Participant p : participants) {
                if (p.getRaisedHandTimestamp() > 0) {
                    raisedHands.add(p);
                }
            }
            // Sort by timestamp and display
            Collections.sort(raisedHands, (a, b) -> 
                Long.compare(a.getRaisedHandTimestamp(), b.getRaisedHandTimestamp()));
            updateRaisedHandsList(raisedHands);
        }
    });
    ```
  </Tab>
</Tabs>

## Hide Raise Hand Button

To disable the raise hand feature, hide the button in the call UI:

<Tabs>
  <Tab title="Kotlin">
    ```kotlin theme={null}
    val sessionSettings = CometChatCalls.SessionSettingsBuilder()
        .hideRaiseHandButton(true)
        .build()
    ```
  </Tab>

  <Tab title="Java">
    ```java theme={null}
    SessionSettings sessionSettings = new CometChatCalls.SessionSettingsBuilder()
        .hideRaiseHandButton(true)
        .build();
    ```
  </Tab>
</Tabs>
