john keets
john keets

Reputation: 121

notifications from server to android clients on some event

My goal is create an application for my institute such that whenever there is any new notice every faculty should be notified on their android phone.
How to implement such working that whenever there is some new notice, my institute's server should push that notice to every client connected at that time, and they should be able to read that notice.

UPDATE : - What are my needs? Is MQTT the answer or any other solution to implement such working.

Upvotes: 0

Views: 111

Answers (1)

hardillb
hardillb

Reputation: 59791

Sending MQTT messages from a web page is relatively simple and can be achieved in a two main ways:

  1. By having the server side send the message, e.g. the web page performs a POST operation and this is used to populate a out going message. This could be done with PHP, Node JS & Express or Java EE to name a but a few. The http://mqtt.org/software site lists client libraries for many languages.
  2. From with in the webpage it's self using MQTT over websockets. The PAHO javascript library[https://eclipse.org/paho/clients/js/] will connect to a websocket enabled broker (several brokers support this including Mosquitto v1.4 is due to be released shortly with this capability or HiveMQ)

There are plenty of examples of both of these methods available online, all should work without the need to access the internet.

Upvotes: 1

Related Questions