VMAX
 
 
 
 
Show Sidebar

VMAX SDK for Windows Phone 8

Step 1: Download the SDK

Before proceeding, ensure that you have downloaded the latest version of the VMAX SDK for Windows Phone 8 from here.

Step 2: Set up the SDK

Extract all the files from the SDK archive into a separate folder. It consists of the following folders and files:

VMAXSDKWP8/packages/VMAX

This folder contains the VMAX SDK and its dependencies.

VMAXSDKWP8/packages/Mediation Partners

This folder contains the various mediation partners supported by VMAX SDK along with their mediators/adaptors.

VMAXSampleAppWP8/

This folder contains a Sample project source code that demonstrates the VMAX SDK integration. By default, this project has all the mediation partners integrated.

Step 3: Integrate the SDK

  1. Include the <packages> folder in your project’s folder structure.
  2. Using Project >> Add Reference >> Browse, add the com.vmax.windows.ads.wp8.dll and com.vmax.windowsPhone.ads.mediation.dll to your project. These dlls are present in the packages/VMAX folder.
    Note: If you are already having the older version of VMAX SDK (prior to v3.0.4) please remove the older references replace them with the new one.
  3. Ensure that your project has the following capabilities in the WMAppManifest xml:
    • ID_CAP_NETWORKING
      ID_CAP_MEDIALIB_AUDIO
      ID_CAP_MEDIALIB_PLAYBACK
      ID_CAP_SENSORS
      ID_CAP_WEBBROWSERCOMPONENT
      ID_CAP_MEDIALIB_PHOTO
      ID_CAP_PHONEDIALER
      ID_CAP_IDENTITY_DEVICE
      ID_CAP_LOCATION
      ID_CAP_IDENTITY_USER

Step 4: Preliminary Steps for Requesting Ads

Windows Phone 8 (XAML) apps are composed of UI elements. VMAXAdView is simply another element displaying ads that respond to user interaction.

To display an ad, you need to first create a VMAXAdView and then specify the AdspotId and UX type (Banner/Interstitial/Frame/Native) and then request an ad. Before starting using the SDK you have to import the namespaces for the same. You can refer to the VMAX namespace in your code by using either of the directives mentioned below.

Using code-behind in C#

Using XAML

  1. Import the declared namespace.
  2. Copy the following statement to the start of your XAML page (where other XAML namespaces are declared).

You can just define the VMAXAdView using the markup below directly in your XAML markup file.

Replace MY_ADSPOT_ID with the actual VMAX Adspot id and MY_AD_UX_TYPE with the UX type constant you wish to request.
Note: Currently, only Banners, Interstitials, Frames, and Native ads are supported.

Define a VMAXAdView with code

You can also create the VMAXAdView in code. The following C# example constructs a banner ad by declaring a VMAXAdView and configuring it:

You can also check the version of the sdk that you are using in case of any version specific support needed. VMAX sdk has an api GetSDKVersion(). It returns a string value that will give you the exact sdk version that has been integrated.

View the process of requesting ads here.