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