Apps using version 3.2.0 and later of Iterable's Android SDK can save in-app messages to an inbox. This inbox displays a list of saved in-app messages and allows users to read them at their convenience. The SDK provides a default user interface for the inbox, which can be customized to match your brand's styles. This document describes how Android developers can add Iterable's Mobile Inbox functionality to your mobile app.
To learn how to use Iterable to send in-app messages that users can save to a mobile inbox, read Sending In-App Messages.
IMPORTANT
Versions 3.2.0 and higher of Iterable's Android SDK depend on the AndroidX support libraries. Migrate your app to use AndroidX before using version 3.2.0 or higher.
In this article
Installing Iterable's Android SDK
To add a mobile inbox to your Android app, first install Iterable's Android SDK.
Displaying the mobile inbox
In your app, show the mobile inbox when the user selects a specific tab or taps a particular button.
-
To show the inbox as a tab:
When using a Navigation component, add the
IterableInboxFragment
to the navigation graph XML:<fragment android:id="@+id/inboxFragment" android:name="com.iterable.iterableapi.ui.inbox.IterableInboxFragment" android:label="Inbox" tools:layout="@layout/iterable_inbox_fragment" />
-
To show the inbox as a separate activity in response to a button tap:
Use the provided
InboxActivity
wrapper:Kotlin:
startActivity(Intent(context, IterableInboxActivity::class.java))
Java:
startActivity(new Intent(getContext(), IterableInboxActivity.class));
Syncing a mobile inbox across many devices
Iterable's iOS and Android SDKs automatically sync a mobile inbox across all the devices on which a user has logged in to your app. Additionally, they sync the read state for each message.
If you're not using one of Iterable's mobile SDKs:
- To determine whether or not a message has been read, examine its
read
field, as returned byGET /api/inApp/getMessages
. - To mark a message as read, call
POST /api/events/trackInAppOpen
.
NOTE
For more information about cross-device read state syncing, see:
- Iterable's Android SDK, v3.2.12 release notes
- Iterable's iOS SDK, v6.2.21 release notes
Customizing the mobile inbox
To learn how to customize the mobile inbox in an Android app, read Customizing Mobile Inbox on Android.
Further reading
User guides:
- In-App Messages and Mobile Inbox
- Sending In-App Messages
- Events for In-App Messages and Mobile Inbox
Developer documentation:
- Iterable's iOS SDK
- Iterable's Android SDK
- In-App Messages Overview
- In-App Messages on iOS
- In-App Messages on Android
- Setting up Mobile Inbox on iOS
- Customizing Mobile Inbox on iOS
- Customizing Mobile Inbox on Android
- Animating In-App Messages with CSS
- Image Carousels in In-App Messages
- Testing and Troubleshooting In-App Messages
- In-App Messages Without the SDK
- API Overview and Sample Payloads
- API Overview