Skip to main content
Download

Installation

To add the MoEngage Inbox SDK to your application, edit your application’s pubspec.yaml file and add the below dependency to it:
Run flutter packages get to install the SDK.
This plugin is dependent on moengage_flutter plugin. Make sure you have installed the moengage_flutter plugin as well. Refer to the doc for the same.

Android Installation

V(1) Once you install the Flutter Plugin add MoEngage’s native Android SDK dependency to the Android project of your application. Navigate to android/app/build.gradle. Add the MoEngage Android SDK’s dependency in the dependencies block.
where $sdkVersion should be replaced by the latest version of the MoEngage SDK.

iOS Installation

In the case of iOS, the native dependency is part of the core SDK itself, so there is no need to include any additional dependency for supporting Notification Center.
Make sure to configure AppGroup ID in App Target and Set up Notification Service Extension in your iOS Project, for the SDK to save the received notifications.

Fetch Messages

To fetch all the inbox messages use fetchAllMessages() method as shown below, where you would get an instance of InboxData.

InboxData Payload

InboxData will be received in the below format:

Get Unclicked Message Count

To obtain the unclicked messages count from the Inbox use getUnclickedCount() method as shown below:

Track Message Clicks:

To track clicks on the messages inside your Inbox use trackMessageClicked() method as shown below:

Delete Message:

To delete a particular message from the list of messages use deleteMessage() method as shown below:
The hybrid framework does not support the MoEngage default notification center. Only the Self-handled Notification center is supported.