Mort,

I see one issue in the code you posted.

If after bindService, there is an orientation change or the activity is finished before onServiceConnected is called, myBinder will still be null, and your code won't call unbindService, despite having called bindService.

Don't know if this can later cause the exception you're describing, but it's worth a try.

-- Kostya

17.04.2011 17:59, mort пишет:
Yes, I know this problem was discussed before, but I just don't find a
solution...
In my activity, I start and bind the service in onResume and unbind it
in onPause. There is only one ServiceConnection. I set the binder to
null in onServiceDisconnected and query that in onPause, so even if
the connection is disconnected anywhere else (which shouldn't happen
in theory) this should be handled.


--
Kostya Vasilyev -- http://kmansoft.wordpress.com

--
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

Reply via email to