Skip to content
This repository has been archived by the owner on Sep 4, 2020. It is now read-only.

Notifications are not pushing while the app is running in background (only in Android 4.x devices) #490

Closed
GopalakrishnanK opened this issue Jan 11, 2016 · 12 comments

Comments

@GopalakrishnanK
Copy link

Hi,
Initially i was testing my app in android 5.x(Lollipop) devices. I got all my notifications pushed successfully while my app is in background and foreground also. But when i run my app in android 4.x(Kitkat) devices it is receiving notifications only when my app is in foreground and it does not receives while my app is in background. Any suggestion please?

@macdonst
Copy link
Member

@GopalakrishnanK Can you provide me the full payload you are sending to GCM?

@GopalakrishnanK
Copy link
Author

@macdonst Please find my full payload which i'm sending to GCM.

{
message : "30% Offer on each buy!!!",
title: "Lifestyle Offer!!!!",
image : "notification",
notId : "b3c31373b4e09028161aebac7885e40e",
info: "Lifestyle Offer!!!!",
style: "picture",
picture: "http://36.media.tumblr.com/c066cc2238103856c9ac506faa6f3bc2/tumblr_nmstmqtuo81tssmyno1_1280.jpg",
summaryText: "30% Offer on each buy!!!",
collapse_key: "do_not_collapse",
foreground: true,
ad_id: "b3c31373b4e09028161aebac7885e40e"
}

Thanks.

@macdonst
Copy link
Member

@GopalakrishnanK do you put that in data or notification?

@GopalakrishnanK
Copy link
Author

@macdonst I'm putting it in "data" like following.

_msg = {
"data":{
message : "30% Offer on each buy!!!",
title: "Lifestyle Offer!!!!",
image : "notification",
notId : "b3c31373b4e09028161aebac7885e40e",
info: "Lifestyle Offer!!!!",
style: "picture",
picture: "http://36.media.tumblr.com/c066cc2238103856c9ac506faa6f3bc2/tumblr_nmstmqtuo81tssmyno1_1280.jpg",
summaryText: "30% Offer on each buy!!!",
collapse_key: "do_not_collapse",
foreground: true,
ad_id: "b3c31373b4e09028161aebac7885e40e"
}
}

Thanks!!!

@macdonst
Copy link
Member

@GopalakrishnanK I will try and check on this as soon as I can load Android 4.x on a device. Might take until Wednesday.

@GopalakrishnanK
Copy link
Author

@macdonst sure. Thanks.

@macdonst
Copy link
Member

@GopalakrishnanK I installed Android 4.4. on my Nexus 5 and I can't reproduce this issue. I can receive messages when the app is in the foreground or background.

@macdonst macdonst removed the retest label Jan 13, 2016
@GopalakrishnanK
Copy link
Author

@macdonst Thanks. But can you please suggest me what could be possible reasons for this.? I'm confused. Anyways thanks for your help.

@macdonst
Copy link
Member

@GopalakrishnanK can you run adb logcat and reproduce the issue? I'd like to see what the device says.

@GopalakrishnanK
Copy link
Author

@macdonst Sure.
Thanks.

@GopalakrishnanK
Copy link
Author

@macdonst thanks for your help. It is working now actually my problem is 4.x has problem with other plugin. I've fixed it.

@GopalakrishnanK GopalakrishnanK changed the title Notifications are not pushing while the app is running in backround (only in Android 4.x devices) Notifications are not pushing while the app is running in background (only in Android 4.x devices) Jan 27, 2016
@lock
Copy link

lock bot commented Jun 5, 2018

This thread has been automatically locked.

@lock lock bot locked as resolved and limited conversation to collaborators Jun 5, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Development

No branches or pull requests

2 participants