-
Notifications
You must be signed in to change notification settings - Fork 17
How to display modal mirror push notification manually
Supported on Android since version 4.4.0
Manual displaying of Mirror push notifications at a specific time and screen could be done for 2 different use cases in your application:
- including default MM SDK's behaviour (with or without MM SDK's notification builder)
- dismissing default MM SDK's Mirror push notification displaying on the first opened screen while using default MM SDK's notification builder
Manually display modal Mirror push notification for MM SDK's Message object:
MobileInteractive.getInstance(context).displayInAppDialogFor(message);
expand to see Java code
MobileInteractive.getInstance(context).displayInAppDialogFor(message);
Full implementation can be checked in CustomInApp Example
a. Disable automatic modal Mirror push notification displaying. It can be done as described in Notification Settings
b. Register broadcast receiver at application level to get MODAL_IN_APP_NOTIFICATION_IS_READY_TO_DISPLAY Event and Message
from it:
override fun onReceive(context: Context?, intent: Intent) {
val message = Message.createFrom(intent.extras)
}
expand to see Java code
@Override
public void onReceive(Context context, Intent intent) {
Message message = Message.createFrom(intent.getExtras());
}
c. Display modal Mirror push notification for message you received in previous step:
MobileInteractive.getInstance(context).displayInAppDialogFor(message);
expand to see Java code
MobileInteractive.getInstance(context).displayInAppDialogFor(message);
If you have any questions or suggestions, feel free to send an email to support@infobip.com or create an issue.
- Library events
- Server errors
- Users and installations
- Messages and notifications management
- Inbox
Geofencing API- DEPRECATED- Android Manifest components
- Privacy settings
- In-app chat
- Infobip RTC calls and UI
- Backup rules