firebase::gma::UserEarnedRewardListener
#include <types.h>
Listener to be invoked when the user earned a reward.
Summary
Public functions
OnUserEarnedReward
virtual void OnUserEarnedReward(
const AdReward & reward
)
Called when the user earned a reward.
The app is responsible for crediting the user with the reward.
Details |
Parameters |
reward
|
the AdReward that should be granted to the user.
|
|
~UserEarnedRewardListener
virtual ~UserEarnedRewardListener()
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-01-23 UTC.
[null,null,["Last updated 2024-01-23 UTC."],[[["`UserEarnedRewardListener` is a class that allows developers to get notified when a user earns a reward in their app."],["The `OnUserEarnedReward` function is called when a reward is earned and provides information about the reward through an `AdReward` object."],["It is the app developer's responsibility to handle the reward crediting process for the user when the `OnUserEarnedReward` function is triggered."],["The `UserEarnedRewardListener` has a virtual destructor `~UserEarnedRewardListener()`."]]],["The `UserEarnedRewardListener` class provides a mechanism for handling user rewards in an app. It has a destructor `~UserEarnedRewardListener` and one key function: `OnUserEarnedReward`. This function is triggered when a user earns a reward, passing an `AdReward` object. The app is responsible for giving this `AdReward` to the user. `OnUserEarnedReward` receives the `AdReward` object that is supposed to be given to the user.\n"]]