简体   繁体   中英

FCM Push notification not receiving in Android customized OS

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.

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM