Class SwrveEmbeddedCampaign

    • Constructor Detail

      • SwrveEmbeddedCampaign

        public SwrveEmbeddedCampaign​(ISwrveCampaignManager campaignManager,
                                     SwrveCampaignDisplayer campaignDisplayer,
                                     org.json.JSONObject campaignData)
                              throws org.json.JSONException
        Throws:
        org.json.JSONException
    • Method Detail

      • areAssetsReady

        public boolean areAssetsReady​(java.util.Set<java.lang.String> assetsOnDisk,
                                      java.util.Map<java.lang.String,​java.lang.String> properties)
        Description copied from class: SwrveBaseCampaign
        Determine if the assets for this campaign have been downloaded.
        Specified by:
        areAssetsReady in class SwrveBaseCampaign
        Parameters:
        assetsOnDisk - All assets that are already downloaded.
        properties - String map of personalized properties.
        Returns:
        if the assets are ready
      • getCampaignType

        public com.swrve.sdk.QaCampaignInfo.CAMPAIGN_TYPE getCampaignType()
        Description copied from class: SwrveBaseCampaign
        Used by QAUser to determine what kind of campaign we are reporting
        Specified by:
        getCampaignType in class SwrveBaseCampaign
        Returns:
        CAMPAIGN_TYPE enum
      • getMessageForEvent

        public SwrveEmbeddedMessage getMessageForEvent​(java.lang.String event,
                                                       java.util.Map<java.lang.String,​java.lang.String> payload,
                                                       java.util.Date now,
                                                       java.util.Map<java.lang.Integer,​com.swrve.sdk.QaCampaignInfo> qaCampaignInfoMap)
        Parameters:
        event - trigger event
        payload - payload to compare conditions against
        now - device time
        qaCampaignInfoMap - will contain the reason the campaign wasn't triggered
        Returns:
        SwrveEmbeddedMessage message setup to the given trigger or null otherwise.