Browse SDKs · Android
SDKsAndroid

Receive custom business messages

Use setCustomBusinessListener to receive business callbacks that are separate from regular chat messages.

Copy

The custom business callback carries a string payload. Parse it according to your application format instead of rendering it directly as a Message.

messageManager.setCustomBusinessListener(new OnCustomBusinessListener() {
    @Override public void onRecvCustomBusinessMessage(String payload) { /* payload contains the custom business data. */ }
});