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

P.Lorand
  • 1,394
  • 3
  • 17
  • 26

2 Answers2

3

By default MoEngage SDK on Android only shows one notification at any point in time. This behaviour can be changed by enabling multiple notification while initialising the SDK. To enable multiple notifications call the below method on the MoEngage.Builder object while initialising the SDK

setNotificationType(R.integer.notification_type_multiple)

Umang
  • 966
  • 2
  • 7
  • 17
1

On the native side to show a notification you use NotificationManager and call its notify(int id, Notification notification) method. In your case the id parameter needs to be unique, for example you can pass System.currentTimeMillis() as the id, because it overrides notifications with the same id.

Tiko
  • 851
  • 8
  • 15