RewardedInterstitial
- class RewardedInterstitial(self, UnitID, on_reward=None)
This class represent a RewardedInterstitialAd Object. Instance this class to create a Rewarded Interstitial Ad.
- Parameters
UnitID (str) – The UnitID for this Ad.
on_reward (function) – The function to executed when an user completes watching the reward ad(i.e. earns the reward)
- __init__(self, UnitID, on_reward=None)
- Parameters
UnitID (str) – The UnitID for this Ad.
on_reward (function) – The function to executed when an user completes watching the reward ad(i.e. earns the reward)
Constructor function
- load(self, UnitID)
- Parameters
UnitID (str) – The UnitID for this Ad.
Loads an reward video ad from AdMob Servers. If you call this function when there is already an ad loaded, nothing will happen. This is done so as to prevent reloads of ads causing more network usage and possible suspicous network traffic report on your AdMob account. This function is auto called when instancing the class.
- show(self, immersive=False)
- Parameters
immersive (boolean optional) – If the ad should be shown in immersive mode or not. If set to True the ad will be shown without a navigation bar and notification shade. By default it is set to False.
Call this function to show your reward video ad. Function will only run if an ad is already loaded or else nothing will happen.
- is_loaded(self)
- Return type
boolean
Returns whether the interstitial ad has been loaded from AdMob servers.
- is_dismissed(self)
- Return type
boolean
Returns if the interstitial ad was dismissed by pressing the close button.
- get_reward_amount(self)
- Return type
string
Returns the amount of reward that the user has received
- get_reward_type(self):
- Return type
int
Returns the type of reward the user has received.