kin-android

kin-android / org.kin.sdk.base / KinAccountContextBase / observeBalance

observeBalance

open fun observeBalance(mode: ObservationMode): Observer<KinBalance>

Returns the current Balance and listens to future account balance changes.

Note: Running with ObservationMode.Passive is suggested unless higher data freshness is required.

ObservationMode.Passive - will return the current balance and any balance updates as a result of actions performed locally. ObservationMode.Active - will return the current balance and any balance updates ObservationMode.ActiveNewOnly - will not return the current balance, but only new updates from now onwards.

Parameters

mode - will change the frequency of updates according to the rules set in ObservationModeopen fun observeBalance(mode: ObservationMode, balanceListener: ValueListener<KinBalance>): Observer<KinBalance>

See Also

KinAccountReadOperations.observeBalance