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.
Related
Suppose I have an application in which people suscribes to receive a notification when some event in a bar is created. I would also like to draw an icon in a google map when a bar is added. I read about Google Cloud Messaging and also Firebase which Google advertises as the improved version of the former. What are the advantages and disadvantages of both?
Yes No Difference as you read, Google Cloud Messaging is the traditional way to send push notifications and downstream message to Android.
Now with the addtional of new product Firebase (bought), google making some changes for efficient use. So they just renamed GCM as FCM (new improved version), along the change now you using FCM can send push notifications to iOS devices as well and more new features,
In fact you can register push token using Firebase and send api signal to GCM server, still the message would reach the device.
You can read this FAQ, https://firebase.google.com/support/faq/#gcm-fcm
Google Cloud Messaging is DEPRECATED 4/10/2018!
As of April 10, 2018, Google has deprecated GCM. The GCM server and client APIs are deprecated and will be removed as soon as May 29, 2019. Migrate GCM apps to Firebase Cloud Messaging (FCM), which inherits the reliable and scalable GCM infrastructure, plus many new features. See the migration guide to learn more.
https://developers.google.com/cloud-messaging/faq
Why is GCM being deprecated?
Simplifies client development. You no longer have to write your own registration or subscription retry logic.
Enables a new serverless notifications solution with a web console, the Firebase Notifications console. With the Notifications console, anyone can send notifications to target specific audiences based on Firebase Analytics insights. The console has deep integration with Google Analytics, Firebase predictions, and Firebase A/B testing.
Includes ongoing feature enhancements/updates such as the HTTP v1 API.
Provides better delivery reporting and more reliable delivery
I've been trying to investigate about this on the internet but the information is either unclear or obsolete. The question is pretty straightforward, does Google Play Services need to be installed on the user device if I want to use Push notifications through GCM? I understand I do need to include GPS libraries as a dependency to develop, but does the user also need the GPS APK on his device?
If so, are there any other alternatives? It seems a little too much to impose this dependency for a pretty basic task such as push notifications.
yes it does, GCM is part of Google Play Services.
alternatives would be to use XMPP but you lose all the benefits of GCM
Update
as of yesterday GCM is now FCM (Firebase Cloud Messaging), its basically GCM re-branded for some dumb reason but it still requires Google Play Services
I have an app that currently uses C2DM for push notifications. I would like to inquire if I update the app to GCM and if some users do not upgrade their app, will Google allow me to use both the C2DM and GCM for the two versions of my app?
Or will the users on my previous app never receive a PUSH notification altough I still have the push logic implemented for C2DM?
I've completely replaced C2DM with GCM in the app, and left support for both protocols in the server side. Works like a charm; details are here.
They will still receive them as long as you don't remove any authorisation keys, ids etc. as GCM uses the Project ID while C2DM uses the registered e-mail address.
More on it here: C2DM to GCM Migration
Once the C2DM service was deprecated recently I advice you to migrate your pushes system to GCM service.
The best way to deal with it is doing the thing like Google says. Take a look at this topic in the official GCM's documentation.
While not the original question, an interesting one would be: Can one app simultaneously use C2DM and GCM.
C2DM uses the Sender-Account while GCM uses the Project-ID to register. The only thing they both might share is the App-package name (and obviously the google account of the device, but that shouldn't matter as there are multiple apps which can use gcm/c2dm in parallel anyway).
In my experience registering C2DM and GCM in the same app can cause some serious problems.
Reason to have both in one app might be that you want to use GCM in the app, but can't everywhere because a legacy backend might not be able to switch to GCM yet. Probably a rather rare scenario - but currently happening for our app.
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.
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.