protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_interstitial_ad); // Initialize the Ads SDK: UnityAds.Initialize(this, _unityGameID, new UnityAdsListener(), _isTestMode); var showAdButton = FindViewById <Button>(Resource.Id.showAdButton); showAdButton.Click += ShowAdButton_Click; }
protected override void OnCreate(Bundle savedInstanceState) { base.OnCreate(savedInstanceState); SetContentView(Resource.Layout.activity_banner_ad); bannerView = FindViewById <View>(Resource.Id.bannerView); // Declare a new banner listener, and set it as the active banner listener: UnityBanners.BannerListener = new UnityBannerListener(this); // Initialize the Ads SDK: UnityAds.Initialize(this, _unityGameID, new UnityAdsListener(), _isTestMode); var showAdButton = FindViewById <Button>(Resource.Id.showAdButton); showAdButton.Click += ShowAdButton_Click; }