Home » Android » google cloud messaging – Android SDK manager GCM library

google cloud messaging – Android SDK manager GCM library

Posted by: admin June 15, 2020 Leave a comment

Questions:

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?

How to&Answers:

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.

Answer:

Just open your SDK and Click to Obsolate below and you will find the Google Cloud Messaging for Android Library

Answer:

Above not work for me.I tried this way…Go to sdk manager, check obsolete… gcm library will come. it works for me..

Answer:

You have to upgrade your SDK Tools to rev 20 and Platform-tools to rev 12 before the ‘Google Cloud Messaging for Android Library’ will appear in the ‘Extras’ folder.

Also, if you already have a working C2DM project, you just need to change the SENDER_ID, without including the GCM library

Answer:

None of the previous suggestion worked for me. But…

I found something strange: if I start the SDK manager from Eclipse (Windown -> Android SDK manager) I don’t see all the updates. If I go to the filesystem, in windows explorer, and I start the SDK manager from there I have a bigger list of available packages.

Strange but worked for me!

Answer:

Yes Zelter Ady is right. I also faced the same secanrio but when I accessed SDK manager from Windows Explorer (on my windows machine) C:\Program Files\Android\android-sdk, I am able to get a bigger list of updates under which SDK 4.1 (API 16) is also there apart from Extras->Google cloud Messaging for Android. I was unable to update SDK with API 16 from Eclipse plugin of SDK Manager.

Answer:

For Android Studio version 1.5:

Go to Tools -> Android -> SDK -> click Launch standalone below in sdk manager, it will open new window -> Check Obsolete below -> install Google Cloud Messaging for Android Library

Answer:

Update your SDK manager in Eclipse:
Help -> Check for updates.
Install updates.