how to send notifications from a website to an android app

16,711

For sending Notification to any android Device you can use two technology: 1) Push. 2) Pull.

For Push Technology you can use GCM(Google cloud messaging).

For Pull Technology you can make you application continuously keep on connecting to server and trying to fetch data if it is available from there.

Advantages of GCM:
1) Low battery comsumption. Since it will push the message to user device and it will push message when user gets connected to server.


For GCM you can use following Link for your 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

Share:
16,711
Erutase Akpobome
Author by

Erutase Akpobome

Updated on July 20, 2022

Comments

  • Erutase Akpobome
    Erutase Akpobome almost 2 years

    I have made a website in html using a bit of javascript and php. I have made an android application using eclipse and java. what code or software or technique do i need to employ to allow my website to send notifications to my applications. And eventually send notifications from my app back to my website.

    the aim one day is to send notifications from my website to a specific app on a specific android device.

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

  • Erutase Akpobome
    Erutase Akpobome over 11 years
    thanks for the reply. your answer would help me for the application side. How about the website side. what code or software do I use on my website to allow for this functionality.
  • Parth Dani
    Parth Dani over 11 years
    To Have GCM you also need to code it on server side.Which will help you to send message from their to google server..For further reference please read by going to all the URL which I had given to you it will help u to understand everything
  • norman784
    norman784 over 11 years
    there is libraries for node, ruby, php that do almost all the hard work for you in the server side
  • Kathir
    Kathir over 5 years
    GCM is deprecated and will soon be removed. Use Firebase Cloud Messaging instead