如何在smack中设置我的名字?
我可以使用 connection.getRoster(),getName 来获取联系人的名册名称。 但是如何设置当前认证帐户的名称呢?
I can use connection.getRoster(),getName to get roster names of contact.
But how to set the name of current authenticated account?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
使用不同的帐户登录? :)
说真的,你的帐户名与你的身份验证绑定在一起,没有办法强迫对方为你使用特定的昵称,但如果双方都实现 XEP-172,订阅时可以给对方发送提示:
Log in with a different account? :)
Seriously, your account name is tied to your authentication, and there's no way to force the other side to use a particular nickname for you, but if both sides implement XEP-172, you can send a hint to the other side when you subscribe: