Browse SDKs · React Native
Platform
SDKsReact Native

Get typing status

Query the current typing platforms of a user in a conversation using the OpenIM React Native SDK.

Copy

Query the active typing platforms of a specific user within a conversation:

const platformIDs = await OpenIMSDK.getInputStates({
  conversationID,
  userID,
});

const isTyping = platformIDs.length > 0;

Parameters

ParameterTypeRequiredDescription
conversationIDstringYesTarget conversation ID.
userIDstringYesTarget user ID whose typing status is being queried.

Return value

A resolved Promise returns number[] containing platform IDs where the user is currently typing. An empty array indicates the user is not actively typing on any device. For real-time typing notifications, subscribe to OnInputStatusChanged as documented in Change input states.