Configure In-App Messaging
Configuring In-App Messaging
You can enable and configure in-app messages within your application for both iOS and Android.
Configuring in-app messaging for iOS
To enable in-app messaging for iOS, follow these steps:
- Enable in-app messaging by setting the
enable_in_app_messaging
parameter totrue
in yourhydra-config.plist
file. - Add an Image Set named
inAppPlaceholder
in your project'sAssets.xcassets
. This image will serve as a placeholder when an in-app message does not include an image.
Configuring in-app messaging for Android
- Enable in-app messaging by setting the
enable_in_app_messaging
parameter totrue
in yourhydra-config.json
file. - Add an image file named
hydra_in_app_placeholder
to theandroid/app/src/main/res/drawable
folder. This image will be used as a placeholder when an in-app message does not include an image.
Configuring the Inbox API
This API allows you to retrieve and display a list of messages for a user.
To set up the Inbox API, enable the Inbox API by setting the enable_inbox_api
parameter to true in your hydra-config.plist
file.
Notes
- To use the Inbox API in iOS, you must have added the notification service extension by following the instructions under Configuring rich notifications for iOS.
- The inbox API is always enabled for Android.
Configuring the Inbox UI
This allows you to use the native notification center UI included in Hydra SDK.
To enable the Inbox UI, follow these steps:
- Enable the Inbox API by following the instructions under Configuring the Inbox API.
- For iOS:
- Enable the Inbox UI by setting the
ENABLE_INBOX_UI
parameter totrue
in yourhydra-config.plist
file. - Configure Inbox UI for iOS by adding an image asset named
inboxUIPlaceholder
in your project'sAssets.xcassets
. - To use the default UI configuration for the built-in notification center, set
USE_DEFAULT_INBOX_UI_CONFIG
toYES
inHydraConfig.plist
. - To apply a custom UI configuration, set
USE_DEFAULT_INBOX_UI_CONFIG
toNO
, and define the configuration in theINBOX_UI_CONFIG
key inHydraConfig.plist
.
- Enable the Inbox UI by setting the
- For Android:
- Enable the Inbox UI by setting the
enable_inbox_ui
parameter totrue
in yourhydra-config.json
file. - Configure Inbox UI for Android by adding an image file named
hydra_inbox_ui_placeholder
to theandroid/app/src/main/res/drawable
folder. Inbox UI on Android uses the default configuration.
- Enable the Inbox UI by setting the
Updated about 6 hours ago