I just saw that google deprecated the C2DM and replace it by GCM. On their website they describe us, step by step, the way to follow to install the GCM library required to start implementing the new android push notification (or Cloud Messaging, as they name it).
On the "Install the Helper Libraries" is written:
To perform the steps described in the following sections, you must first install the helper libraries (reference: client and server). From the SDK Manager, install Extras > Google Cloud Messaging for Android Library. This creates a gcm directory under YOUR_SDK_ROOT/extras/google/ containing these subdirectories: gcm-client, gcm-demo-appengine, gcm-demo-client, gcm-demo-server, and gcm-server.
I opened the SDK manager from Eclipse, but under the Extras is nothing except "Intel hardware accelerated execution manager". I don't see something else.
How do I find/add/install the GCM in SDK manager?
The sdkmanager is a command line tool that allows you to view, install, update, and uninstall packages for the Android SDK. If you're using Android Studio, then you do not need to use this tool and you can instead manage your SDK packages from the IDE.
The "Android SDK" will be installed in " ~/Library/Android/sdk ", where ~ denotes your home directory. Note: If you see a warning that says "the package is damaged and should be moved to the trash", goto "System Preferences" ⇒ Security & Privacy ⇒ under "Allow applications downloaded from" ⇒ select "Anywhere".
The Best and easiest way I got after trying a lot of time
Go to this link
https://dl-ssl.google.com/android/repository/addon.xml
at the end of this page you will find a section Google cloud messaging for android
with following line
<sdk:url>gcm_r03.zip</sdk:url>
just replace addon.xml by gcm_r03.zip
in url mentioned above, The final url will look like this
https://dl-ssl.google.com/android/repository/gcm_r03.zip
when download completes extract the zip file, you will get three directories with names client side, server side and samples.
now open your SDK folder and create a folder named "extras/android" and paste all three folders here DONE!!
now whenever make a new project in project classpath using add external jar add gcm.jar.
I have explained the whole process because same can be used to download other SDK stuff like platform-tools and platforms as zip so you can configure eclipse without an internet connection anywhere.
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