Android how do I wait until a service is actually connected?
How can I wait for ServiceConnection.onServiceConnected being called reliably? You don’t. You exit out of onCreate() (or wherever you are binding) and you put you “needs the connection established” code in onServiceConnected(). Are all the event handlers: Activity.onCreate, any View.onClickListener.onClick, ServiceConnection.onServiceConnected, etc. actually called in the same thread Yes. When exactly is ServiceConnection.onServiceConnected actually going … Read more