Overview
The Inbox SDK in Android enables developers to fetch and manage in-app messages stored on the server. This allows users to access messages like promotions, updates, or notifications at their convenience, even if they missed them as push notifications.
Use Case
Purpose:
Provide users with a persistent inbox for messages like promotions, reminders, and updates.
Allow users to access important information even after push notifications are dismissed.
Benefits:
Enhance user engagement by offering on-demand access to messages.
Increase visibility for time-sensitive or critical messages.
Implementation Details
Setup Inbox SDK Integration:
Ensure your project integrates the required SDK version (Inbox SDK is available for Android SDK v5.0+).
Fetch Inbox Messages:
Use the following method to retrieve messages:
Appoxee.instance().fetchInboxMessages(this);
Handle Inbox Messages:
Implement callbacks to process received inbox messages:
InAppInboxCallback callback = new InAppInboxCallback(); callback.addInAppInboxMessagesReceivedCallback(new InAppInboxCallback.onInAppInboxMessagesReceived() { @Override public void onInAppInboxMessages(List<APXInboxMessage> messages) { // Process the list of inbox messages runOnUiThread(() -> { // Update UI if necessary }); } @Override public void onInAppInboxMessage(APXInboxMessage message) { // Process a single inbox message runOnUiThread(() -> { // Display message in UI }); } });
Inbox Message Properties:
Inbox messages include metadata such as:
Subject
Summary
Status (READ, UNREAD, DELETED)
Sent date and expiration date
Rich content (e.g., HTML)
Display Inbox Messages:
Populate the retrieved messages in a RecyclerView or similar UI component for the user to browse.
Keep in mind:
Test inbox message retrieval and display across devices and network conditions.
Use lightweight, clear, and engaging message content for a better user experience.
Messages persist on the server until explicitly deleted or expired.