Home
Sign Up
Sign In
• 请不要在回答技术问题时复制粘贴 AI 生成的内容
V2EX
›
程序员
做一个基于 XMPP 协议通讯工具,连接,登陆,发送文字,发送文件。这些耗时请求要放在同一个 service 里好呢还是各自放在一个 service 里好
Registering
·
Apr 14, 2014
· 3366 views
This topic created in 4614 days ago, the information mentioned may be changed or developed.
xmpp + openfire + ssmack + android
service
发送
通讯
2 replies
•
1970-01-01 08:00:00 +08:00
holmesabc
Apr 14, 2014
1
service 只要不是指明运行在新进程中, 不管多少其实都是在一个进程与主线程中。
你要做的其实应该是把功能模块分好, 在新的工作线程中来真正执行。
service 只做有一个入口
Registering
OP
Apr 14, 2014
2
@
holmesabc
我是android入门的,请多多赐教,哈哈
我在service里是另外开启线程执行耗时操作
我的设想是寄予MVC,M = 一个与openfire服务器交互的类,V=各个Activity,C=service
现在我只用service实现了连接服务器,登陆,获取好友列表的功能,用bindService,然后回调
About
·
Help
·
Advertise
·
Blog
·
API
·
FAQ
·
Privacy
·
Solana
·
4568 Online
Highest 6679
·
Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 33ms ·
UTC 02:52
·
PVG 10:52
·
LAX 18:52
·
JFK 21:52
♥ Do have faith in what you're doing.
❯