How to send notifications from a website to an Android app

I made a website in html using a bit of javascript and php. I made an android application using eclipse and java. what code or software or method do I need to use so that my site can send notifications to my applications. And eventually send notifications from my application back to my site.

The goal one day is to send notifications from my site to a specific application on a specific Android device.

Please answer my question or provide links to the solution. and excuse my ignorance as I am new to this.

+7
source share
1 answer

You can use two technologies to send Notifications to any Android device: 1) Click. 2) Pull.

For Push technology, you can use GCM (Google Cloud Messaging).

For Pull technology, you can force the application to constantly connect to the server and try to retrieve data if it is available from there.

GCM Benefits:
1) Low battery consumption. Because it will push the message to the user device, and it will push the message when the user connects to the server.


For GCM, you can use the following link for reference:
1) http://developer.android.com/google/gcm/gs.html
2) http://www.techrepublic.com/blog/app-builder/implementing-googles-cloud-to-device-messaging/428
3) http://www.vogella.com/articles/AndroidCloudToDeviceMessaging/article.html
4) https://github.com/teleknEsis/TechRepublic-Samples/tree/master/C2DMSample

+4
source

All Articles