Intercept UI button clicks with ButtonClickListener. This listener provides callbacks when users tap buttons in the call UI, allowing you to implement custom behavior or show confirmation dialogs.
Triggered when the user taps the leave session button.
Kotlin
Java
Report incorrect code
Copy
Ask AI
override fun onLeaveSessionButtonClicked() { Log.d(TAG, "Leave button clicked") // Show confirmation dialog before leaving showLeaveConfirmationDialog()}private fun showLeaveConfirmationDialog() { AlertDialog.Builder(this) .setTitle("Leave Call") .setMessage("Are you sure you want to leave this call?") .setPositiveButton("Leave") { _, _ -> callSession.leaveSession() } .setNegativeButton("Cancel", null) .show()}
Report incorrect code
Copy
Ask AI
@Overridepublic void onLeaveSessionButtonClicked() { Log.d(TAG, "Leave button clicked"); // Show confirmation dialog before leaving showLeaveConfirmationDialog();}private void showLeaveConfirmationDialog() { new AlertDialog.Builder(this) .setTitle("Leave Call") .setMessage("Are you sure you want to leave this call?") .setPositiveButton("Leave", (dialog, which) -> { callSession.leaveSession(); }) .setNegativeButton("Cancel", null) .show();}
Triggered when the user taps the raise hand button.
Kotlin
Java
Report incorrect code
Copy
Ask AI
override fun onRaiseHandButtonClicked() { Log.d(TAG, "Raise hand clicked") // Show hand raised confirmation Toast.makeText(this, "Hand raised", Toast.LENGTH_SHORT).show()}
Report incorrect code
Copy
Ask AI
@Overridepublic void onRaiseHandButtonClicked() { Log.d(TAG, "Raise hand clicked"); // Show hand raised confirmation Toast.makeText(this, "Hand raised", Toast.LENGTH_SHORT).show();}
Triggered when the user taps the participant list button.
Kotlin
Java
Report incorrect code
Copy
Ask AI
override fun onParticipantListButtonClicked() { Log.d(TAG, "Participant list clicked") // Track participant list views analytics.logEvent("participant_list_opened")}
Report incorrect code
Copy
Ask AI
@Overridepublic void onParticipantListButtonClicked() { Log.d(TAG, "Participant list clicked"); // Track participant list views analytics.logEvent("participant_list_opened");}
override fun onChatButtonClicked() { Log.d(TAG, "Chat button clicked") // Open custom chat UI openChatScreen()}private fun openChatScreen() { // Navigate to chat screen or show chat overlay val intent = Intent(this, ChatActivity::class.java) intent.putExtra("sessionId", sessionId) startActivity(intent)}
Report incorrect code
Copy
Ask AI
@Overridepublic void onChatButtonClicked() { Log.d(TAG, "Chat button clicked"); // Open custom chat UI openChatScreen();}private void openChatScreen() { // Navigate to chat screen or show chat overlay Intent intent = new Intent(this, ChatActivity.class); intent.putExtra("sessionId", sessionId); startActivity(intent);}
Triggered when the user taps the recording button.
Kotlin
Java
Report incorrect code
Copy
Ask AI
override fun onRecordingToggleButtonClicked() { Log.d(TAG, "Recording toggle clicked") // Show recording consent dialog showRecordingConsentDialog()}private fun showRecordingConsentDialog() { AlertDialog.Builder(this) .setTitle("Start Recording") .setMessage("All participants will be notified that this call is being recorded.") .setPositiveButton("Start") { _, _ -> callSession.startRecording() } .setNegativeButton("Cancel", null) .show()}
Report incorrect code
Copy
Ask AI
@Overridepublic void onRecordingToggleButtonClicked() { Log.d(TAG, "Recording toggle clicked"); // Show recording consent dialog showRecordingConsentDialog();}private void showRecordingConsentDialog() { new AlertDialog.Builder(this) .setTitle("Start Recording") .setMessage("All participants will be notified that this call is being recorded.") .setPositiveButton("Start", (dialog, which) -> { callSession.startRecording(); }) .setNegativeButton("Cancel", null) .show();}