I have a Android app that connects to MQTT broker. It successfully connects to the broker. However, when I turned off the mobile data, it still show that the connection is still active.
Is there a way for me to check if the connection is not available?
I used:
mqttClient.isConnected()
To check the connection periodically (every 10 seconds). The result always returns true.