diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java index b64d10ce811332..e0a188455877c3 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ApplicationBasicReadVendorIDExampleFragment.java @@ -77,6 +77,12 @@ public View onCreateView( v -> { Endpoint endpoint; if (useCommissionerGeneratedPasscode) { + // For the example Commissioner-Generated passcode commissioning flow, run demo + // interactions with the Endpoint with ID DEFAULT_ENDPOINT_ID_FOR_CGP_FLOW = 1. For this + // flow, we commissioned with the Target Content Application with Vendor ID 1111. Since + // this target content application does not report its Endpoint's Vendor IDs, we find + // the desired endpoint based on the Endpoint ID. See + // connectedhomeip/examples/tv-app/tv-common/include/AppTv.h. endpoint = EndpointSelectorExample.selectEndpointById( selectedCastingPlayer, DEFAULT_ENDPOINT_ID_FOR_CGP_FLOW); diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java index e1cfc4a456112b..9d31619fe1fc86 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/ContentLauncherLaunchURLExampleFragment.java @@ -77,6 +77,12 @@ public View onCreateView( v -> { Endpoint endpoint; if (useCommissionerGeneratedPasscode) { + // For the example Commissioner-Generated passcode commissioning flow, run demo + // interactions with the Endpoint with ID DEFAULT_ENDPOINT_ID_FOR_CGP_FLOW = 1. For this + // flow, we commissioned with the Target Content Application with Vendor ID 1111. Since + // this target content application does not report its Endpoint's Vendor IDs, we find + // the desired endpoint based on the Endpoint ID. See + // connectedhomeip/examples/tv-app/tv-common/include/AppTv.h. endpoint = EndpointSelectorExample.selectEndpointById( selectedCastingPlayer, DEFAULT_ENDPOINT_ID_FOR_CGP_FLOW); diff --git a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java index cd5bbba14af2ed..882fc261f67e45 100644 --- a/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java +++ b/examples/tv-casting-app/android/App/app/src/main/java/com/matter/casting/MediaPlaybackSubscribeToCurrentStateExampleFragment.java @@ -79,6 +79,11 @@ public View onCreateView( LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { Endpoint endpoint; if (useCommissionerGeneratedPasscode) { + // For the example Commissioner-Generated passcode commissioning flow, run demo interactions + // with the Endpoint with ID DEFAULT_ENDPOINT_ID_FOR_CGP_FLOW = 1. For this flow, we + // commissioned with the Target Content Application with Vendor ID 1111. Since this target + // content application does not report its Endpoint's Vendor IDs, we find the desired endpoint + // based on the Endpoint ID. See connectedhomeip/examples/tv-app/tv-common/include/AppTv.h. endpoint = EndpointSelectorExample.selectEndpointById( selectedCastingPlayer, DEFAULT_ENDPOINT_ID_FOR_CGP_FLOW); diff --git a/examples/tv-casting-app/tv-casting-common/clusters/Clusters.h b/examples/tv-casting-app/tv-casting-common/clusters/Clusters.h index 2da2f61e4825aa..acaa9d768e3246 100644 --- a/examples/tv-casting-app/tv-casting-common/clusters/Clusters.h +++ b/examples/tv-casting-app/tv-casting-common/clusters/Clusters.h @@ -67,6 +67,28 @@ class ApplicationBasicCluster : public core::BaseCluster }; }; // namespace application_basic +namespace account_login { +class AccountLoginCluster : public core::BaseCluster +{ +public: + AccountLoginCluster(memory::Weak endpoint) : core::BaseCluster(endpoint) {} + + void SetUp() + { + ChipLogProgress(AppServer, "Setting up AccountLoginCluster on EndpointId: %d", GetEndpoint().lock()->GetId()); + + RegisterCommand(chip::app::Clusters::AccountLogin::Commands::GetSetupPIN::Id, + new core::Command(GetEndpoint())); + RegisterCommand(chip::app::Clusters::AccountLogin::Commands::GetSetupPINResponse::Id, + new core::Command(GetEndpoint())); + RegisterCommand(chip::app::Clusters::AccountLogin::Commands::Login::Id, + new core::Command(GetEndpoint())); + RegisterCommand(chip::app::Clusters::AccountLogin::Commands::Logout::Id, + new core::Command(GetEndpoint())); + } +}; +}; // namespace account_login + namespace application_launcher { class ApplicationLauncherCluster : public core::BaseCluster {