Firebase push notification not delivered if device is idle for few minutes and no charging state
Firebase push notification is working fine for all three states of app: foreground, background, killed.
But notification not delivered if device is idle for few minutes and no charging state. However on charging push notification is working no matter how long idle time is.
I have tried with:
-
disabling 'Power saving mode'.
-
disabling 'Adaptive power saving mode'.
-
battery optimization for app.
-
added in manifest
<uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" /> <uses-permission android:name="android.permission.WAKE_LOCK" />
-
removed [android:exported="false"] from
<service android:name="firebase.MyFirebaseMessagingService" =>[android:exported="false"]> <intent-filter> <action android:name="com.google.firebase.MESSAGING_EVENT" /> </intent-filter> </service>
{
"registration_ids": [
"ei0....ySI"
],
"data": {
"priority" : "high",
"title": "msg title",
"body": "msg body"
},
"android": {
"priority": "high"
},
"apns": {
"headers": {
"apns-priority": "10"
}
},
"webpush": {
"headers": {
"Urgency": "high"
}
}
}
from Recent Questions - Stack Overflow https://ift.tt/3CRMrcM
https://ift.tt/eA8V8J
Comments
Post a Comment