SDKsAndroid
Retrieve typing status
Use getInputState to retrieve a specified user’s current typing status in a conversation.
Query the platform IDs on which a specified user is currently typing.
OpenIMClient.getInstance().conversationManager.getInputState(
new OnBase<List<Integer>>() {
@Override
public void onSuccess(List<Integer> platformIDs) {
boolean typing = platformIDs != null && !platformIDs.isEmpty();
// typing indicates the user's current typing status.
}
@Override
public void onError(int code, String error) {
// code and error describe the failure.
}
},
conversationID,
userID
);The success callback returns a list of platform IDs. An empty list means that the user is not currently typing on any platform. To receive typing-status changes, use the callback described in Update typing status.
Was this page helpful?