Class ModalMessage

java.lang.Object
com.wonderpush.sdk.inappmessaging.model.InAppMessage
com.wonderpush.sdk.inappmessaging.model.ModalMessage
All Implemented Interfaces:
InAppMessage.InAppMessageWithImage

public class ModalMessage extends InAppMessage implements InAppMessage.InAppMessageWithImage
Encapsulates an In App Modal Message.
  • Method Details

    • create

      public static ModalMessage create(com.wonderpush.sdk.NotificationMetadata notificationMetadata, org.json.JSONObject payloadJson, org.json.JSONObject modalJson) throws com.wonderpush.sdk.inappmessaging.model.Campaign.InvalidJsonException
      Throws:
      com.wonderpush.sdk.inappmessaging.model.Campaign.InvalidJsonException
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • equals

      public boolean equals(Object o)
      Overrides:
      equals in class Object
    • getTitle

      @NonNull public Text getTitle()
      Gets the title Text associated with this message
    • getBody

      @Nullable public Text getBody()
      Gets the body Text associated with this message
    • getImageUrl

      @Nullable public String getImageUrl()
      Gets the image associated with this message
      Specified by:
      getImageUrl in interface InAppMessage.InAppMessageWithImage
    • getBackgroundHexColor

      @NonNull public String getBackgroundHexColor()
      Gets the background hex color associated with this message
    • getActions

      @NonNull public List<com.wonderpush.sdk.ActionModel> getActions()
      Gets the ActionModels associated with this message
    • getButton

      @Nullable public Button getButton()
    • getCloseButtonPosition

      @NonNull public InAppMessage.CloseButtonPosition getCloseButtonPosition()
    • getButtonType

      public InAppMessage.ButtonType getButtonType(List<com.wonderpush.sdk.ActionModel> actions)
      Specified by:
      getButtonType in class InAppMessage