Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google Cloud Messaging for Android Library not Found in the sdk Manager

I am trying to implement a push notification solution for android.I am following the steps given in the following tutorial http://www.androidhive.info/2012/10/android-push-notifications-using-google-cloud-messaging-gcm-php-and-mysql/

but when i tried to install the Google Cloud Messaging for Android Library using the android sdk(i am using the latest sdk) i don't find it the extras module like you can see in this picture

enter image description here

This is really strange. Is there any solution?

like image 482
Hadj Ali Oussama Avatar asked Feb 10 '14 13:02

Hadj Ali Oussama


3 Answers

Select the 'Show Obsolete Packages' option in Packages menu and you will be able to view it and install.

enter image description here

like image 111
Anubhav Avatar answered Oct 11 '22 06:10

Anubhav


Install Google Play Services Library

enter image description here

For client side implementation of GCM use this link

For server side purposes follow the tutorial

Pls note that the tutorial explains how you can send messages to individual devices using the registration id and not to all devices at one go.

[Update]

I observed that still some people are using the deprecated library - GCM for android.

"Google Cloud Messaging for Android" is deprecated and no more used.GCM API's are now available as part of "Google Play Services".

Eventhough @anubhav's answer is correct for the asked question it is not recommended.

like image 30
Harshad Ranganathan Avatar answered Oct 11 '22 04:10

Harshad Ranganathan


Seems like this package is now obsolete. In order to see it in SDK Manager I had to check "Show obsolete packages" in the "Packages" menu

Edit (clarification of my answer)

I encountered this problem when trying to run Maven Android SDK Deployer. The version of the SDK deployer I used, was expecting gcm package installed (at least when running the deployer in its default configuration).

For other purposes, it's recommended to use the newer Google Play Services instead, as stated in one of the answers here.

like image 7
Denis Itskovich Avatar answered Oct 11 '22 05:10

Denis Itskovich