本文介绍了关于bindService疑惑的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有关于Android势必一些服务boubts。该指南:
,约 bindService()
,说:
I have some boubts about Android bound service. The guide: http://developer.android.com/guide/components/bound-services.html,about bindService()
, says:
The `bindService()` method returns immediately without a value
但是,这并不似乎是正确的,因为这里方法的签名
public abstract boolean bindService (Intent service, ServiceConnection conn, int flags)
在这里返回布尔值说明如下:
where the returned boolean value is described as below:
If you have successfully bound to the service, true is returned; false is returned if the connection is not made so you will not receive the service object.
所以,问题是:为什么文件说,该方法立即返回没有值
?此外,。
基本上bindservice当它没有找到一个服务,甚至试图绑定到返回false。
Look at answer for this question: "in what case does bindservice return false".Basically bindservice returns false when it does not find a service to even attempt to bind to.
这篇关于关于bindService疑惑的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!