Dear All,
I´m developing an automated trading app for myself. This runs pretty smoothly but I still want to use my mobile phone to keep an eye on what´s going on in the app running on my computer at home in about a month, where I will be on a longer vacation. I have already found a decent remote desktop app which can be used both from the raspberry pi (with a portable monitor, so not something I´m going to bring "in the field" but just use in hotels etc.), that I´ll bring with me and from my android phone. However, trying to navigate on a win 10 screen from a 5" phone is really not convenient, so I was wondering what the easiest way would be to get a quick look at the current status of my app - basically just a couple of numbers that are updated upon changes, such as trades executed, balance etc., no fancy graphics or anything like that. I was thinking about if there´s a free webspace provider to whom I can send data that will be updated on the fly, just for me to have a look at them from time to time through a simple webpage. I could of course also design an app in B4A but this would take a lot more time, I believe.
So my question is: Does anybody have any inputs on what the easiest and fastest way to achieve this would be?
Thanks!
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