首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 移动开发 > Android >

Service中的onRebind()方法到底什么时候被调用!该如何解决

2013-10-21 
Service中的onRebind()方法到底什么时候被调用!Service中的onRebind()方法到底什么时候被调用!我看文档了,

Service中的onRebind()方法到底什么时候被调用!
Service中的onRebind()方法到底什么时候被调用!

我看文档了,但说的不清楚,
[解决办法]
onRebind(Intent intent) 
Called when new clients have connected to the service, after it had previously been notified that all had disconnected in its onUnbind(Intent).
文档说的很清楚啊,,在service和旧的client之间的所有捆绑联系在onUnbind里面全都结束之后,如果有一个新的client用bind连接上service,就会启动onRebind();
[解决办法]
当 有进程 调用 bindService的时候 就会触发 你的service的onBind事件吧.
个人愚见
[解决办法]
当已经bind过后,再次bind就会调用ReBind(),怎么会测不出来。。。
[解决办法]

引用:
onRebind(Intent intent) 
Called when new clients have connected to the service, after it had previously been notified that all had disconnected in its onUnbind(Intent).
文档说的很清楚啊,,在service和旧的client之间……

+1
百度 "android aidl" 就知道

热点排行