ostrya / PresencePublisher

An Android MQTT client that regularly publishes messages to notify about the device's presence
MIT License
78 stars 12 forks source link

Feature request: LWT #29

Open cb33 opened 3 years ago

cb33 commented 3 years ago

Hello Kai, it would be great and make PP more complete if you would implement the Last Will and Testament (LWT) MQTT feature server connect to notify other clients about an ungraceful disconnection of the PresencePublisher App.

If this is already in PP implemented it was not working when I tried to discover an ungraceful MQTT server disconnection. This should imho happen when I leave the connected WIFI network right?

BR cb

ostrya commented 3 years ago

See https://github.com/ostrya/PresencePublisher/issues/26#issuecomment-705095486.

Due to the way the app is working (only connecting to the server for sending the message, then directly disconnecting), I think implementing LWT will confuse more than it will help, because it would only notify the server if the connection was lost during the few seconds while the app tried to send a notification message.