DMC API now enable you to specify if notifications should be displayed on the foreground
Info |
---|
Prerequisites [iOS]Relevant for devices with iOS 10 and above. |
Note |
---|
Default behaviour will be that notifications are not displayed when app is in the foreground. |
You can now specify whether notifications should be displayed on the foreground using DMC API by setting the below.
Expand |
---|
|
Code Block |
---|
[[Appoxee shared] setShowNotificationsOnForeground:YES]; |
|
Expand |
---|
|
Code Block |
---|
Appoxee.shared()?.showNotificationsOnForeground = true; |
|
In order to receive push notification in foreground in class which extends android.app.Application class within onCreate method for AppoxeeOptions set notification mode
Expand |
---|
|
Code Block |
---|
AppoxeeOptions opt = new AppoxeeOptions();
opt.notificationMode = NotificationMode.BACKGROUND_AND_FOREGROUND; |
NotificationMode is an enum and you can choose one of three options: BACKGROUND_ONLY - notification will show only when the app is closed or in idle mode. BACKGROUND_AND_FOREGROUND - notification will show every time when a push notification comes. SILENT_ONLY - notification never shows on the device.
|