(11-27-2022, 01:10 PM)robert4you Wrote: The application is running in the background or not?
How to make a button to connect and disconnect mqtt server?
1st - Yes, there are background tasks available in the Widget Selector. I have tested this with a the random number generator on one device to publish via MQTT, and display it on another device subscribing to that topic, which keeps displaying the random number updates even when VirtuinoIoT is in the background on publishing device.
EDIT - I have noticed delays and eventual stop of updated data after a few seconds in background, or immediately once the publishing device has gone into sleep (AKA home screen locked). Once I unlock the screen and bring VirtuinoIoT to forground the random counter starts updating again. Not sure if this is a VirtuinoIoT issue with background operation or something with how I have set up my phone.
2nd - That would be done via the Connect/Disconnect option in Menu... the three dots in the upper right corne of the Virtuino screen.