On Mon, Jun 4, 2012 at 9:17 AM, Greenhand <cooperateonl...@gmail.com> wrote: > In onDestroy(), I checked whether the Activity is finishing and bound. > If so, I unbindService(). > if(isFinishing() && serviceBound){ > unbindService(serviceConnection); > Log.d("MyMediaPlayerActivity","Activity: unbindService()"); > }
That needs to be getApplicationContext().unbindService(serviceConnection). If you bind using getApplicationContext(), you unbind using getApplicationContext(). -- Mark Murphy (a Commons Guy) http://commonsware.com | http://github.com/commonsguy http://commonsware.com/blog | http://twitter.com/commonsguy Android Training in DC: 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 android-developers@googlegroups.com To unsubscribe from this group, send email to android-developers+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/android-developers?hl=en