rememberBoundLocalService

Remembers a reference to a Service's Binder in composition. The function will bind to a service while it is in the composition and unbind when it has left the composition. The function will maintain a ServiceConnection and return a State with a nullable value of service.

Binding to the service takes some time and connection breakages can occur, so the return state value may be null at times.