读书人

Service中的onRebind()方法到底什么时

发布时间: 2013-10-21 17:00:48 作者: rapoo

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" 就知道

读书人网 >Android

热点推荐