SDKsAndroid
Create a mention message
Use createTextAtMessage to create a text message that mentions group members.
Pass the text, mentioned user IDs, the AtUserInfo list, and an optional quoted message.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
text | String | Yes | Complete message text, matching the final UI content. |
userIDs | List<String> | Yes | Deduplicated user IDs to notify. |
atUserInfos | List<AtUserInfo> | Yes | Mentioned users and display names corresponding to userIDs. |
quoteMessage | Message | No | Complete quoted message when the mention is also a reply; otherwise null. |
Message message = OpenIMClient.getInstance().messageManager.createTextAtMessage(
text, userIDs, atUserInfos, quoteMessage);The returned Message is only a local pending object. Mentions are normally sent to a group chat. Confirm that each target is still a group member, then use Send a message with that group.
Was this page helpful?