public voID blockUser(String Listname,String user) { // Set the name of the List Listname = "newList"; String groupname = "enemIEs"; ArrayList privacyItems = new ArrayList(); PrivacyItem item = new PrivacyItem(PrivacyItem.Type.jID.toString(),true,1); item.setValue(user); privacyItems.add(item); // Get the privacy manager for the current connection. PrivacyListManager privacyManager = PrivacyListManager .getInstanceFor(connection); // Create the new List. try { privacyManager.createPrivacyList(Listname,privacyItems); } catch (XMPPException e) { // Todo auto-generated catch block e.printstacktrace(); } }
这是文档中的代码,但这不起作用. PrivacyListManager始终为null.
拜托,我需要一些帮助来解决这个问题.
谢谢!
以上是内存溢出为你收集整理的PrivacyListManager.getInstanceFor在android aSmack中为NULL全部内容,希望文章能够帮你解决PrivacyListManager.getInstanceFor在android aSmack中为NULL所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)