Receiving Multiple Notifications on Ejected Android App


#1

We have ejected the app for linking with native library and the following things are done on plain ejected app. So no other package is involved in the testing.

We are sending the following payload using FCM.

{
        android: {
            priority: 'high',
            notification: {
                title: 'TITLE',
                body: 'BODY',
                color: '#f45342'
            }
        },
        data: {
            title: 'TITLE',
            message: 'MESSAGE',
            experienceId: 'EXPERIENCE ID'
        },
        token: registrationToken
    }
  1. We are receiving single notification if we use only “data” in the payload but we want to have an icon & sound setting so we are using “notification” and because of using “notification” we are receiving multiple notifications.

  2. We are also receiving multiple notifications If we use only “notification” without “data” so we figured that having “notification” object in the payload is causing this problem.

  3. Using only “data” object is working great and we would like to know if there is any way to show our icon & sound setting through app.json or android code instead of sending them from push notification as it is showing multiple notifications in the list.