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.
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.
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.
The local notification should occur at the schedule time even if the app is closed.
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
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