Admob Testing Mode

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();

 

IOS

 

Android 

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

AdRequest adRequest = new AdRequest.Builder()

2,412 total views, 1 views today

Share this OnShare on FacebookTweet about this on TwitterShare on LinkedInShare on Google+

2 comments

  • Ankur Sharma

    for Windows Phone 8 you can use the following code

    public MainPage()
    {
    InitializeComponent();
    // NOTE: Edit “MY_AD_UNIT_ID” with your ad unit id.
    AdView bannerAd = new AdView
    {
    Format = AdFormats.Banner,
    AdUnitID = “MY_AD_UNIT_ID”
    };
    bannerAd.ReceivedAd += OnAdReceived;
    bannerAd.FailedToReceiveAd += OnFailedToReceiveAd;
    LayoutRoot.Children.Add(bannerAd);
    AdRequest adRequest = new AdRequest();
    adRequest.ForceTesting = true;
    bannerAd.LoadAd(adRequest);
    }

    private void OnAdReceived(object sender, AdEventArgs e)
    {
    Debug.WriteLine(“Received ad successfully”);
    }

    private void OnFailedToReceiveAd(object sender, AdErrorEventArgs errorCode)
    {
    Debug.WriteLine(“Failed to receive ad with error ” + errorCode.ErrorCode);
    }

Leave a Reply