firebase::admob::rewarded_video::PollableRewardListener

#include <rewarded_video.h>

A polling-based listener that developers can instantiate and pass to SetListener in order to queue rewards for later retrieval.

Summary

The PollReward method should be used to retrieve awards granted by the Mobile Ads SDK and queued by this class. rewarded_video::presentation_state can be used to poll the current presentation state, so no additional method has been added for it.

Inheritance

Inherits from: firebase::admob::rewarded_video::Listener

Constructors and Destructors

PollableRewardListener()
~PollableRewardListener()

Public functions

OnPresentationStateChanged(PresentationState state)
virtual void
Invoked when the presentation state of the ad changes.
OnRewarded(RewardItem reward)
virtual void
Invoked when the user should be given a reward for watching an ad.
PollReward(RewardItem *reward)
bool
Pop the oldest queued reward, and copy its data into the provided RewardItem.

Public functions

OnPresentationStateChanged

virtual void OnPresentationStateChanged(
  PresentationState state
)

Invoked when the presentation state of the ad changes.

Details
Parameters
state
The new presentation state.

OnRewarded

virtual void OnRewarded(
  RewardItem reward
)

Invoked when the user should be given a reward for watching an ad.

Details
Parameters
reward
The user's reward.

PollReward

bool PollReward(
  RewardItem *reward
)

Pop the oldest queued reward, and copy its data into the provided RewardItem.

If no reward is available, the struct is unchanged.

Details
Parameters
reward
Pointer to a struct that reward data can be copied into.
Returns
true if a reward was popped and data was copied, false otherwise.

PollableRewardListener

 PollableRewardListener()

~PollableRewardListener

 ~PollableRewardListener()

Send feedback about...

Need help? Visit our support page.