Browse SDKs · Android
SDKsAndroid

Create a text message

Use createTextMessage to create a text Message.

Copy

createTextMessage() accepts non-empty text and creates a pending Message; it does not send it. Apply product length limits and content checks before the call.

Message message = OpenIMClient.getInstance().messageManager.createTextMessage(text);

Add the returned Message to a local send queue if needed, then deliver it with Send a message. The send callback determines whether delivery from this client succeeded.