Esempio n. 1
0
        public static InterstitialAd LoadAdInBackground(Context context)
        {
            InterstitialAd interstitialAd = new InterstitialAd(context);

            interstitialAd.AdUnitId = context.GetString(Resource.String.int_ad); //TESTING UNIT. Should be changed for production.
            interstitialAd.SetImmersiveMode(true);
            interstitialAd.AdListener = new CustomAdListener(interstitialAd, context as AppCompatActivity);
            interstitialAd.LoadAd(new AdRequest.Builder().Build());

            return(interstitialAd);
        }