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:
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)
How to create and manage firebase push notification for android oreo
I think you will get resolve your issue from this information.