Admob Testing Mode | Techbirds

By Using admob  in testing mode in development and testing phase, you would be loading test ads on your device/emulator.

This is good and must , since, many times, you might tap on the adverts by mistake, and your admob  account could be banned if this happens regularly or if Admobs decides that you are making those taps deliberately to increase your revenue.

How to use admob in test mode

Windows 

AdRequest adRequest = new AdRequest();

adRequest.ForceTesting = true;

adRequest.ForceTesting = true;

IOS

GADRequest *request = [GADRequest request]; // Make the request for a test ad. Put in an identifier for // the simulator as well as any devices you want to receive test ads. request.testDevices = [NSArray arrayWithObjects: @”YOUR_SIMULATOR_IDENTIFIER”, @”YOUR_DEVICE_IDENTIFIER”, nil];

GADRequest *request = [GADRequest request];

// Make the request for a test ad. Put in an identifier for

// the simulator as well as any devices you want to receive test ads.

request.testDevices = [NSArray arrayWithObjects:

                          @”YOUR_SIMULATOR_IDENTIFIER”,

                          @”YOUR_DEVICE_IDENTIFIER”,

                          nil];

Android 

code sniplet to Add  test device on android for testing of admob

AdRequest adRequest = new AdRequest.Builder()

.addTestDevice(AdRequest.DEVICE_ID_EMULATOR) // Emulator .addTestDevice(“AC98C820A50B4AD8A2106EDE96FB87D4”) // My Galaxy Nexus test phone .build();

    .addTestDevice(AdRequest.DEVICE_ID_EMULATOR)       // Emulator

    .addTestDevice(“AC98C820A50B4AD8A2106EDE96FB87D4”) // My Galaxy Nexus test phone

    .build();

2,768 total views, 1 views today

Share this Onfacebook-2167658twitter-3100424linkedin-3163893google-5927571