Browse SDKs · Android
SDKsAndroid

Create a contact card message

Use createCardMessage to create a contact card message.

Copy

CardElem stores the user ID, nickname, avatar, and other display data for the contact card. Include only fields that recipients may view; do not substitute a private friend remark or in-group nickname for the public profile.

Message message = OpenIMClient.getInstance().messageManager.createCardMessage(cardElem);

The returned Message is only a local pending object. This method does not send the card or refresh its user profile. Continue with Send a message.