You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I want to get onboarding payload (starts with MT) of a matter device after its QR code scanned (or setup code is entered) and commissioning is successful (to pass it to custom tv hub). commissionedDeviceDescriptor doesn't contain onboarding payload and I tried to get it from intent like this:
val commissionDeviceLauncher =
rememberLauncherForActivityResult(
contract = ActivityResultContracts.StartIntentSenderForResult()
) { result ->
// Commission Device Step 5.
// The Commission Device activity in GPS (step 4) has completed.
val resultCode = result.resultCode
if (resultCode == Activity.RESULT_OK) {
Timber.d("CommissionDevice: Success")
val payload = result.data?.getStringExtra(Matter.EXTRA_ONBOARDING_PAYLOAD)
Timber.i("Payload $payload")
// We let the ViewModel know that GPS commissioning has completed successfully.
// The ViewModel knows that we still need to capture the device name and will\
// update UI state to trigger the NewDeviceAlertDialog.
homeViewModel.gpsCommissioningDeviceSucceeded(result)
} else {
homeViewModel.commissionDeviceFailed(resultCode)
}
}
but intent doesn't have an EXTRA_ONBOARDING_PAYLOAD extra.
I tried these with both with matter virtual device (macOS app) and real matter device.
I am not sure if I am missing something, any help would be appreciated.
The text was updated successfully, but these errors were encountered:
EXTRA_ONBOARDING_PAYLOAD is for the 3p (with respect to play services) app to include the QR code in its request to initiate commissioning to play services. This allows the calling app to provide the payload and skip QR scan, e.g. when sharing an already commissioned device. Its not for the callback.
After a device is commissioned, the commissioning window should close and subsequent attempts would take a new discriminator and passcode. Hence typically the original payload isn't useful and thus doesn't seem to be passed back.
However it looks like you can get some other information about the commissioned device, like vid / pid.
Hi all,
I want to get onboarding payload (starts with
MT
) of a matter device after its QR code scanned (or setup code is entered) and commissioning is successful (to pass it to custom tv hub).commissionedDeviceDescriptor
doesn't contain onboarding payload and I tried to get it from intent like this:but intent doesn't have an
EXTRA_ONBOARDING_PAYLOAD
extra.I tried these with both with matter virtual device (macOS app) and real matter device.
I am not sure if I am missing something, any help would be appreciated.
The text was updated successfully, but these errors were encountered: