Description
Step 1: Are you in the right place?
yes
Step 2: Describe your environment
- Android device: Xiaomi MI5
- Android OS version: 6.0
- Google Play Services version: 9.2.56
- Firebase/Play Services SDK version: 9.2.1
Step 3: Describe the problem:
Can't get push notification in background / when app is closed (swiped from recents apps)
Steps to reproduce:
followed these steps
and from POSTMAN
header
Authorization:key=xxxxxxxxxxxxx
Content-Type:application/json
below is payload
{
"notification":{
"title":"Notification title",
"body":"Notification body",
"sound":"default"
},
"to":"d5nwyla-QAY:APA91bEUlVdu8kahO2L7GZc0sdGnjAieBMY6zFSY2r-B-cvTveLpW0_lCNHSQ7R4q3DKzY1VOwVDhpDuOTPGW400SrYGxn3jTlPZU3sVi6zAd7wBYgyqIydVsKuOVWrtVe-CpEC7Sqvt",
"priority":"high",
"data":{
"param1":"value1",
"param2":"value2"
}
}
Observed Results:
getting notification in-app also when app is minimise (pressing home)
getting below warning from logcat
07-16 23:40:55.161 2941 2941 W GCM-DMM : broadcast intent callback: result=CANCELLED forIntent { act=com.google.android.c2dm.intent.RECEIVE flg=0x10000000 pkg=com.infogain.bioclinica (has extras) }
Expected Results:
Should get notification in background