Class LocalCampaign


  • public class LocalCampaign
    extends java.lang.Object
    Represents an In-App messaging campaign
    • Field Detail

      • id

        @NonNull
        public java.lang.String id
        Campaign ID, used to track views and capping
      • minimumAPILevel

        @Nullable
        public java.lang.Integer minimumAPILevel
        Minimum messaging API level Optional

        The minimum messaging API level (not to be confused with SDK API Level)

      • maximumAPILevel

        @Nullable
        public java.lang.Integer maximumAPILevel
        Maximum API level Optional

        Quite like the minimum API level, but maximum. Useful for dealing with old SDKs.

      • priority

        public int priority
        Priority Optional (default = 0)

        Priority score: the higher, the more likely it is to be shown to the user Used as a "last resort" method to pick the most appropriate In-App campaign

      • startDate

        @Nullable
        public BatchDate startDate
        Campaign start date

        If the device date is earlier than this date, the campaign should not be displayed

      • endDate

        @Nullable
        public BatchDate endDate
        Campaign end date Optional

        If it is defined and the device date is later than this date, the campaign should not be displayed

      • minimumDisplayInterval

        public int minimumDisplayInterval
        "Soft" capping

        Minimum time between two displays (in seconds) for this campaign

      • capping

        @Nullable
        public java.lang.Integer capping
        "Soft" capping Optional

        Number of times a user can view this campaign before being uneligible

      • output

        @NonNull
        public LocalCampaign.Output output
        Output

        How the message should be displayed (Landing, notification)

      • triggers

        @NonNull
        public java.util.List<LocalCampaign.Trigger> triggers
        Trigger Optional

        Trigger that will, well, trigger the campaign. For example: event-based trigger. If not specified, the campaign should be immediately triggered once it has been retrieved.

      • persist

        public boolean persist
        Persist Optional

        Whether this campaign should be persisted on disk or not. Campaigns persisted on disk need to have a triggers to work.

      • publicToken

        public java.lang.String publicToken
        Dashboard campaign token
      • customPayload

        @Nullable
        public JSONObject customPayload
        Custom payload
      • requiresJustInTimeSync

        public boolean requiresJustInTimeSync
        Flag indicating if this campaign must be verified from the server before being displayed
    • Constructor Detail

      • LocalCampaign

        public LocalCampaign()
    • Method Detail

      • generateOccurrenceID

        public void generateOccurrenceID()
      • displayMessage

        public void displayMessage()