services-api / / KeeckerServiceConnection / <init>


KeeckerServiceConnection(context: Context, bindingInfo: ServiceBindingInfo<ServiceInterface>, exceptionListener: RemoteExceptionListener? = null, bindingTimeoutMs: Long = 60000)

A PersistentServiceConnection wrapping AIDL calls to handle potential IPC errors automatically.


context - Android context used to bind and rebind. It must be valid during the whole bind duration. In most of the cases you should give the Application Context.

bindingInfo - Information needed to bind to the service and use its AIDL interface.

exceptionListener - Notifies about internal exceptions, swallowed when retrying the call.

bindingTimeoutMs - Kills the current EphemeralServiceConnection if it did not try to reconnect during this period of time (milliseconds). When a service crashes multiple times, Android may wait a bit before attempting to rebind. This can be more than 10 seconds.