MQTT protocol implementation in android Asynchronously
<p>I am new to MQTT protocol implementation in android. Currently I am using Android Studio. I have gone through the  <a href="https://www.eclipse.org/paho/clients/java/" rel="nofollow">Eclipse Paho link</a>(<a href="https://www.eclipse.org/paho/clients/java/" rel="nofollow">https://www.eclipse.org/paho/clients/java/</a>) but I found only Synchronous Connection Example.  Here my Question is: </p>

<ol>
<li>How to implement the MQTTAsyncClient with a call back ? </li>
<li>Do we have to persist the connection along with callback throughout the application to get the messages from server at anytime ? </li>
</ol>

<p>Please help me</p>