0

While reading about ServiceConnection class, I came across this documentation (http://developer.android.com/reference/android/content/ServiceConnection.html) which says "Like many callbacks from the system, the methods on this class are called from the main thread of your process.”</p>

I'm wondering if I create a new thread and implement ServiceConnection methods in that, the system will never be able to invoke onServiceConnected() on it since it's not the main thread?

4

1 回答 1

5

您用于声明/初始化连接的线程无关紧要。 onServiceConnected将由主线程调用。

于 2013-11-05T22:44:11.827 回答