-
Notifications
You must be signed in to change notification settings - Fork 2
TextReceivedEvent
Lejla Solak edited this page Feb 10, 2025
·
2 revisions
Getter for the text field.
none
-
String- The value of thetextfield, which represents the received text.
DataChannelEventListener dataChannelEventListener = new DefaultDataChannelEventListener() {
@Override
public void onTextReceived(TextReceivedEvent textReceivedEvent) {
String text = textReceivedEvent.getText();
}
};Getter for the from field.
none
-
Endpoint- The value of thefromfield, which represents the endpoint from which the received text was sent.
DataChannelEventListener dataChannelEventListener = new DefaultDataChannelEventListener() {
@Override
public void onTextReceived(TextReceivedEvent textReceivedEvent) {
Endpoint from = textReceivedEvent.getFrom();
}
};Getter for the date field.
none
-
Date- The value of thedatefield, which represents the time when the text was received.
DataChannelEventListener dataChannelEventListener = new DefaultDataChannelEventListener() {
@Override
public void onTextReceived(TextReceivedEvent textReceivedEvent) {
Date date = textReceivedEvent.getDate();
}
};Getter for the direct field.
none
-
boolean- The value of thedirectfield, indicating whether the received text was sent directly to its recipient or to all participants. Iftrue, the text was sent directly, otherwise it was sent to everyone in the call.
DataChannelEventListener dataChannelEventListener = new DefaultDataChannelEventListener() {
@Override
public void onTextReceived(TextReceivedEvent textReceivedEvent) {
boolean isDirect = textReceivedEvent.isDirect();
}
};