Wrapper Integration for Android

Wrapper is an easy ad integration tool that seamlessly integrates ad services into apps without affecting the app package.

Minimum System Requirements

Windows 7 or above

RAM 512MB or above

a working internet connection (required to update the Wrapper)

Download the Wrapper

Before proceeding, ensure that you have downloaded the latest version of the Wrapper from here.

Install the Wrapper

The executable file is in an archive and you need to extract it after downloading. Run VMAXWrapper.exe to launch the tool.

Wrapper

Integrating your app with VMAX is a simple four-step process.

Step 1: Choose App(s)

You can add individual Android APK files or point to a folder containing APK files here. Click APK file to add only an application package or Folder containing APK files to point the Wrapper to a folder that contains one or more APK files.

Step 2: Set up Adspot(s)

Toggle to show ads at launch, and/or exit.

Create an adspot in VMAX and enter the adspot id here.

Configure the launch and exit ad settings as per your requirements.

Click Next Step for ad network selection.

Step 3: Select Ad Networks

Select one or more ad networks. Ensure that you have linked these ad networks to your adspots and applied weightages to them. The code related to these mediation partners will be integrated into your package.

Click Next Step to manage permissions and enter some basic details.

Step 4: Finalize

Click Wrap to integrate VMAX and the mediation partners with your app package.

Blocking Ads

You can block ads based on certain flags set in your application. This is useful if you want to hide of display ads on a user’s action. There are two methods: the simple mode uses a predefined flag name and values while the advanced mode allows you to give custom names and flag types.

Simple Mode

If you are using the Simple mode you can directly use the code provide below to enable or disable ads.

1

2

3

4

5

6

7

8

9

10

11

12

13

14

15

16

17

//Code to Block Ads

//Please don't modify this code or the flag names

SharedPreferences preferences=getSharedPreferences("showAds",0);

SharedPreferences.Editor editor=preferences.edit();

editor.putBoolean("stopPreAd",true);

editor.putBoolean("stopPostAd",true);

editor.commit();

//Code to Unblock Ads

//Please don't modify this code or the flag names

SharedPreferences preferences=getSharedPreferences("showAds",0);

SharedPreferences.Editor editor=preferences.edit();

editor.putBoolean("stopPreAd",false);

editor.putBoolean("stopPostAd",false);

editor.commit();

Advanced Mode

The simple mode is recommended, but if you want to use your own flags or have different compare types, you need to use the Advanced Block Ads mode. In Advanced mode you can provide your own flag names and use one of the following types to compare: string, int, float, boolean, or float.

You will need to provide the following flags:

Preference Name

Flag Name

Flag Data Type

Compare Against

Here is the simple logical flow that the Wrapper will follow:

1

2

ifPreferenceName->Flag Name==Compare Against

thenBlock Ads

The Flag Type is required by the Wrapper to know how you would like to compare the flags. You can extend the code provide above for the simple Block Ads scenario to use here. Here is an example: