Do not attempt to use the bound connection until onServiceConnected(). Period. Do not try to play timing games as you describe here.
On Tue, Jul 26, 2011 at 5:37 AM, Hareef <[email protected]> wrote: > I am developing a wrapper for the service. So in that wrapper i am > doing the bindservice, onServiceConnected, and Unbindservice. > > So that my client will just instantiate the wrapper and access the > AIDL method. > > But i found there is a some delay for the service to bind. so in next > line if client access the AIDL method, getting the > NullPointerException. > > Suppose if the client access the AIDL method later exactly after 20 > msec, its working fine. > > How to handle this situation? > > Thanks in advance > Hareef > > > > -- > You received this message because you are subscribed to the Google > Groups "Android Developers" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/android-developers?hl=en > -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in NYC: http://marakana.com/training/android/ -- You received this message because you are subscribed to the Google Groups "Android Developers" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/android-developers?hl=en

