There seems to be a small delay after I bind to a remote service. The onServiceConnection works fine. The binding work fine. There is just a delay problem I think. For example in the onCreate() method of my activity if for instance say:
Note the mConnection onServiceConnect() sets mRemoteServiceStub correctly.
bindService(mIntent, mConnection, Context.BIND_AUTO_CREATE); mRemoteServiceStub.doThis();
If I run this I get an error that says that no connection yet exists. However if I put the mRemoteServiceStub.doThis() in a method to a onClickListener it work perfect. So either the connection is not made until the activities onCreate has finished running or there is a delay on the connection being made.
Does anybody know ?
And is there way to delay the application from running until the connection is made this way I can use the connection right away with no trigger. (My implementation is correct)