OnUserEarnedRewardListener
Stay organized with collections
Save and categorize content based on your preferences.
Interface definition for a callback to be invoked when the user earned a reward.
Public Methods
public abstract void onUserEarnedReward (RewardItem
reward)
Called when the user earned a reward. The app is responsible for crediting the user
with the reward.
Parameters
reward |
the reward to grant the user. |
Except as otherwise noted, the content of this page is licensed under the Creative Commons Attribution 4.0 License, and code samples are licensed under the Apache 2.0 License. For details, see the Google Developers Site Policies. Java is a registered trademark of Oracle and/or its affiliates.
Last updated 2024-10-31 UTC.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Missing the information I need","missingTheInformationINeed","thumb-down"],["Too complicated / too many steps","tooComplicatedTooManySteps","thumb-down"],["Out of date","outOfDate","thumb-down"],["Samples / code issue","samplesCodeIssue","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2024-10-31 UTC."],[[["`OnUserEarnedRewardListener` is an interface used to receive callbacks when a user earns a reward in an app."],["It contains a single method, `onUserEarnedReward`, which is called when the user earns a reward, providing a `RewardItem` object containing reward details."],["The app is responsible for handling the reward and crediting it to the user based on the information provided in the `RewardItem`."]]],["The `OnUserEarnedRewardListener` interface defines a callback for when a user earns a reward. It features one method, `onUserEarnedReward(RewardItem reward)`, which is triggered when a reward is earned. The application is responsible for giving the user the reward when this method is called, with the `RewardItem` containing details of the reward that should be granted.\n"]]