Get online users(Roster entries) using smack 4.1 in android

I have been trying to get roster entries using smack 4.1 beta 2 in android.

Quotes from above link…

"Roster now follows the Manager pattern (use Roster.instanceFor to obtain an instance, no more XMPPConnection.getRoster)"First of all i am not able get the “Roster” object, libraries that i have imported may not have that package or i miss any lib here?

I m using all the libraries mentioned in above link.

Can anyone help me to get the Roster Entries using smack 4.1?


Did you add ‘smack-im’ to your dependencies? Note that -rc1 is the latest version.

Got it now.