services-api / com.keecker.services.interfaces / PersistentServiceConnection
PersistentServiceConnection
interface PersistentServiceConnection<ServiceInterface :
IInterface
>
A Service connection that will attempt to connect forever. Wraps
We do not let the user to get a binder because exception can be hard to catch on every call
Functions
execute | abstract suspend fun <T> execute(lambda: ( ServiceInterface ) -> T ): T ? |
onNewServiceInstance | abstract fun onNewServiceInstance(lambda: suspend ( ServiceInterface ) -> Unit ): Unit Called each time the service gets a new binder Indicates this is the first time that this connection talks to this particular service instance. It happens when you start the connection, and may happen again if the remote process dies or the app gets updated. |
unbind | abstract fun unbind(): Unit Unbind, will rebind when calling getBinder |
Inheritors
KeeckerServiceConnection | class KeeckerServiceConnection<ServiceInterface : IInterface > : PersistentServiceConnection < ServiceInterface > A PersistentServiceConnection wrapping AIDL calls to handle potential IPC errors automatically. |