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:

  1. disabling 'Power saving mode'.

  2. disabling 'Adaptive power saving mode'.

  3. battery optimization for app.

  4. added in manifest

    <uses-permission android:name="com.google.android.c2dm.permission.RECEIVE" />
    <uses-permission android:name="android.permission.WAKE_LOCK" />
    
  5. 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

Popular posts from this blog

Today Walkin 14th-Sept

Spring Elasticsearch Operations

Hibernate Search - Elasticsearch with JSON manipulation