onEntryRequested

open fun onEntryRequested(participantId: String, name: String, allow: () -> Unit, deny: () -> Unit)

Called when someone is waiting to be admitted to a room that requires entry permission. Nothing happens until you answer; ignoring the request leaves them waiting until the server times it out.

Answer with allow or deny, or with Room.respondEntry. Like respondEntry, an answer given after the room was left or while it is reconnecting is not sent, and the reason arrives on onError.

Code Example:

override fun onEntryRequested(
participantId: String, name: String, allow: () -> Unit, deny: () -> Unit,
) {
showAdmitDialog(name, onAdmit = allow, onReject = deny)
}

Parameters

participantId

the waiting participant's ID.

name

their display name, empty if they joined without one.

allow

lets them in.

deny

turns them away.

See also