public interface NexmoTypingEventListener
Interface definition for a callback to be invoked when typing state has changed.
Typing state in a conversation is sent with NexmoConversation.startTyping()
and NexmoConversation.stopTyping().
Start typing state:
conversation.startTyping(); // ... conversation.stopTyping();
Listen for the NexmoConversation typing typing state changes:
conversation.addTypingEventListener(new NexmoTypingEventListener() {
@Override
public void onTyping(NexmoTypingEvent typingEvent) {
String userName = typingEvent.getFromMember().getUser().getName();
String typingState;
if (typingEvent.getState() == NexmoTypingState.ON) {
typingState = "typing";
} else {
typingState = "not typing";
}
Log.d("onTypingEvent", "User " + userName + " is " + typingState);
}
});
| Modifier and Type | Method and Description |
|---|---|
void |
onTyping(NexmoTypingEvent event)
Dispatches for a typing event related to a
NexmoConversation. |
void onTyping(NexmoTypingEvent event)
NexmoConversation.event - the dispatched NexmoTypingEvent event