Closed Pluxury closed 1 month ago
The problem only occurs on Android. On iOS, the push handler is called only once, as it should
Steps to reproduce:
Current behavior:
Push.instance.addOnBackgroundMessage((message) { print('RemoteMessage received while app is in background:\n' 'RemoteMessage.Notification: ${message.notification} \n' ' title: ${message.notification?.title}\n' ' body: ${message.notification?.body}\n' 'RemoteMessage.Data: ${message.data}'); });
It is called several times
Here is my my console output
RemoteMessage received while app is in background: I/flutter ( 8428): RemoteMessage.Notification: null I/flutter ( 8428): title: null I/flutter ( 8428): body: null I/flutter ( 8428): RemoteMessage.Data: {NotificationAction: 1} W/mportal.patien( 8428): Accessing hidden method Landroid/os/WorkSource;->add(I)Z (greylist,test-api, reflection, allowed) W/mportal.patien( 8428): Accessing hidden method Landroid/os/WorkSource;->add(ILjava/lang/String;)Z (greylist,test-api, reflection, allowed) W/mportal.patien( 8428): Accessing hidden method Landroid/os/WorkSource;->get(I)I (greylist, reflection, allowed) W/mportal.patien( 8428): Accessing hidden method Landroid/os/WorkSource;->getName(I)Ljava/lang/String; (greylist, reflection, allowed) I/flutter ( 8428): RemoteMessage received while app is in background: I/flutter ( 8428): RemoteMessage.Notification: null I/flutter ( 8428): title: null I/flutter ( 8428): body: null I/flutter ( 8428): RemoteMessage.Data: {NotificationAction: 1 }
And the situation is similar for push in foregroun
Expected behavior: The push handler is called only once
The problem only occurs on Android. On iOS, the push handler is called only once, as it should
Steps to reproduce:
Current behavior:
It is called several times
Here is my my console output
And the situation is similar for push in foregroun
Expected behavior: The push handler is called only once