How to handle onServiceConnected after onPause?
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.
精彩评论