CommissioningResult

public final class CommissioningResult extends Object
implements Parcelable

Response after commissioning a device, indicating the details of the commissioned device.

Nested Class Summary

class CommissioningResult.Builder Builder class to create instances of CommissioningResult

Inherited Constant Summary

int CONTENTS_FILE_DESCRIPTOR
int PARCELABLE_STABILITY_LOCAL
int PARCELABLE_STABILITY_VINTF
int PARCELABLE_WRITE_RETURN_VALUE

Public Method Summary

static CommissioningResult.Builder
builder()
Returns an empty builder.
boolean
equals(Object other)
static CommissioningResult
DeviceDescriptor
getCommissionedDeviceDescriptor()
Information about the device that was commissioned.
String
getDeviceName()
The device name assigned to the device during commissioning.
Room
getRoom()
This method is deprecated. this will no longer be populated since rooms are no longer in the commissioning flow
String
getToken()
Returns the token supplied by your commissioning service in CommissioningCompleteMetadata.Builder.setToken(String), if one was specified.
int
void
writeToParcel(Parcel dest, int flags)

Inherited Method Summary

Object
clone()
boolean
equals(Object arg0)
void
finalize()
final Class<?>
getClass()
int
hashCode()
final void
notify()
final void
notifyAll()
String
toString()
final void
wait(long arg0, int arg1)
final void
wait(long arg0)
final void
wait()
abstract int
describeContents()
abstract void
writeToParcel(Parcel arg0, int arg1)

Public Methods

public static CommissioningResult.Builder builder ()

Returns an empty builder.

public boolean equals (Object other)

public static CommissioningResult fromIntentSenderResult (int resultCode, Intent data)

Parses out the data from the CommissioningClient.commissionDevice(CommissioningRequest) IntentSender result. This can be called for both success and failure cases to interpret the result data.

In a successful commissioning, a CommissioningResult will be returned. For failure cases, an ApiException will be thrown, containing a Status which indicates the cause of the commissioning failure.

Parameters
resultCode the result code, returned by the IntentSender returned by the CommissioningClient.commissionDevice(CommissioningRequest) API
data the result data, returned by the IntentSender returned by the CommissioningClient.commissionDevice(CommissioningRequest) API
Throws
ApiException if the result data indicates a commissioning failure

public DeviceDescriptor getCommissionedDeviceDescriptor ()

Information about the device that was commissioned.

public String getDeviceName ()

The device name assigned to the device during commissioning.

public Room getRoom ()

This method is deprecated.
this will no longer be populated since rooms are no longer in the commissioning flow

The room (if any) that was selected during commissioning.

public String getToken ()

Returns the token supplied by your commissioning service in CommissioningCompleteMetadata.Builder.setToken(String), if one was specified. Otherwise, returns null.

public int hashCode ()

public void writeToParcel (Parcel dest, int flags)