Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Push Notifications in Android using Google App Engine

I am currently developing an app where users create posts that are stored on a server. When another user shows interest in a post by clicking a button, I want to notify the author of the post using push notifications. I have already set up the data storage using cloud endpoints with Google App Engine. Is there anyway I can use these endpoints to implement push notifications? If not is there another easy way to implement push notifications given my current setup? I have already read about Google Cloud Messaging on the developers page but was somewhat confused. I have kept track of the registration id's but I don't really know where to go from there. Thanks in advance.

like image 906
user1229888 Avatar asked Aug 16 '13 05:08

user1229888


1 Answers

You can use the HTTP interface to the GCM servers as described in this Android developers page.

The easiest way to do it is by downloading the Google Cloud Messaging for Android Library using the Android SDK Manager, which will give you a jar that handles all the complexity of setting up the requests and responses to GCM.

Towards the bottom of that page, there is a sample Java application for push notifications on App Engine which you can use to get familiar with sending push notifications and then adapt to your needs.

like image 122
stelmod Avatar answered Sep 26 '22 12:09

stelmod