canHandle

abstract fun canHandle(messageData: Map<String, Any>): Boolean

Check if this handler can process the given message. This method should inspect the message data to determine if it can be handled by this handler. It should return true if the handler can process the message, and false otherwise.

Return

True if this handler can process the message, false otherwise.

Parameters

messageData

The message data to check. Usually a map containing the raw data from the push service. The structure of this map depends on the push service and the platform. In Firebase, it is obtained from the RemoteMessage object.


abstract fun canHandle(message: String): Boolean

Check if this handler can process the given message in string format. This method should inspect the message string to determine if it can be handled by this handler. It should return true if the handler can process the message, and false otherwise.

Return

True if this handler can process the message, false otherwise.

Parameters

message

The message data as a string, typically a JWT or JSON string.