initMessaging

fun initMessaging(context: Context?, lifecycle: Lifecycle)

Initializes the IPC messenger and binds the lifecycle-aware service connection to RemoteService. Subsequent calls are no-ops so it is safe to call from androidx.fragment.app.Fragment.onCreate.

Parameters

context

the application context used to bind the service.

lifecycle

the lifecycle used to bind and unbind the service automatically.