Dear community,
please help me to fix my issue:
I try to programm an Android-XMPP-Client. The main activity is a login activity, where the user can type his openfire credentials etc.
(assuming the login was successful): If I finish the application (I click on the back button of the android device) and i start the application (main activity) again , **the user is logged again without typing any credentials. **
Of course I know about the recconection mechansim, but the javadoc of the RecconectionManager says “a reconnection is only performed if the application is not explicitly closing”. But thats what I’m doing. I Override the onDestroy-method in the main activity, which is called when the user click the back button. In onDestroy I implement the following lines of code:
@Override
public void onDestroy()
{
super.onDestroy();
boolean isOpen = (connection != null) && (connection.isConnected());
if (isOpen)
connection.disconnect();
}
Also i tried to disbale the recconection explicitly by calling RecconetionManager.getInstancefor(connection).disableAutomaticReconnection().
But this had no effect.``
Please give me hints what I might have done wrong . I assume that the RecconectionManager was wrong implemented.
best regards
Dawid