Ad Units V5.5

Rewarded Video Interstitial Native Interactive Banner

Before You Start

Before integrating ads unit in your app, you must:

  • In the AdTiming UI, create an account, create an app, and create an ad placement using the format ‘Rewarded Video’. You can follow guides here.
  • Follow our steps to Android SDK Integration by integrating the AdTiming SDK into your project.
  • If you use mediation, go to Add Mediation Networks and make sure you have added the ad network SDKs and the corresponding adapters you wish to use to your app.

Rewarded Video

Rewarded Video Ad with strong interactive ability has become the mainstream form of mobile advertising industry. It is becoming increasingly common for mobile game developers to rely more on built-in ads than IAP to monetize.

The reward generally comes in the form of in-game currency (gold, coins, power-ups, etc.) and is distributed to the user after a successful video completion. We recommend that rewarded video ads be placed where users are already engaging with in-app purchases or where users may be seeking in-app rewards, such as at the end of the game level or at currency exchange points. After users complete their reward experience, you can designate the rewards they will receive.

The AdTiming Rewarded Video ad unit offers an engaging ad experience that rewards your users with valuable virtual content in exchange for a completed view. This user-initiated ad unit is great for gaming apps, and enhances your apps experience. This section tells you how to init, load, and show Rewarded Video Ads.

 Image text
Step 1. Init Rewarded Video Ad
The AdTiming SDK fires several events to inform you of Rewarded Video Ad activity. To display Rewarded Video Ad, you need to create a brand new VideoAd object, setup its listeners and load the ads. The following snippet demonstrates how to use the VideoAd class to create VideoAd objects and implement the VideoAdListener interface to receive video ad events.

Add the following code to create a VideoAd object and register to the events. The SDK will notify the Listener of all possible events listed below:


VideoAd videoAd = new VideoAd(activity, placementId, new VideoAdListener() {

* Invoked when rewarded videos are available.
* You can then show the video by calling videoAd.showAd().

public void onAdReady() {
//videoAd load success

* Invoked when the end user clicked on the RewardedVideo ad

public void onAdClicked() {
//videoAd clicked

* Invoked when the video ad finishes plating.

public void onAdClosed(boolean isFullyWatched) {

* Invoked when the video is completed and the user should be rewarded.
* If using server-to-server callbacks you may ignore this events and wait
* for the callback from the AdTiming server.

public void onAdRewarded() {
//videoAd rewarded

/* Invoked when the call to load or show a rewarded video has failed
* String error contains the reason for the failure:
* According the error message to obtain the state.

public void onAdFailed(String error) {
// videoAd load or show failed
// Do Not invoke loadAd() directly here if load failed instead of after wait(1) .



Step 2. Video ExtId

If your Rewarded Video Ad requires server-to-server data interoperability, you need to pass your user identity to setExtId this way.

videoAd.setExtId("Your User Id");


Step 3. Load Rewarded Video Ad

Invoke loadAd method to request and cache the Rewarded Video Ad before it is going to be shown to users. 


AdTiming SDK automatic calls the loadAd for you to cache the Rewared Video Ads during SDK initialization.  If you want to load a Rewarded Video Ad again after it was shown, it is strongly recommended not to load it immediately before showing. Instead request a Video Ad a short while in advance.


  • If you want to serve video ads more than once in your application, you must show and close the currnetly cached ads before loading the next ad.
  • The loadAd method could be called multiple times at any time, but we do not recommend continuous requests for a short period of time. Many requests in a short period of time have no added value because the opportunities of available for inventory are unlikely at this time. 
  • It is a good choice to request a new Video Ads in the onAdClosed callback.
  • !Warning: Attempting to load a new ad from the onAdFailed() methods is strongly discouraged. If you must load an ad from onAdFailed() ensure to limit ad load retries to avoid continuous failed ad requests in situations such as limited network connectivity.


Step 4. Show Rewarded Video Ad

After the Rewarded Video Ad is successfully loaded by calling the loadAd in Step 3, you will be notified when the ad is ready to be shown through the onAdReady callback which informs the avaliability of ad inventory. 

public void onAdReady() {
// videoAd load success

Once you receive the onAdReady callback, you can invoke the showAd method to serve a Rewarded Video Ad to your users.

public void showAd()

Another way to check if the ad is avalible is by calling the isReady function directly. 

public boolean isReady()

We strongly recommend checking the ad's availibility by isReady method before you show Rewarded Video Ad to your users, as shown in the following code:

 if (videoAd != null && videoAd.isReady()) {


  • Important! When you have successfully completed step 4, you will have shown a Rewarded Video Ad to your users. If you want to serve another Rewarded Video Ad, you must repeat step 3 to request a new Rewarded Video Ad.
  • If you mediate Admob ads,  you need to ensure that calls to the isReady method and show method are made in the main thread.


Step 5. Configure Rewarded Video Ad Server-side Callback

Adtiming SDK supports the rewarded video ad Server-side Callbacks. You can do this by defining a unique, private endpoint for us , and specify information that you want the Adtiming server to pass. The way this works is the app on a user’s device will contact Adtiming servers for validation of a reward. Once a user has been validated by the Adtiming server, we will send notification to the endpoint defined in your dashboard. Since a user’s device will never be in contact with your server, this method prevents tampering with reward events sent to your endpoint.mceclip1.png


Endpoint Format{content}

{content} - the information that you want the Adtiming server to pass.


Step 6. Destroy VideoAd

It is recommended to invoke destroy method to release VideoAd object when the Activity be destroyed.
* Invoke videoAd.destroy() method in Activity's onDestroy() callback
* to release VideoAd object.

public void onDestroy()
if (videoAd != null) {


1 out of 3 found this helpful



Article is closed for comments.