public ArrayList<XmppFriend> retrieveFriendList(){
  ArrayList<XmppFriend> friends=new ArrayList<XmppFriend>();
  if (sConnection != null && sConnection.isAuthenticated()) {
    try {
      String userID;
      String status;
      Roster roster=Roster.getInstanceFor(sConnection);
      for (      RosterEntry r : roster.getEntries()) {
        userID=r.getUser();
        status=retrieveStatusMessage(userID);
        friends.add(new XmppFriend(userID,r.getName(),status,retrieveState(userID)));
      }
      sendFriendList(friends);
    }
 catch (    Exception ex) {
      Log.w("Failed to retrieve Xmpp Friend list",ex);
    }
  }
  return friends;
}

public ArrayList < XmppFriend > retrieveFriendList ( ) { ArrayList < XmppFriend > friends = new ArrayList < XmppFriend > ( ) ; if ( sConnection != null && sConnection . isAuthenticated ( ) ) { try { String userID ; String status ; Roster roster = Roster . getInstanceFor ( sConnection ) ; for ( RosterEntry r : roster . getEntries ( ) ) { userID = r . getUser ( ) ; status = retrieveStatusMessage ( userID ) ; friends . add ( new XmppFriend ( userID , r . getName ( ) , status , retrieveState ( userID ) ) ) ; } sendFriendList ( friends ) ; } catch ( Exception ex ) { Log . w ( "Failed to retrieve Xmpp Friend list" , ex ) ; } } return friends ; }
retrieves the current xmpp rooster and sends a broadcast action_xmpp_presence_changed for every friend does nothing if we are offline
