CardMessage

public class CardMessage extends InAppMessage


Encapsulates a Firebase In App Card Message.

Summary

Public fields

final @NonNull String
final @Nullable Text
final @Nullable ImageData
final @Nullable ImageData
final @NonNull Action
final @Nullable Action
final @NonNull Text

!!!!!WARNING!!!!! We are overriding equality in this class.

Public methods

@Nullable Action

This method is deprecated.

Use getPrimaryAction or getSecondaryAction instead.

@NonNull String

Gets the background hex color associated with this message

@Nullable Text

Gets the body Text associated with this message

@Nullable ImageData

This method is deprecated.

Use getPortraitImageData or getLandscapeImageData instead.

@Nullable ImageData

Gets the ImageData displayed when the phone is in a landscape orientation

@Nullable ImageData

Gets the ImageData displayed when the phone is in a portrait orientation

@NonNull Action

Gets the primary Action associated with this message.

@Nullable Action

Gets the secondary Action associated with this message

@NonNull Text

Gets the title Text associated with this message

Inherited methods

From com.google.firebase.inappmessaging.model.InAppMessage
@Nullable Button

This method is deprecated.

Use the message specific methods (see CardMessage, ModalMessage, BannerMessage, ImageOnlyMessage) instead.

@Nullable String

This method is deprecated.

Use getCampaignMetadata instead.

@Nullable CampaignMetadata

Gets the CampaignMetadata of the message

@Nullable String

This method is deprecated.

Use getCampaignMetadata instead.

@Nullable Map<StringString>

Gets the extra data map of the message.

@Nullable String

This method is deprecated.

Use the message specific methods (see CardMessage, ModalMessage, BannerMessage, ImageOnlyMessage) instead.

@Nullable Boolean

This method is deprecated.

Use getCampaignMetadata instead.

@Nullable MessageType

Gets the MessageType of the message

Public fields

backgroundHexColor

public final @NonNull String backgroundHexColor

body

public final @Nullable Text body

landscapeImageData

public final @Nullable ImageData landscapeImageData

portraitImageData

public final @Nullable ImageData portraitImageData

primaryAction

public final @NonNull Action primaryAction

secondaryAction

public final @Nullable Action secondaryAction

title

public final @NonNull Text title

!!!!!WARNING!!!!! We are overriding equality in this class. Please add equality checks for all new private class members.

Public methods

getAction

public @Nullable Action getAction()

getBackgroundHexColor

public @NonNull String getBackgroundHexColor()

Gets the background hex color associated with this message

getBody

public @Nullable Text getBody()

Gets the body Text associated with this message

getImageData

public @Nullable ImageData getImageData()

getLandscapeImageData

public @Nullable ImageData getLandscapeImageData()

Gets the ImageData displayed when the phone is in a landscape orientation

getPortraitImageData

public @Nullable ImageData getPortraitImageData()

Gets the ImageData displayed when the phone is in a portrait orientation

getPrimaryAction

public @NonNull Action getPrimaryAction()

Gets the primary Action associated with this message. If none is defined, the primary action is 'dismiss'

getSecondaryAction

public @Nullable Action getSecondaryAction()

Gets the secondary Action associated with this message

getTitle

public @NonNull Text getTitle()

Gets the title Text associated with this message