powered by Jive Software

Block /UnBlock user using android

just, i have block the user following snippet code:

`public void XMPPAddNewPrivacyList(XMPPConnection connection, String userName) {

String listName = “newList”;
List privacyItems = new Vector();

PrivacyItem item = new PrivacyItem(PrivacyItem.Type.jid,
userName,false, 1l);
// Create the new list.

try {
PrivacyListManager privacyManager;
privacyManager = PrivacyListManager
privacyManager.createPrivacyList(listName, privacyItems);

} catch (XMPPException e) {
System.out.println("PRIVACY_ERROR: " + e);

just call the above method here…

XMPPAddNewPrivacyList(XmppConnection.getInstance().getConnection(), "91xxxxxxxxxx");

after call that above method i got a response like this



It’s working successfully. I referred whatsapp, we cannot able to send the message which we blocked. as well as if they send the message , we are not receiving that message. But here, i can send and receive the message after i blocked that user. I don’t know why if any one know please let me know.