Quickstart-android: Notification is not received when i closed my application or in background

Created on 5 Oct 2016  路  4Comments  路  Source: firebase/quickstart-android

Step 1: Are you in the right place?

Notification is not received when my application is in closed state.

Step 2: Describe your environment

  • Android device: Xiaomi redmi prime 2
  • Android OS version: 4.4.4
  • Google Play Services version: 9.6.0
  • Firebase/Play Services SDK version: 9.6.0

    Step 3: Describe the problem:

Notification is not received on my mobile when i closed my application at the time app is not in foreground or background

Steps to reproduce:

  1. Minimize and swipe out your application
  2. Send FCM notification
  3. You can see the below log but notification doesn't trigger

    Observed Results:

10-05 23:00:28.255 19837-19837/? W/GCM-DMM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000000 pkg=com.ancient.tradingsignals (has extras) }

Expected Results:

Should get the notification

Relevant Code:

I have followed basic snippets of FCM sample

Most helpful comment

Why you guys closing threads without providing a proper response!
Whenever the app is swipe closed from recent app list, we are getting this message in the log instead of a valid payload in the firebase notification handler

W/GCM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=* (has extras) }

All 4 comments

Have you seen issue #4? There is a lot of discussion on this. The short answer is that you should not expect FCM notifications when your app is in the killed state, the long answer is reading that thread :smile:

Why you guys closing threads without providing a proper response!
Whenever the app is swipe closed from recent app list, we are getting this message in the log instead of a valid payload in the firebase notification handler

W/GCM: broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=* (has extras) }

Any updates?

Same log when app is in background

broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE pkg=* (has extras) }

Was this page helpful?
0 / 5 - 0 ratings