开发者

How to handle onServiceConnected after onPause?

开发者 https://www.devze.com 2023-01-26 10:09 出处:网络
When binding a service onServiceConnected is called asynchronously As far as I can tell, it is possible that the activity that bound the service might be paused before the service is connect开发者_如何

When binding a service onServiceConnected is called asynchronously As far as I can tell, it is possible that the activity that bound the service might be paused before the service is connect开发者_如何转开发ed. How should this situation be handled in terms of unbindService?

unbindService requires a reference to the ServiceConnection, which was passed to bindService so it can be called immediately after bindService. Are there any ordering issues? In general I don't believe Android has many guarantees for the execution order of asynchronous calls.

0

精彩评论

暂无评论...
验证码 换一张
取 消