Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to send notifications from a website to an android app [closed]

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.

like image 940
Erutase Akpobome Avatar asked Dec 05 '12 13:12

Erutase Akpobome


People also ask

How do I send notifications from a website to my Android app?

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.

Do push notifications work when website is closed?

On a desktop device, you can not receive push notifications if your browser is not running. A web push notification can only be delivered if the subscriber is online and the browser is running. You will recieve notifications only if you allowed them previousely for a particular website.

Do local notifications work when app is closed?

The local notification should occur at the schedule time even if the app is closed.


1 Answers

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

like image 157
Parth Dani Avatar answered Oct 22 '22 03:10

Parth Dani