Class CardMessage

java.lang.Object
com.wonderpush.sdk.inappmessaging.model.InAppMessage
com.wonderpush.sdk.inappmessaging.model.CardMessage

public class CardMessage extends InAppMessage
Encapsulates an In App Card Message.
  • Method Details

    • create

      public static CardMessage create(@NonNull com.wonderpush.sdk.NotificationMetadata notificationMetadata, org.json.JSONObject data, org.json.JSONObject content) 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
    • getPortraitImageUrl

      @Nullable public String getPortraitImageUrl()
      Gets the image displayed when the phone is in a portrait orientation
    • getLandscapeImageUrl

      @Nullable public String getLandscapeImageUrl()
      Gets the image displayed when the phone is in a landcscape orientation
    • getBackgroundHexColor

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

      @NonNull public List<com.wonderpush.sdk.ActionModel> getPrimaryActions()
      Gets the primary ActionModels associated with this message. If none is defined, the primary action is 'dismiss'
    • getSecondaryActions

      @NonNull public List<com.wonderpush.sdk.ActionModel> getSecondaryActions()
      Gets the secondary ActionModels associated with this message
    • 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
    • getPrimaryButton

      @Nullable public Button getPrimaryButton()
    • getSecondaryButton

      @Nullable public Button getSecondaryButton()
    • getButtonType

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