Skip to content

Commit

Permalink
Fix Parsing Response Data in Content App Command Delegate (project-ch…
Browse files Browse the repository at this point in the history
…ip#35605)

* 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 project-chip#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 project-chip#34895

Tested on Prime Video casting from Android and iOS. Commissioning and casting control were successful.
  • Loading branch information
TinnaLiu authored and yyzhong-g committed Dec 11, 2024
1 parent 4c8e79e commit 00ef1b5
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 00ef1b5

Please sign in to comment.