VMAX
 
 
 
 
Show Sidebar

Requesting Ads – Windows 10 Mobile

Rất tiếc, mục này chỉ tồn tại ở English. For the sake of viewer convenience, the content is shown below in the alternative language. You may click the link to switch the active language.

Step 5: Requesting Ads

Currently, only Banners, Interstitials, Frames, and Native ads are supported.

Requesting Interstitials

The VMAX SDK provides various mechanisms to request for Ads in your UWP application. The SDK makes available both simple fully-managed Ad request methods and also the Cache & Show Ad methods to enable prefetching of ads for later viewing.

To request Managed Interstitials using LoadAd()

Requesting Rewarded Video Incent ads

VMAX also supports video ads with incent provision. These are video ads which on view completion will provide some virtual currency to users.
Vmax SDK supports wallet management to maintain walletElements also known as currency name which stores respective currency amount or total reward amount. And provides provision of getting total virtual currency, spending virtual currency, awarding virtual currency.

Below snippet shows the example of requesting Vast MarkUp Ads

Requesting Video Interstitial Ads for Video Player adspots

This will help you to get vast Markup(XML) in string format for video player Adspot where developers have their own players to play video Ads.

Below snippet shows the example of requesting Vast MarkUp Ads

Requesting Banner Ads

Managed Banner Ads using LoadAd()

You can request for Banner Ads that refresh automatically in a container using the LoadAd() method. The signature for this method is:

Requesting Native Ads

Native ads are ads which you can customize to match the unique user experience of your app.

Instructions for using the Native Ad Helper Library are available here.

Native ads can be requested in the following manner –

Requesting Video Interstitial Ads for Video Player adspots

This will help you to get vast Markup(XML) in string format for video player Adspot where developers have their own players to play video Ads.

Below snippet shows the example of requesting Vast MarkUp Ads

Step 6: Optional Callbacks

The VMAXAdView generates callbacks for successful and unsuccessful fetching attempts of Ads.

Methods

Specifying callbacks in XAML

Specifying callbacks through Code

The different methods to generate an API callback are as follows.

FailedToLoadAd Callback

The VMAX SDK offers this callback, in cases where an Ad is not served. If required, this event can be used to run any custom code.

FailedToCacheAd Callback

The VMAX SDK offers this callback, in cases where an Ad is not cached. If required, this event can be used to run any custom code.

DidLoadAd Callback

The VMAX SDK offers this callback, in cases where an Ad is rendered successfully. If required, this event can be used to run any custom code.

DidCacheAd Callback

The VMAX SDK offers this callback, in cases where an Ad is cached successfully. If required, this event can be used to run any custom code.

WillDismissOverlay Callback

The VMAX SDK offers this callback, in cases of an Ad dismissal. If required, this event can be used to run any custom code.

WillLeaveApp Callback

The VMAX SDK offers this callback, in cases of the Ad closing the current App and opening another App. If required, this event can be used to run any custom code.

WillPresentOverlay Callback

The VMAX SDK offers this callback, in cases where an interstitial/overlay is shown . If required, this event can be used to run any custom code.

View the process of testing the integration here.