Browse SDKs · Android
Platform
SDKsAndroid

Create an emoji message

Use createFaceMessage to create a custom emoji message.

Copy

index is the application-defined emoji identifier. data stores an emoji URL, resource version, or other custom information. Sending and receiving clients must interpret both values with the same protocol.

Message message = OpenIMClient.getInstance().messageManager.createFaceMessage(index, dataJson);

The returned Message is only a local pending object. If the receiver does not recognize the emoji identifier or resource version, it can display a placeholder image or text. Continue with Send a message.