FCM Push notification not receiving in Android customized OS

691 views Asked by At

Can anybody please help me to solve this issue...

I have implemented the FCM functionality in my project. Its normally working in all default android OS versions. phones like moto, nexus, redmi, etc.,

But I have installed the same apk in oppo, vivo, one plus3, honor, etc., (customized OS). Which I am not getting any notifications from my app.

Why this is happening.. And also I have checked with the some other apps like inshorts, dailyhunt, etc., which is getting push notifications in customized OS.

I have tried all the given solutions. 1. Allowed my app in battery optimization. (Honor) 2. Allowed my app as non protected app. 3. Whitelisted my app from the list.

These are all working..

But I need to get push notification without doing this... like inshorts, dailyhunt, whatsapp, fb, etc.,

Am searching for this long time. Pls help me with this.

Thanks in advance.

1

There are 1 answers

0
syedjibharat On BEST ANSWER

Try this in your Manifest file. Hope you will receive push notification without modifying your system settings.

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

stopwithtask=false did the trick.