DVAndroidBondWatch class

Follows a bond through, one getBondState() reading at a time.

createBond() returns as soon as the request is lodged, so the boolean it hands back means "asked", not "paired" — while every other platform's bluetooth.pair means "paired". Closing that gap means watching the state until it settles, and the watching is what needs the small amount of memory this class holds.

The state to remember is whether bonding ever started. BOND_NONE at the first reading is the ordinary race with a request that has only just been lodged; the same BOND_NONE after BOND_BONDING is somebody pressing cancel. Without the distinction, either every pairing reports failure a moment before succeeding, or a cancelled one leaves a screen spinning until the timeout.

Constructors

DVAndroidBondWatch()

Properties

hashCode → int
The hash code for this object.
no setterinherited
runtimeType → Type
A representation of the runtime type of the object.
no setterinherited

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
observe(int state) → DVAndroidBondOutcome
Reads one state and says whether to stop.
toString() → String
A string representation of this object.
inherited

Operators

operator ==(Object other) → bool
The equality operator.
inherited