I have WallPanel set up on an old Android tablet, and connected to MQTT. I regularly need to send it a reload command (that’s for another topic…), but the command doesn’t do anything when the screen is off. I have to send the command to wake the screen, wait, then send the reload command. Is this expected behavior?
You have to have the application always running in the foreground to receive messages. If you are device screen is off, most likely your Wifi is also off. Try running either Daydream or the built-in screen saver which will keep your screen on, also check your device settings to disable the device from sleeping, just use the Daydream feature instead.
And welcome @flaquito, finally got your login situated!!
It doesn’t seem like Wifi is turning off, because I still get sensor reports on MQTT every minute, and it can still receive some messages because I can send the wake command and that works, even with the screen completely off.
There are two parts to the application, one is the background service which tries to run even when the application is closed, the other is the application itself. Your system may be preventing the application from running in the background when the screen is off and receiving commands from the background service, the service actually receives the MQTT commands and passes them to the app.
The application is not designed to work with the screen powered off because it will stop receiving communication. If the command you send works when the screen is on, but not when the screen is off, then use a screensaver to keep the screen active if you want to receive all commands.
Ah, that makes sense. The background service probably handles the wake command, which is why it works. But the reload and other UI commands need to be handled by the application, which isn’t paying any attention until the tablet is woken up. Thanks for the explanation!
Yeah, that is exactly right, you explained it better than I did .