[jdev] Re: Adding a contact to msn from jabber.
    Benjamin Podszun 
    ben at galactic-tales.de
       
    Wed Mar  7 07:04:02 CST 2007
    
    
  
Bruno Bechler Machado wrote:
> thanks for helping guys!
> i solved the problem, if anyone needs it, here is a code example:
>  
>    public void addContact()
>    {
>        Roster roster = connection.getRoster();
>       
>        Presence subscribe = new Presence(Presence.Type.SUBSCRIBE);
>        subscribe.setTo(" myfriend\\40hotmail.com at msn.myServer.org 
> <mailto:myfriend\\40hotmail.com at msn.myServer.org>");
>        subscribe.setFrom(connection.getUser());
>        connection.sendPacket(subscribe);
>     }
What's the "roster" for in this sample? ;)
    
    
More information about the JDev
mailing list