fusesource / mqtt-client

A Java MQTT Client
http://mqtt-client.fusesource.org/
Apache License 2.0
1.27k stars 369 forks source link

manually handle PINGs #55

Open behrad opened 8 years ago

behrad commented 8 years ago

In android when in sleep mode, we need to manually handle PINGs. I'm doing

MQTTFrame encoded = new PINGREQ().encode();
connection.transport().offer(encoded);

However I'm seeing random disconnects from library. What's the best method for this? OR Why the HeartbeatMonitor is not being fired when we use an AlaramManager to make device awake at ping interval!?