Performs commissioning of Matter devices (both initial out of box commissioning, as well as multi-administrator commissioning flows).
Public Method Summary
public abstract Task<IntentSender> commissionDevice (CommissioningRequest request)
Commission a new device into one or more fabrics. In the
CommissioningRequest, if no commissioning service is specified, then the
device will be commissioned for use within Google (Google Assistant, Google Home).
If you already know the particular device that you are looking for, then you can
specify this via the
in the request to limit which device will be set up during this commissioning
Alternatively, if you already have proof of possession of a device (e.g. from a manually entered passcode, shared passcode, or QR code) you can specify this in the request via the onboarding payload to target a specific device, and bypass the need to scan a QR code or enter a passcode during commissioning.
Upon success, the activity result will contain a
CommissioningResult in the result data including details about the device
which was commissioned.
public abstract Task<IntentSender> shareDevice (ShareDeviceRequest request)
Returns an IntentSender which can be used to display a sharing UI, which allows the user to grant administrative control of a Matter device to another user (via text) or application.
Upon receiving an IntentSender, it should be started for result. At this point, it is expected that the shared device already has an opened commissioning window, the details of which must be provided in the request.
If the user chooses a sharing destination, then the result will be RESULT_OK, and no further action should be taken (note that this does not mean that the user has commissioned the device -- only that the information has been sent elsewhere). Upon receiving a result of RESULT_CANCELED, you should revoke the opened commissioning window on the device.