Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
App in the background
#1
The application is running in the background or not?
How to make a button to connect and disconnect mqtt server?
Reply
#2
(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.
Reply
#3
AD1 / EDIT

I meant the operation of the VirtuinoT application when the phone screen is off and the phone is locked.

I have the same problem as you and I think it's VirtuinoT's fault. Older versions work fine.

AD2

I am looking for the ability to connect and disconnect mqtt server using a variable.
Reply
#4
Hi,

answer to first question:
for now the app can't work on the background while the phone is locked.
The battery manager closes the app after some minutes.
I am not sure if I can add this feature for all device manufacturers.
I have this issue on my schedule. 
The app is designed to work as service too. But it is too early for this.
I have too many other issues to fix first. 

answer to second question:
Ι thought I didn't need this feature.
I try to reduce the options as much as I can and keep only the necessary ones.

I am interested in the opinion of users on these matters
Reply
#5
When I unlock the screen and bring VirtuinoIoT to the foreground, the mqtt server sometimes does not connect automatically. The cloud is still green, but it does not receive or transmit anything.
That's why I was thinking about mqtt control to automatically connect it correctly. I tested it on Android and on iOs
Reply


Forum Jump:


Users browsing this thread: 2 Guest(s)