Hi!
I have multiple activities and one service.. In MainActivity
I successfully connect to service (using a class what implements ServiceConnection
+ bindService()
+ startService()
) but when i try to apply same method in other activity i see in LogCat a error:
01-15 22:29:37.438: ERROR/ActivityThread(12206): Activity com.app.liviu.simpleMusicPlayer.PlaylistActivity has leaked ServiceConnection com.app.liviu.simpleMusicPlayer.PlaylistActivity$CounterServiceConnection@43713c90 that was originally bound here 01-15 22:29:37.438: ERROR/ActivityThread(12206): android.app.ServiceConnectionLeaked: Activity com.app.liviu.simpleMusicPlayer.PlaylistActivity has leaked ServiceConnection com.app.liviu.simpleMusicPlayer.PlaylistActivity$CounterServiceConnection@43713c90 that was originally bound here.
It Is possible to connect to service in an other way: something like to make static my CounterServiceConnection
object in MainActivity
and use it in the second one?
Thank you!