Skip to content

Commit

Permalink
Fix Parsing Response Data in Content App Command Delegate (#35605)
Browse files Browse the repository at this point in the history
* Fix Parsing Response Data in Content App Command Delegate

Problem: FormatResponseData inside ContentAppCommandDelegate is missing the actual parsing of the reponse data.

Solution: Add back the parsing logic that was accidentally removed in previous PR #34895

Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful.

* Fix Parsing Response Data in Content App Command Delegate

Problem: FormatResponseData inside ContentAppCommandDelegate is missing the actual parsing of the reponse data.

Solution: Add back the parsing logic that was accidentally removed in previous PR #34895

Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful.
  • Loading branch information
TinnaLiu authored and pull[bot] committed Nov 28, 2024
1 parent 905b2fd commit 1218320
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions examples/tv-app/android/java/ContentAppCommandDelegate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,12 @@ Status ContentAppCommandDelegate::InvokeCommand(EndpointId epId, ClusterId clust
void ContentAppCommandDelegate::FormatResponseData(CommandHandlerInterface::HandlerContext & handlerContext, const char * response)
{
handlerContext.SetCommandHandled();
Json::Reader reader;
Json::Value value;
if (!reader.parse(response, value))
{
return;
}

// handle errors from platform-app
if (!value[FAILURE_KEY].empty())
Expand Down

0 comments on commit 1218320

Please sign in to comment.