<div>Hy..</div>
<div>sorry for post this subject again, but my problem isn't solved..</div>
<div> </div>
<div>I need to block and unblock users using Java smack api 2.2.1.. someone can help me?</div>
<div>please???????????????</div>
<div> </div>
<div>i've been trying to do:</div>
<div>
<p> public void blockingContactGateway(XMPPConnection connection, String contact, String gatewayName)<br> {<br> Roster roster = connection.getRoster();</p>
<p> String aux = "";<br> aux = contact.substring(0, contact.indexOf("@")) + "<a href="file://40/">\\40</a>" +<br> contact.substring(contact.indexOf("@") + 1,
contact.length());<br> contact = aux;<br> <br> IMTools.printList(roster);<br> <br> Presence unavailable = new Presence(Presence.Type.UNSUBSCRIBE);<br> <br> String setTo = contact + "@" + gatewayName + "." +
connection.getServiceName();<br> unavailable.setTo(setTo);<br> <br> String sendFrom = connection.getUser();<br> unavailable.setFrom(sendFrom);<br> <br> connection.sendPacket(unavailable);
<br> <br> System.out.println("Mandou pacote: ");<br> System.out.println(unavailable.toXML());</p>
<p> }</p></div>