BondingFailure
The reason why bonding of a simulated peripheral failed.
The client is told the matching reason, and the phone terminates the link a few seconds later. A peripheral that terminates the link itself after a failed bonding can be simulated by calling PeripheralSpec.simulateDisconnection().
Note: Most phones report all the failures, except REJECTED on some, with the same reason (the library reports it as AuthenticationFailed), and the exact reason differs between Android versions. Use REJECTED to emulate a real refusal of the peripheral. The other failures allow testing how the app reacts to the other reasons, which may be reported by phones in the future.
CANCELLED and WRONG_PIN only make sense for pairing that requires user interaction. AUTH_FAILED is the same as WRONG_PIN, but reads better when the simulated peripheral does not use a PIN.
Entries
The user entered a wrong PIN. It is reported in the same way as AUTH_FAILED.
The authentication failed, e.g. the keys did not match. It is reported in the same way as WRONG_PIN, and can be used when the simulated peripheral does not use a PIN.
Properties
Functions
Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
Returns an array containing the constants of this enum type, in the order they're declared.