Esempio n. 1
0
 public override void OnExpiring(AdColonyInterstitial ad)
 {
     // Request a new ad if ad is expiring
     _activity.showButton.Enabled  = false;
     _activity.progress.Visibility = ViewStates.Visible;
     AdColony.RequestInterstitial(ZONE_ID, this, _activity.adOptions);
     Log.Debug(TAG, "onExpiring");
 }
Esempio n. 2
0
        protected override void OnResume()
        {
            base.OnResume();

            // It's somewhat arbitrary when your ad request should be made. Here we are simply making
            // a request if there is no valid ad available onResume, but really this can be done at any
            // reasonable time before you plan on showing an ad.
            if (ad == null || ad.IsExpired)
            {
                // Optionally update location info in the ad options for each request:
                // LocationManager locationManager =
                //     (LocationManager) getSystemService(Context.LOCATION_SERVICE);
                // Location location =
                //     locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);
                // adOptions.setUserMetadata(adOptions.getUserMetadata().setUserLocation(location));
                progress.Visibility = ViewStates.Visible;
                AdColony.RequestInterstitial(ZONE_ID, listener, adOptions);
            }
        }