loadMessagingView

Load the BatchMessagingView corresponding to the message payload.

This method should be called from your UI thread.

Note that this method will not display the message. You will have to call showView or showFragment according to the kind.

Example:


  val messagingView = Batch.Messaging.loadMessagingView(this, message)
  when (messagingView.kind) {
      BatchMessagingView.Kind.Fragment -> messagingView.showFragment(supportFragmentManager, "batch-landing")
      BatchMessagingView.Kind.View -> messagingView.showView(this)
   }

Return

A BatchMessagingView instance.

Parameters

context

Your activity's context. Can't be null.

message

Message to display. Can't be null.

Throws

When loading fail