Messages and alerts on Android via JSON

To receive short messages, you can use e-mail, SMS, push notifications or create a bot for the messenger.



I propose to consider another simple way:



1. Create a data source in JSON on the side of the web service.



{ "refl.me":true, "message":"Hello!", "refresh":96 }
      
      





"Refl.me" is sure to indicate true.

"Message" sets the text of the message, empty messages are ignored.

β€œRefresh” sets how many times it is necessary to check the source within 24 hours (0 - manual update, 288 - maximum).



 <?php header('Content-Type: application/json'); $json_array =array('refl.me'=>true,'message'=>'Hello!','refresh'=>96); echo json_encode($json_array); ?>
      
      





2. Download the application and add a link to our created data source in it.



3. Everything is ready. Receive alerts and messages.



The principle of operation is extremely simple, the application checks the source in accordance with the specified intervals (or in manual mode), if the message value has changed to a different value from the previous value, an alert is displayed in the application.



Everything works without third-party servers, does not require personal data and registration.



Full documentation here .



All Articles