-1

I am getting random numbers of friends from the asmack roster in android.

i am using

        roster = connection.getRoster();
        Collection<RosterEntry> entries = roster.getEntries();
        return roster.getEntries();

please help...

1 Answers1

0

I am using the same method to retrive roster entries and I am getting perfectly. Kindly check with your code once. Comment here if you need any help.

ArrayList<RosterEntry> rosterEntriesc;
    try{
                connection = MyXMPPConnection.getXMPPConnection();
                roster = connection.getRoster(); 
                rosterEntriesc = new ArrayList<RosterEntry>(roster.getEntries());
       }
catch(Exception e)
{
e.printStackTrace();
}
shyam.y
  • 1,441
  • 1
  • 16
  • 17