Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android SDK manager GCM library

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?

like image 837
Zelter Ady Avatar asked Jul 02 '12 12:07

Zelter Ady


People also ask

What is Android 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.

How do I find the SDK Manager path?

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".


1 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.

like image 78
Piyush Agarwal Avatar answered Oct 13 '22 23:10

Piyush Agarwal