Inspired by this example: https://dzone.com/articles/iot-push-notifications-arduino I've created a similar solution in B4X.
When the button is clicked, two http requests are sent to Firebase REST api. Any subscribed Android or iOS device will receive the push message. It is a very simple and powerful solution.
It is simple as you don't need a server and it is powerful as the messages will arrive even when the apps are not running. The solution works over the internet, it is not limited to the local network.
B4A app: https://www.b4x.com/android/forum/threads/67716/#content
B4i app: FirebaseNotifications / Push Messages (server not required)
The B4R code is attached. You need to update the API_KEY and the wifi related settings.
When the button is clicked, two http requests are sent to Firebase REST api. Any subscribed Android or iOS device will receive the push message. It is a very simple and powerful solution.
It is simple as you don't need a server and it is powerful as the messages will arrive even when the apps are not running. The solution works over the internet, it is not limited to the local network.
B4A app: https://www.b4x.com/android/forum/threads/67716/#content
B4i app: FirebaseNotifications / Push Messages (server not required)
The B4R code is attached. You need to update the API_KEY and the wifi related settings.