bindService

abstract fun <R> R.bindService(uuid: UUID, update: T.(R) -> T = { this }, binding: RemoteServiceBinding.EnsuresAvailable<R>.() -> Unit)

Binds an object of type R to the RemoteService at a given UUID and updates the object whenever it changes.

Parameters

uuid

the UUID of the RemoteService to bind to

update

the function that updates the object whenever the bound object changes

binding

Type Parameters

R

the type of the object to bind to

Throws


open fun <R> R.bindService(uuidString: String, update: T.(R) -> T = { this }, binding: RemoteServiceBinding.EnsuresAvailable<R>.() -> Unit)

Binds an object of type R to the RemoteService at a given UUID and updates the object whenever it changes.

Parameters

uuidString

the string of the UUID of the RemoteService to bind to

update

the function that updates the object whenever the bound object changes

binding

Type Parameters

R

the type of the object to bind to

Throws