Closed guitar9 closed 4 years ago
Ok, can you turn on logging and post the log from when you reconnect again, remember that when you have reconnected you have to subscribe again, when the client is destroyed it loses its subscriptions, you shouldn't have to publish anything though.
I tested it with flutter build apk --debug. And I get dont get the new message. When I restart the app and subscribe the topic agian. Maybe is has something to do with qos? I am will turn on the logging and post the output
I published the new message when the app was closed
I found the error. I must publish the message with retained on. I tested it with mqtt.fx. Can I somehow publish the message with this library with retained on?
There's a retain option flag on the publishMessage client method, set this to true when you publish. You can also reset the startClean() option on the connect message if you need it.
Hello first thank you for this beautiful library. I build a app where I can show a state of my lamp. I connect to mqtt broker when I start the app an subscripe to the topic light. When I close the app an open it again and and the state of the lamp changed when i closed the app. Everything works fine. But when I destroy the app and connect again to mqtt broker, I dont get the new state. Only when I publish a new message. The state of the lamp changes again. Sombody can help me?