In addition to binding to the service, do you use startService? If you do, you must also call stopService/stopSelf, just unbinding and calling stopForeground is not enough.
On Thursday, May 2, 2013 9:07:07 PM UTC+2, Larry Meadors wrote: > > I have a bound service that I'm using to play audio. > > An activity binds to the service in onResume() and sets the service as > a foreground service. > > The onPause() checks to see if the media player on the service is > playing, and if it is NOT, calls stopForeground(true), then unbinds > (in either case - playing or not). > > I've got code in the onDestroy with log calls, but while other logs > messages from the service show up...it doesn't appear that the > onDestroy() is getting called. > > Am I misunderstanding the lifecycle here, or is there something I can > check to see why the service remains running? > > Larry > -- -- 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 --- You received this message because you are subscribed to the Google Groups "Android Developers" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/groups/opt_out.

