2

I did Firebase notification in android but getting some issue in that when I close application then I didn’t got notification on some devices and these devices are:

  1. Lenovo A6020a40 which is having os 5.1.1
  2. Redmi 3s prime which is having os 6.0
  3. Panasonic operating system is 6.0 if anyone get solution for these devices please let me know.
CroMagnon
  • 1,218
  • 7
  • 20
  • 32

3 Answers3

0

For All Xiaomi devices, the only solutions seem to be:

Enabling Auto Start on Xiaomi devices.

Apparently, WhatsApp and Facebook app are whitelisted i.e by default set to Auto-Start:ON by the device OS. That's why, no matter even if they are cleared from RAM, they keep receiving notifications.

How to launch Auto Start Screen for Xiaomi devices

Community
  • 1
  • 1
AbhiJW10
  • 11
  • 3
0

Also, you're recommended to set default values to customize the appearance of notifications. You can specify a custom default icon and a custom default color that are applied whenever equivalent values are not set in the notification payload.

Add these lines inside the application tag to set the custom default icon and custom color:

Set custom default icon. This is used when no icon is set for incoming notification messages.

<meta-data
    android:name="com.google.firebase.messaging.default_notification_icon"
    android:resource="@drawable/ic_stat_ic_notification" />

Set color used with incoming notification messages. This is used when no color is set for the incoming notification message.

<meta-data
    android:name="com.google.firebase.messaging.default_notification_color"
    android:resource="@color/colorAccent" />

you may read more at this FCM Recieve Notifications

Umar Ata
  • 4,170
  • 3
  • 23
  • 35
0

I Solved it for redmi 3s prime , for this device i provide auto-start permission manually , you can check it here " https://xiaomininja.com/2015/08/10/miui-tip-enable-autostart-to-never-miss-a-notification-again/ "and solved. , if anyone found some solution for other devices please let me know .