display friends list in android application using XMPP
<p>I am working on a chat application. I need to display friends list in android application using XMPP. can someone guide me how to do that. Any sample example will be of great use to me. </p>

<p>i have developed the below code.</p>

<pre><code> public void friendslist()
    {
    Roster roster = connection.getRoster();
    Collection&lt;RosterEntry&gt; entries = roster.getEntries();

    System.out.println("\n\n" + entries.size() + " buddy(ies):");
    for(RosterEntry r:entries)
    {
    System.out.println(r.getUser());
    }
    }
</code></pre>

<p>I need to display all my contacts in a list view. how can i achive it. I shall be happy if i could get the answer that could solve my issue.</p>

<p>Thanks in advance.</p>
