SDKsReact Native
Get typing status
Query the current typing platforms of a user in a conversation using the OpenIM React Native SDK.
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
| Parameter | Type | Required | Description |
|---|---|---|---|
conversationID | string | Yes | Target conversation ID. |
userID | string | Yes | Target 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.
Was this page helpful?