其他分享
首页 > 其他分享> > Android使用unbindService解绑服务时,未调用ServiceConnection的onServiceDisconnected回调方法

Android使用unbindService解绑服务时,未调用ServiceConnection的onServiceDisconnected回调方法

作者:互联网

原文链接:https://blog.csdn.net/qq_27840621/article/details/69525064

1、onServiceDisconnected() 在连接正常关闭的情况下是不会被调用的.

2、该方法只在Service 被破坏了或者被杀死的时候调用. 例如, 系统资源不足, 要关闭一些Services, 刚好连接绑定的 Service 是被关闭者之一, 这个时候onServiceDisconnected() 就会被调用.

其它参考:https://www.runoob.com/w3cnote/android-tutorial-service-1.html

标签:调用,onServiceDisconnected,Service,unbindService,ServiceConnection,https,连接
来源: https://www.cnblogs.com/sunupo/p/15505431.html