0

I am testing on android 9 and I have observed that if I send two or more notifications I will always have only one notification and that is the last one I sent.

Do you know if this is a known issue? If not then do you know what could cause this issue or where on the native side can I take a look more closely into this?

react-native: 0.61.5

react-native-moengage: 4.1.0 also on 5.0

4

2 回答 2

3

默认情况下,Android 上的 MoEngage SDK 在任何时间点仅显示一个通知。可以通过在初始化 SDK 时启用多个通知来更改此行为。MoEngage.Builder要启用多个通知,请在初始化 SDK 时在对象上调用以下方法

setNotificationType(R.integer.notification_type_multiple)

于 2020-04-08T16:41:34.507 回答
0

在本机端显示您使用的通知NotificationManager并调用其notify(int id, Notification notification)方法。在您的情况下,id参数必须是唯一的,例如您可以System.currentTimeMillis()作为传递id,因为它会覆盖具有相同的通知id

于 2020-04-08T16:39:13.663 回答