Making a smartphone 'talk' to a PC is immediate, a simple socket server program can remain in listening mode on the PC (with adequate settings of the router/PC firewall) and the smartphone sends requests and gets responses, same thing via Ftp, everything extremely simple to code
More complex is to do the opposite and therefore if from a PC you want to send information to the smartphone, this is because the address on the smartphone network is normally not visible and therefore it is always the smartphone that must connect to some system, and then the options are to send an Sms, use Firebase, use Fcm push notifications, use an Mqtt broker
Sending Sms is the simplest of all but it is not real-time it can also arrive a few minutes after sending, and therefore if you want almost instantaneous communication remains Firebase, Fcm, Mqtt
Personally I really like the communication system via Mqtt because it is simple to use, you can install everything 'in house' without the need for external services, and it is very widespread and therefore you can find documentation and experience of other users both in B4X development environments and with all the other programming systems
I use Mosquitto both to send simple commands and to send files of tens of megabytes
It has the ability to control access to the broker via user/password, and it also has some utilities to send commands and read information directly from the command line, very useful especially during the initial experiments
I would recommend you to follow both the
initial tutorial of Erel and some significant examples such as the
chat room and the the
surprising chat with the possibility of drawing, also worth seeing is the
connect-reconnect procedure, very important for automatically restoring the connection between client and broker, and also at super-interesting
Network Guide To Galaxy
I still haven't understood why it's called 'MQTT broker' and not 'MQTT server' as would be logical to expect, ultimately it is a software procedure that waits and performs operations only when the clients do something, and this seems to me to be the precise definition of 'server'
Finally I would recommend you to take a look at
Supabase and
PocketBase they seem to be systems like Firebase but open source and can also be installed 'in house'
Last advice, if you want 'wake up' a phone that is with the screen locked and is in sleep mode, the only way is to use
Fcm, all other systems are NOT detected until the phone returns to the active state