Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
350 views
in Technique[技术] by (71.8m points)

android - Receiving the FCM notifications multiple times on Nougat

I am using Firebase push notifications in my app. But when I am sending a notification for some event, I am getting notification's multiple times after 2-3 minutes on Nougat devices only. I am getting only a single notification on the devices which are having lower version than Nougat.

I have checked that server is sending only a single notification at a time. I am having below dependency in my app gradle.

compile `com.google.firebase:firebase-messaging:11.8.0`

And here is the code for FCM Listener:

public class MyFcmListenerService extends FirebaseMessagingService {

    @Override
public void onMessageReceived(RemoteMessage remoteMessage) {

  }
}

In manifest file:

<service android:name="com.myApp.test.fcm.MyFcmListenerService">
  <intent-filter>
     <action android:name="com.google.firebase.MESSAGING_EVENT" />
   </intent-filter>
</service>
See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...