<abstract> new InAppMessage()
Classes
Members
-
<static, readonly> ClickAction :string
-
Enum to represent valid click actions for messages.
Type:
- string
Properties:
Name Type Default Description NEWS_FEEDstring NEWS_FEED URIstring URI NONEstring NONE -
<static, readonly> CropType :string
-
Enum to represent how to crop a message's image.
Type:
- string
Properties:
Name Type Default Description CENTER_CROPstring CENTER_CROP Centers the image in the available space and crops any overflowing edges
FIT_CENTERstring FIT_CENTER Fits the image within the available space, causing blank space on the shorter axis (e.g. tall images will have bars of blank space on the left/right)
-
<static, readonly> DismissType :string
-
Enum to represent how messages should be dismissed.
Type:
- string
Properties:
Name Type Default Description AUTO_DISMISSstring AUTO_DISMISS MANUALstring SWIPE -
<static, readonly> ImageStyle :string
-
Enum to represent how images on messages should be displayed.
Type:
- string
Properties:
Name Type Default Description TOPstring TOP GRAPHICstring GRAPHIC -
<static, readonly> OpenTarget :string
-
Enum to represent how clicks on messages should be opened.
Type:
- string
Properties:
Name Type Default Description NONEstring NONE BLANKstring BLANK -
<static, readonly> Orientation :string
-
Enum to represent how messages should be oriented.
Type:
- string
Properties:
Name Type Default Description PORTRAITstring PORTRAIT LANDSCAPEstring LANDSCAPE -
<static, readonly> SlideFrom :string
-
Enum to represent valid origins for messages to slide in from.
Type:
- string
Properties:
Name Type Default Description TOPstring TOP BOTTOMstring BOTTOM -
<static, readonly> TextAlignment :string
-
Enum to represent how text should be aligned.
Type:
- string
Properties:
Name Type Default Description STARTstring START CENTERstring CENTER ENDstring END
Methods
-
removeAllSubscriptions()
-
Remove all event subscriptions from this message.
-
removeSubscription(subscriptionGuid)
-
Remove an event subscription that you previously subscribed to.
Parameters:
Name Type Description subscriptionGuidstring The identifier of the subscription you wish to remove, returned by the method you initially used to create it.
-
subscribeToClickedEvent(subscriber) → {string}
-
Subscribe to receive click events. The subscriber callback will be called whenever this message is clicked by the user.
Parameters:
Name Type Description subscriberfunction The callback function to receive click events. This function will be invoked with no arguments when this message records a click.
Returns:
The identifier of the subscription created. This can be passed to removeSubscription to cancel the subscription.
- Type
- string
-
subscribeToDismissedEvent(subscriber) → {string}
-
Subscribe to receive dismissed events. The subscriber callback will be called whenever this message is closed by the user, or when it's dismissed automatically (depending on the dismissType).
Parameters:
Name Type Description subscriberfunction The callback function to receive dismissed events. This function will be invoked with no arguments when this message records a dismissal.
Returns:
The identifier of the subscription created. This can be passed to removeSubscription to cancel the subscription.
- Type
- string