Class LocalCampaign
- java.lang.Object
-
- com.batch.android.localcampaigns.model.LocalCampaign
-
public class LocalCampaign extends java.lang.ObjectRepresents an In-App messaging campaign
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classLocalCampaign.OutputDefine how this campaign will be displayed on the screen when triggered successfullystatic interfaceLocalCampaign.TriggerRepresents what will triggers the display of an In-App Campaign
-
Field Summary
Fields Modifier and Type Field Description java.lang.Integercapping"Soft" capping OptionalJSONObjectcustomPayloadCustom payloadBatchDateendDateCampaign end date OptionalJSONObjecteventDatajava.lang.StringidCampaign ID, used to track views and cappingjava.lang.IntegermaximumAPILevelMaximum API level Optionaljava.lang.IntegerminimumAPILevelMinimum messaging API level OptionalintminimumDisplayInterval"Soft" cappingLocalCampaign.OutputoutputOutputbooleanpersistPersist OptionalintpriorityPriority Optional (default = 0)java.lang.StringpublicTokenDashboard campaign tokenBatchDatestartDateCampaign start datejava.util.List<LocalCampaign.Trigger>triggersTrigger Optional
-
Constructor Summary
Constructors Constructor Description LocalCampaign()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddisplayMessage()voidgenerateOccurrenceID()
-
-
-
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 OptionalThe minimum messaging API level (not to be confused with SDK API Level)
-
maximumAPILevel
@Nullable public java.lang.Integer maximumAPILevel
Maximum API level OptionalQuite 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 dateIf the device date is earlier than this date, the campaign should not be displayed
-
endDate
@Nullable public BatchDate endDate
Campaign end date OptionalIf it is defined and the device date is later than this date, the campaign should not be displayed
-
minimumDisplayInterval
public int minimumDisplayInterval
"Soft" cappingMinimum time between two displays (in seconds) for this campaign
-
capping
@Nullable public java.lang.Integer capping
"Soft" capping OptionalNumber of times a user can view this campaign before being uneligible
-
output
@NonNull public LocalCampaign.Output output
OutputHow the message should be displayed (Landing, notification)
-
eventData
@NonNull public JSONObject eventData
-
triggers
@NonNull public java.util.List<LocalCampaign.Trigger> triggers
Trigger OptionalTrigger 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 OptionalWhether 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
-
-