What does it mean to leak a service connection?

后端 未结 3 1628
情话喂你
情话喂你 2021-02-05 07:03

I am writing a service for my Android app and I am trying to understand how the binding mechanism works. If I bind my service in the onCreate of an activity but I don\'t unbind

3条回答
  •  执念已碎
    2021-02-05 07:51

    That happens when Android OS destroys Activity and finds that a ServiceConnection still bound to a running Service, so you need to unbind the service before destroying your Activity

提交回复
热议问题