Is there any limit to push message on same device - android

Hello I am working on a project where GCM is being used very much to notifify users for certain actions. For this sometimes in a 1 minutes server is continous pushing notification (3-4 messages) to same device.
But I noticed that I receive everytime only 1 message then other 2-3 messages are being discarded. I'm not sure if this is intentional to avoid spamming by Google ?
Does anyone have experience of it. Please share.
Thanks in advance.

If you are sending the messages from your server with the same collapse_key, the GCM server will discard some of them if it receives a message with collapse_key X before it managed to send the last message having the same collapse_key.
If you don't use collapse key, GCM server will discard some of your messages if it accumulated over a 100 messages for the same device that haven't been sent yet.
You can read more about it here.

Related

GCM Messages not Syncronized

I have created an app that send messages between devices using GCM , the thing is
if i want to send several messages in a row its possible that one of the sent messages wont be sent instantly and will be delayed.
My scenario is : I have tried to send 3 messages in a row , i received the first and the third one but couldn't receive the second one !!
One day after I received the second message , how could this be possible ?
Is there any way to sync the sending ? and why it took the second message 24 hours to be received ?
Google is very clear about how you get no guarantee that a message will arrive at all.
In other words, don't depend on messages getting delivered. Your system needs to be robust enough to handle this. Perhaps periodically check. Definitely check if the backend has stored messages you did not receive yet.
If you purely rely on GCM delivering your (chat?) messages, then users will very quickly uninstall your app, because it will be faulty.

Gcm delivery not guaranteed

I am using GCM service for my android chat application, sometimes the message sent without any problem and sometimes it fail without any Ack nor Nack..
I don't change any thing, the network is souitable the message is the same as the previuse...
Why does GCM send sometimes and fail sometimes in the same conditions!
point: I send many types of messages other than the chat messages thet the user write directory.
for example I send: ( online status, typing status, profile photo changed...ect)...
these messages sent to my xmpp server via GCM...
does these (many) messages make GCM stop for a while?
I set delay_while_idle = true and TTL=0
sorry for my English I hope you got me!
OK I found that it's common issue in GCM, i.e this is the behavior of GCM.. delay, random thrulling.. I can call this Bug in GCM although the GCM team see that this delays and thrulling are normal and ok ...
So I would like to find alternative...
I found one platforma that not depents to GCM :
http://www.titaniumtutorial.com/2013/10/acs-push-notification-using-gcm.html?m=1

Number of GCM message in Android

I have implemented the GCM in Android, I want to know suppose I have more than 10K+ users of my app and I want to push the GCM to users simultaneous.
What it is the limit of number of GCM messages in the Android in a day. Any idea ?
There's not any limit in amount to send messages, after the change from C2DM to GCM. However, there actually is a limit in the number of pending messages to deliver if the message can't be delivered in the moment you send it, up to 100.
As per the GCM documentation:
Note: There is a limit on how many messages can be stored without collapsing. That limit is currently 100. If the limit is reached, all stored messages are discarded. Then when the device is back online, it receives a special message indicating that the limit was reached. The application can then handle the situation properly, typically by requesting a full sync.

C2DM message is not received

why is C2DM push notification message sometimes cannot be received by
the device although the status is success?
Thanks
If the server returns a 200 success message, then the expired key is cannot be the case.
The truth is C2DM is not reliable to always send your message (it may send it with delay, if you send multiple there is a change the order will be altered, or it might not get on the other side at all).
I had a somewhat similar problem, when in my first day of sending messages I was getting the 200 status code but no messages on the device. I got the same answer that the one I'm giving you know.
Also, always make sure when you want to receive your messages that you have an internet connection.

android push notification c2dm

I have successfully implemented the android push notification using google c2dm.
the problem is,when i push the message from the server i am getting success full deveice id. but the device some time receive push message,some time did not receive.(wifi is fully active)
i want the app to receive all the push message with out any push message lose,becoz each notification is important.
Is there any special parameter need to set or hw i would i confirm that device successfully received the message.
"C2DM makes no guarantees about delivery or the order of messages. So, for example, while you might use this feature to tell an instant messaging application that the user has new messages, you probably would not use it to pass the actual messages."
But you can try to play with 2 parameters:
collapse_key
An arbitrary string that is used to collapse a group of like messages when the device is offline, so that only the last message gets sent to the client. This is intended to avoid sending too many messages to the phone when it comes back online. Note that since there is no guarantee of the order in which messages get sent, the "last" message may not actually be the last message sent by the application server. Required.
delay_while_idle
If included, indicates that the message should not be sent immediately if the device is idle. The server will wait for the device to become active, and then only the last message for each collapse_key value will be sent. Optional.

Categories

Resources