12 2020 档案

摘要:代码说明 为了方便以后的写作,新建一个包,专门用来存放Smack实现的功能,比如: 其中,SmackConnection,SmackLogin和SmackAddUser三个类是前面实现过的,分别是: 备注:这里除了SmackConnection之外,另外两个类不要设置成单例模式了,没有必要,甚至在之 阅读全文
posted @ 2020-12-31 08:22 vocus 阅读(480) 评论(0) 推荐(0)
摘要:即添加账户 参考文档相关 可以下载smack的源码包,里面有比较完善的smack的使用文档 在XMPP服务器上创建和管理账户使用AccountManager类,说明文档位于/javadoc/org/jivesoftware/smackx/iqregister/AccountManager.html 阅读全文
posted @ 2020-12-30 14:56 vocus 阅读(393) 评论(0) 推荐(0)
摘要:①android studio添加smack库依赖 repositories { maven { url 'https://oss.sonatype.org/content/repositories/snapshots' } mavenCentral() } dependencies { compi 阅读全文
posted @ 2020-12-30 05:33 vocus 阅读(581) 评论(0) 推荐(0)
摘要:安装 官网 openfire 下载 可以下载windows压缩包(我试过下载安装包,安装出错) 解压之后,进入到openfire\bin,运行openfire.exe 点击launch admin,跳转到浏览器打开http://127.0.0.1:9090/setup/index.jsp 提示jre 阅读全文
posted @ 2020-12-29 18:40 vocus 阅读(694) 评论(0) 推荐(0)
摘要:服务端保持等待来自客户端的连接和接收来自客户端的消息 服务端: class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedIn 阅读全文
posted @ 2020-12-29 12:13 vocus 阅读(162) 评论(0) 推荐(0)
摘要:服务端 class MainActivity : AppCompatActivity() { override fun onCreate(savedInstanceState: Bundle?) { super.onCreate(savedInstanceState) setContentView( 阅读全文
posted @ 2020-12-29 10:26 vocus 阅读(1580) 评论(0) 推荐(0)
摘要:1.调用系统浏览器打开一个页面 var url=Uri.parse("https://fanyi.baidu.com") var intent= Intent(Intent.ACTION_VIEW,url) startActivity(intent) 2.使用webview控件,在app内部打开网页 阅读全文
posted @ 2020-12-28 14:29 vocus 阅读(354) 评论(0) 推荐(0)