开发者

Android: How to initiate an AIDL unbind from a Service?

Is it possible for an Android Service to forcefully teardown the AIDL connections of existing clients? The only way I kn开发者_如何学JAVAow to tear down such connections today is if the client has initiated it using Context.unbindService()


This is not possible. You can let the activity know you would like the binding to be disconnected (e.g., callback/listener, createPendingResult()). Or, you can switch away from the binding pattern to the command pattern using startService(), in which case the service can shut down when it wants to via stopSelf().

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜