Exemplo n.º 1
0
	// Plays an ad with the given options. The user option is only supported for incentivized ads.
	public static void playAd(string placement)
	{
		if (sdk != null && sdk.IsAdPlayable(placement)) {
			cfg = new AdConfig ();
			cfg.SetUserId ("");
			cfg.SetSoundEnabled (_isSoundEnabled);
			cfg.SetOrientation((_orientation == VungleAdOrientation.AutoRotate)?VungleSDKProxy.DisplayOrientations.AutoRotate:VungleSDKProxy.DisplayOrientations.Landscape);
			sdk.PlayAd(cfg, placement);
		}
	}
Exemplo n.º 2
0
 // Plays an ad with the given options. The user option is only supported for incentivized ads.
 public static void playAd(bool incentivized = false, string user = "")
 {
     if (sdk != null && sdk.AdPlayable)
     {
         cfg = new AdConfig();
         cfg.SetIncentivized(incentivized);
         cfg.SetUserId(user);
         cfg.SetSoundEnabled(_isSoundEnabled);
         cfg.SetOrientation((_orientation == VungleAdOrientation.AutoRotate)?VungleSDKProxy.DisplayOrientations.AutoRotate:VungleSDKProxy.DisplayOrientations.Landscape);
         sdk.PlayAd(cfg);
     }
 }
 public void PlayAd(string placementId)
 {
     InvokeSafelyOnUIThreadAsync(delegate
     {
         if (sdk != null && sdk.IsAdPlayable(placementId))
         {
             cfg = new AdConfig();
             cfg.SetUserId(string.Empty);
             cfg.SetSoundEnabled(this.isSoundEnabled);
             cfg.SetOrientation((orientation == VungleAdOrientation.AutoRotate) ? DisplayOrientations.AutoRotate : DisplayOrientations.Landscape);
             sdk.PlayAd(cfg, placementId);
         }
     });
 }