-
- All Implemented Interfaces:
-
android.os.Parcelable
public final class PLYPresentation implements Parcelable
-
-
Field Summary
Fields Modifier and Type Field Description private final Stringidprivate final StringplacementIdprivate final StringaudienceIdprivate final StringabTestIdprivate final StringabTestVariantIdprivate final StringcampaignIdprivate final StringflowIdprivate final Stringlanguageprivate final PLYPresentationTypetypeprivate final List<PLYPresentationPlan>plansprivate final PLYPresentationMetadatametadataprivate final StringbackgroundColorprivate final StringcontentIdprivate final Integerheightprivate final PLYTransitiondisplayModeprivate final List<PLYConnection>connections
-
Constructor Summary
Constructors Constructor Description PLYPresentation(String id, String placementId, String audienceId, String abTestId, String abTestVariantId, String campaignId, String flowId, String language, PLYPresentationType type, List<PLYPresentationPlan> plans, PLYPresentationMetadata metadata, String backgroundColor, String contentId, Integer height, PLYTransition displayMode, List<PLYConnection> connections, Boolean preview, PreviewInfo previewInfo, String internalId, String internalPlacementId, String internalAudienceId, String internalAbTestId, String internalAbTestVariantId, String requestId, String internalCampaignId, PLYPresentationProperties properties, Flow flow, List<Action> actions)
-
Method Summary
Modifier and Type Method Description final StringgetId()final StringgetPlacementId()final StringgetAudienceId()final StringgetAbTestId()final StringgetAbTestVariantId()final StringgetCampaignId()final StringgetFlowId()final StringgetLanguage()final PLYPresentationTypegetType()final List<PLYPresentationPlan>getPlans()final PLYPresentationMetadatagetMetadata()final StringgetBackgroundColor()final StringgetContentId()final IntegergetHeight()final PLYTransitiongetDisplayMode()final List<PLYConnection>getConnections()final Map<String, Object>toMap()final Unitexecute(PLYConnection connection)Executes actions of the provided connection. final Unitback()Navigates to the previous step in the flow. final PLYPresentationViewbuildView(Context context, PLYPresentationProperties properties, Function2<PLYProductViewResult, PLYPlan, Unit> callback)final Unitdisplay(Context context, PLYTransitionType transitionType, Float transitionHeight, Function2<PLYProductViewResult, PLYPlan, Unit> callback)Displays the presentation in a separate activity. final Unitdisplay(Activity activity, PLYTransitionType transitionType, Float transitionHeight, Function2<PLYProductViewResult, PLYPlan, Unit> callback)Displays the presentation in a separate activity. final FragmentgetFragment(Function2<PLYProductViewResult, PLYPlan, Unit> callback)Returns a Fragment that can be used to display the presentation. final Unitclose()-
-
Constructor Detail
-
PLYPresentation
PLYPresentation(String id, String placementId, String audienceId, String abTestId, String abTestVariantId, String campaignId, String flowId, String language, PLYPresentationType type, List<PLYPresentationPlan> plans, PLYPresentationMetadata metadata, String backgroundColor, String contentId, Integer height, PLYTransition displayMode, List<PLYConnection> connections, Boolean preview, PreviewInfo previewInfo, String internalId, String internalPlacementId, String internalAudienceId, String internalAbTestId, String internalAbTestVariantId, String requestId, String internalCampaignId, PLYPresentationProperties properties, Flow flow, List<Action> actions)
-
-
Method Detail
-
getPlacementId
final String getPlacementId()
-
getAudienceId
final String getAudienceId()
-
getAbTestId
final String getAbTestId()
-
getAbTestVariantId
final String getAbTestVariantId()
-
getCampaignId
final String getCampaignId()
-
getLanguage
final String getLanguage()
-
getType
final PLYPresentationType getType()
-
getPlans
final List<PLYPresentationPlan> getPlans()
-
getMetadata
final PLYPresentationMetadata getMetadata()
-
getBackgroundColor
final String getBackgroundColor()
-
getContentId
final String getContentId()
-
getDisplayMode
final PLYTransition getDisplayMode()
-
getConnections
final List<PLYConnection> getConnections()
-
execute
final Unit execute(PLYConnection connection)
Executes actions of the provided connection. If no connection is provided, it will execute the default connection's actions if any.
- Parameters:
connection- The connection whose actions should be executed.
-
back
final Unit back()
Navigates to the previous step in the flow. If there is no previous step, the flow will be closed. Works only if the presentation is part of a flow.
-
buildView
final PLYPresentationView buildView(Context context, PLYPresentationProperties properties, Function2<PLYProductViewResult, PLYPlan, Unit> callback)
-
display
final Unit display(Context context, PLYTransitionType transitionType, Float transitionHeight, Function2<PLYProductViewResult, PLYPlan, Unit> callback)
Displays the presentation in a separate activity.
- Parameters:
context- The context to use to display Purchasely Screens.transitionType- Optional transition type override.transitionHeight- Optional transition height override.
-
display
final Unit display(Activity activity, PLYTransitionType transitionType, Float transitionHeight, Function2<PLYProductViewResult, PLYPlan, Unit> callback)
Displays the presentation in a separate activity.
- Parameters:
activity- The activity to use to display Purchasely Screens.transitionType- Optional transition type override.transitionHeight- Optional transition height override.
-
getFragment
final Fragment getFragment(Function2<PLYProductViewResult, PLYPlan, Unit> callback)
Returns a Fragment that can be used to display the presentation.
-
-
-
-