enableInApp
to true
when initializing the SDK
app_opened
and page_viewed
events. Note that these events
are not reported to our sever and is used only to determine if an in-app needs to be shown or not.
If you want to use a custom event as the trigger event, SDK provides a method to raise such an event based on a user action within your app.
<event-name>
is the name of the custom event.
<event-params>
is a flat map of key value pairs. Keys are always of type string, but values can be string, number, date or boolean.
For e.g. If your shopping app wants to display an in-app message when value of items in cart greater than a certain number, app would log
a custom event as follows whenever user adds an item to cart.
castled.xml
(castled.xml
is added to the res/values
folder of your app)
CastledNotifications.resumeInApp()
is invoked. Unlike pauseInApp
,
stopInApp
completely stops evaluating the trigger condition for displaying InApp and all InApp that would have been displayed otherwise would be ignored.