I am using Firebase in my app for chat. but when I send one message that I receive single notification. it's ok. But after 2-3 minutes I will start receiving all old notifications one by one. here is my code for receiving. I remove all code for notification handling but after that, I still received notification repeatedly:--
public class FirebaseNotificationReceiver extends WakefulBroadcastReceiver {
private final String NOTIFICATION_BODY_KEY = "gcm.notification.body";
@Override
public void onReceive(Context context, Intent intent) {
Log.e("NOTIFICATION RECEIVED", "RECEIVED");
}
in menifest:
<receiver
android:name=".firebase.FirebaseNotificationReceiver"
android:exported="true"
android:permission="com.google.android.c2dm.permission.SEND">
<intent-filter>
<action android:name="com.google.android.c2dm.intent.RECEIVE" />
</intent-filter>
</receiver>