smack问题 高手进 用户属性问题
Openfire开发的smack库。
我用用户a1登录到Openfire后尝试添加一个用户b1,并且为b1设置了一些初始化的属性,调用的方法如下:
createAccount
public void createAccount(String username,
String password,
Map<String,String> attributes)
但是当我用b1登录后,获得XMPPConnection然后获得AccountManager,再调用AccountManager的String getAccountAttribute(String name) ,并没有获得相应添加该用户时设置的值。
虽然我尝试设置并获得API中提到的这些属性,如下
name -- the user's name.
first -- the user's first name.
last -- the user's last name.
email -- the user's email address.
但是 同样也没有获得到。
而且此方式明显不能修改相应的属性值,因为AccountManager中并没有提供修改相应属性值的方法。
我从Openfire的admin登录的界面中可以设置name和email属性,能获得。
我怀疑自己用错方式了,那用那个类那,希望做过此类问题的兄弟贴下代码。感激不尽。。。