Skip to content

Commit

Permalink
Update code to make android work
Browse files Browse the repository at this point in the history
  • Loading branch information
lazarkov committed May 17, 2024
1 parent 3b23b5b commit fb174cc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
9 changes: 9 additions & 0 deletions examples/tv-app/android/java/MyUserPrompter-JNI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,6 +227,15 @@ bool JNIMyUserPrompter::DisplaysPasscodeAndQRCode()
return false;
}

/**
* Called to prompt the user for consent to allow the app commissioneeName/vendorId/productId to be installed.
* For example "[commissioneeName] is requesting permission to install app to this TV, approve?"
*/
void JNIMyUserPrompter::PromptForAppInstallOKPermission(uint16_t vendorId, uint16_t productId, const char * commissioneeName)
{
ChipLogError(Zcl, "JNIMyUserPrompter::PromptForAppInstallOKPermission Needs Implementation");
}

/**
* Called to display the given setup passcode to the user,
* for commissioning the given commissioneeName with the given vendorId and productId,
Expand Down
1 change: 1 addition & 0 deletions examples/tv-app/android/java/MyUserPrompter-JNI.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ class JNIMyUserPrompter : public UserPrompter
void PromptForCommissionOKPermission(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override;
void PromptForCommissionPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, uint16_t pairingHint,
const char * pairingInstruction) override;
void PromptForAppInstallOKPermission(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override;
void HidePromptsOnCancel(uint16_t vendorId, uint16_t productId, const char * commissioneeName) override;
bool DisplaysPasscodeAndQRCode() override;
void PromptWithCommissionerPasscode(uint16_t vendorId, uint16_t productId, const char * commissioneeName, uint32_t passcode,
Expand Down

0 comments on commit fb174cc

Please sign in to comment.