-
- All Implemented Interfaces:
-
android.content.ServiceConnection
public final class BinderConnection<T extends IBinder> implements ServiceConnection
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description public classBinderConnection.Companion
-
Constructor Summary
Constructors Constructor Description BinderConnection(Context context, KClass<out T> type)
-
Method Summary
Modifier and Type Method Description final Unitunbind()final <R extends Any> RrunWhenConnected(SuspendFunction1<T, R> command)final <N extends Any, V extends Flow<N>> Flow<N>flowWhenConnected(KProperty1<T, V> property)UnitonServiceConnected(ComponentName name, IBinder service)UnitonServiceDisconnected(ComponentName name)-
-
Method Detail
-
runWhenConnected
final <R extends Any> R runWhenConnected(SuspendFunction1<T, R> command)
-
flowWhenConnected
final <N extends Any, V extends Flow<N>> Flow<N> flowWhenConnected(KProperty1<T, V> property)
-
onServiceConnected
Unit onServiceConnected(ComponentName name, IBinder service)
-
onServiceDisconnected
Unit onServiceDisconnected(ComponentName name)
-
-
-
-