When the device loses its internet connection, we do currently queue the messages that cannot be send. The library will then try to re-connect several times. If it fails every time, the library will just stop trying and disconnect. If connection can be re-established, the queued messages are dispatched.
We could enhance the process of trying to re-connect by listening for connectivity changes. This could be more efficient. The required permission <uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" /> will not always be there, but when it is, we can use a broadcast receiver for <action android:name="android.net.conn.CONNECTIVITY_CHANGE" />.
When the device loses its internet connection, we do currently queue the messages that cannot be send. The library will then try to re-connect several times. If it fails every time, the library will just stop trying and disconnect. If connection can be re-established, the queued messages are dispatched.
We could enhance the process of trying to re-connect by listening for connectivity changes. This could be more efficient. The required permission
<uses-permission android:name="android.permission.ACCESS_NETWORK_STATE" />
will not always be there, but when it is, we can use a broadcast receiver for<action android:name="android.net.conn.CONNECTIVITY_CHANGE" />
.