
Installing Android Dependency
Requirements for displaying images and GIFs in InApp
Starting InApp version 7.0.0, SDK requires Glide to show images and GIFs in the in-apps. You need to add the below dependency in your mainTemplate.gradle file.
Display In-App
Call the below API to show an in-app message on a screen.Self Handled In-Apps
Self Handled In-Apps are messages that are delivered by the SDK but showing has to be done by the App.To show In-Apps call the below method.
Tracking Statistics
Since display, click, and dismiss for Self-Handled InApp is controlled by the application we need you to notify the SDK whenever the In-App is Shown, Clicked, or Dismissed. Below are the methods you need to call to notify the SDK. The InAppSelfHandledCampaignData object provided to the application in the callback for self-handled in-app should be passed in as a parameter to the below APIs.InApp Callbacks
SDK provides callbacks to the client application whenever is shown, dismissed or clicked(only if there is a navigation action or custom action associated with the widget).Use the below callbacks to get notified for the above cases
InApp Shown
InApp Clicked
InApp Custom Action
InApp Dismissed
InApp Payload
Handling Orientation Change
This is only for the Android platform
SDK has to be notified when the device orientation changes for SDK to handle in-app displays. There are two ways to do it:
- Add the API call in the Android native part of your app
- Call MoEngage plugin’s onOrientationChanged()
- Add the API call in the Android native part of your app
This activity needs to be added as an entry point to your app, to do so replace your current entry point with the below code in your AndroidManifest.xml.