'Implementation of smack api in android

i'm implementing xmpp chat with smack api in android. i just want to clear one doubt about save login sessions. like i need to login every-time after app reopen. let's assume i logged in on xmpp when i restart app. i need to login again ?.

there is an flag in xmpptcpconnection isAuthenticated it give's me true after login but when i restart app and checking again then it's giving me false.

i'm not able to understand how can i manage login sessions in xmpp so that i can keep logged in my user after app restart or relaunch



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source