Another one of my stupid questions probably.
I am confused on which to use GCMRegistrar or GoogleCloudMessaging, i know that GCMRegistrar is deprecated and i want to use GoogleCloudMessaging API but the problem is i can't find the jar files for it. so if you could help me by giving me jar file for the new GoogleCloudMessaging API it would help me a lot.
Thanks in advance!!!
FCM is the new version of GCM under the Firebase brand. It inherits GCM's core infrastructure to make sure we continue to deliver messages reliably on Android, iOS and Chrome. Save this answer.
Firebase Cloud Messaging (FCM) provides a reliable and battery-efficient connection between your server and devices that allows you to deliver and receive messages and notifications on iOS, Android, and the web at no cost.
Implementation pathSet up Firebase and FCM on your app according to the setup instructions for your platform. Add message handling, topic subscription logic, or other optional features to your client app. During the development, you can easily send test messages from the Notifications composer.
That's because GCM before was a library, now it's part of the Google Play Services. So to use it you will need to follow this tutorial and download and include the Google Play services on your project using this page
You are welcome :)
Yes gcm.jar is deprecated. But I didn't find good explanation "why"! GCMRegistrar was good helper class. When you look at its sources you'll find that it's almost the same as example code of (now preferred) GoogleCloudMessaging API. So Google wants everyone to write (or copy) again and again the same code into all projects using GCM? Or shall every developer create his/her own helper class, a GCMRegistrar alike?
On the other hand when I use Google Play Services library, I use a library with a lot of ballast I don't need, I need just GCM, I'm not interested in other services.
Why don't they create a library for each service? GCM, Maps, Ads, Wallet, ... so every developer can include only what he needs.
Google's approach is far from optimization. I want to create as small and fast apps as possible. Google obviously doesn't. :-(
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With