If I understand correctly, bindService () with BIND_AUTO_CREATE will start the service and will not die until all the bindings are detached.
But if I bindService (BIND_AUTO_CREATE) on the onCreate () button and click the back button to close the activity, the service calls onDestroy () and also dies.
I do not call unbind () at any time. So this means that when the action was destroyed, the binding was also destroyed and the service was also destroyed?
What if I want the service to always work, at the same time that the action starts. I want to link it in order to access the service?
If I call StartService () and then bindService () in onCreate (), it will restart the service every time the Activity starts. (Which I do not want).
So, could I start the service once and then bind the next time when I start the action?
android service bind
jclova
source share