addMessageListener static method

dynamic addMessageListener(
  1. String listenerId,
  2. MessageListener listenerClass
)

For every activity or fragment you wish to receive messages in, you need to register the MessageListener

listenerId unique id for listener

Implementation

static addMessageListener(String listenerId, MessageListener listenerClass) {
  _messageListeners[listenerId] = listenerClass;
}