-->

Android FCM Notification not getting in some Andro

2019-07-11 06:53发布

问题:

When I implement the FCM Notifications for Android app. I am not getting the notifications in some Android devices like Mi, Oppo, One Plus Two etc. in Mi getting refreshed token but not getting the notification and Oppo or One Plus Two not getting the refreshed token and notifications. How can I fix this problem? Thanks...

回答1:

Check your android manifest file. It should be like this

<service
        android:name="yourFireBaseMessagingServiceClass"
        android:enabled="true"
        android:exported="true"
        android:stopWithTask="false">
        <intent-filter>
           <action android:name="com.google.firebase.MESSAGING_EVENT" />
        </intent-filter>
</service>


回答2:

@Raman Dhiman

Form Android version Oreo, there are changes for setting notification in the notification manager. For that, you have to create and manage notification channel to set a notification in notification manager.

For setting Firebase notification, check out below two links:

  1. Firebase Cloud Messaging: Warning updating to Android Oreo. In your case, you will get an error in your log cat as well as also in your device notification toast message (only if developer option is on)

  2. How to create and manage firebase push notification for android oreo

I think you will get resolve your issue from this information.