As of 5/2011 the google documentation for c2dm says this:
"Google limits the number of messages a sender sends in aggregate, and the number of messages a sender sends to a specific device"
What is the specific limitation? If my server sends 10 messages a day to 10,000 devices will Google shut my app down?
When you signup C2DM here, you're asked to fill in a estimated "Estimated total number of messages per day" and "Estimated peak queries per second (QPS)".
According the C2DM quotas page, the currently default limit is approximately 200,000 messages per day.
If your requirement exceeds this limit, you should make sure using C2DM correctly, and submit the request quotas at the bottom link of the quotas page.
The specific limitation is derived per account and is modifiable upon (reasonable) request. For example, I have c2dm account which is "restricted" to "just" 100,000 c2dm messages per day.
If you worry about message count limitation, you should switch to GCM anyways.
There is only a limit of messages saved before collapsing, which is 100.
C2DM is deprecated and has been replaced by Google Cloud Messaging for Android (GCM).
Google's statement:
Important: C2DM has been officially deprecated as of June 26, 2012.
This means that C2DM has stopped accepting new users and quota requests.
No new features will be added to C2DM. However, apps using C2DM will continue to work.
Existing C2DM developers are encouraged to migrate to the new version of C2DM,
called Google Cloud Messaging for Android (GCM).
See the C2DM-to-GCM Migration document for more information.
Developers must use GCM for new development.
There is a demo app tutorial for GCM and also for migration from C2DM.
Related
Just now Google introduced Google Cloud Messaging for Android. But here problem is that end user must have atleast one google account to use this service. is possible to skip GCM and send push notification end user or suggest any other way?
Important: C2DM has been officially deprecated as of June 26, 2012. At that time C2DM stopped accepting new users and quota requests. C2DM has been replaced by Google Cloud Messaging for Android (GCM). The C2DM service will continue to be maintained in the short term, but developers must use GCM for new development. We also encourage developers to move existing C2DM applications to GCM to take advantage of GCM features. See the C2DM-to-GCM Migration document for more information.
Well this is part of C2DM prerequisite Can't skip this mate.. thanks
To use GCM user have to be registered in goggle service. If you distribute you application only by Google Play this is not a problem.
There are alternatives but they have lots of disadvantages: sending SMS (you have to pay for it); implement own Push Notifications (by polling your server) - it is easy to make some mistake and drain phones battery and requires lots of work.
Is it possible for android enabled phone to intercept all C2DM notifications? If so, which way should dig.
Few days back the announcement came that C2DM will be officially deprecated.
At that time C2DM stopped accepting new users and quota requests.
C2DM has been replaced by Google Cloud Messaging for Android (GCM). The C2DM service will continue to be maintained in the short term, but developers must use GCM for new development.
So in near feature we may need to move existing C2DM applications to GCM to take advantage of GCM features.
No, it's not possible to intercept C2DM or GCM messages. The system won't deliver them to your interceptor. They are not delivered via an unsecured Broadcast Intent.
I planning the application pushes a newsletter to all registered users.
Number of users is approximately 200,000 ~ 300,000.
I'm caring about the traffic issue with google c2dm server.
Can I request to c2dm server in a loop with large number of users using HttpURLConnection?
Will I banned?
I heard something about in this case I must use http 1.1 protocol with keepAlive set true.
C2DM does have quotas, both on the messages per device and total number of messages. you can find the details here:
http://code.google.com/android/c2dm/quotas.html
as it says, 200k is the default limit but you can request a larger quota. i've done this at a company and it was no problem, but i can't say for sure how helpful they will be to the average developer.
as far as i know, there's no quota on the rate that you send them. you can send them as fast as the google servers will accept your requests.
I planning the application pushes a newsletter to all registered
users.
you should make sure you aren't trying to push a payload through C2DM. that's clearly a misuse of the service. C2DM must be used to wake up the device only. in your case, the message itself should be "hey device there's a new newsletter on the server, go get it". assuming that's happening but a few times a day at most, it will be within the accepted use for C2DM.
I would like to implement a feature that only delivers messages to devices at specific periods. After the valid time, messages would be abandoned. Can anyone suggest me how to do this?
C2DM itself doesn't have such a facility so you have two choices:
Your server app only sends messages during certain times
or
Your Android app receives the C2DM messages all the time, but during certain times you ignore/handle as appropriate.
Google just released a new version of c2dm called "Google Cloud Messaging (GCM)" at I/O 2012. With GCM its possible to define a timeout for your messages.
GCM ttl section: http://developer.android.com/guide/google/gcm/adv.html#ttl
You can find my answer to a similiar question here:
https://stackoverflow.com/a/9709944/789738
Is there a TTL or expiration or some sort of timeout feature for C2DM messages?
I would like the C2DM message to be received within 10 minutes by the device, any longer (ie: if their phone is off) and the C2DM message should not be received by the device.
I could probably implement something in the device to ignore any C2DM messages if they are old, but I'm not sure how accurate that would be with different device time settings.
A TTL flag on the C2DM message sent to google would be perfect, but not sure if they support this.
Cheers!
Dave
C2DM does not have such a feature. Please have a look here:
how to set valid time period for android c2dm message?
Update:
Google just released a new version of c2dm called "Google Cloud Messaging (GCM)". With GCM it is possible to use a timeout for your messages:
I really recommend the Google I/O 2012 "Google Cloud Messaging for Android" session available here:
http://www.youtube.com/watch?v=YoaP6hcDctM
Additionally you can read through the GCM ttl section: http://developer.android.com/guide/google/gcm/adv.html#ttl