interceptReceivedMessage

public abstract boolean interceptReceivedMessage(Message message, int left, boolean hasPackage, boolean offline)

Called when a real-time or offline message is received.

Offline message batching notes:

  • The server packs up to 200 messages per batch.
  • hasPackage indicates whether additional batches remain on the server.
  • left indicates remaining messages in the current batch after this one.
  • Offline sync is complete when both hasPackage and left are 0.

Return

true to intercept (SDK will not process further); false to pass through

Parameters

message

the received message

left

remaining message count in the current batch

hasPackage

whether additional message batches remain on the server

offline

whether this message is an offline message