protected override void InternalInit() { #if EM_FAIRBID // Store a reference to the global settings. mGlobalAdSettings = EM_Settings.Advertising.FairBid; // Set GPDR consent (if any) *before* starting the SDK // https://dev-unity.fyber.com/docs/gdpr var consent = GetApplicableDataPrivacyConsent(); ApplyDataPrivacyConsent(consent); // Start FairBid with no automatic fetching since we'll handle ad loading. FairBid.ConfigureForAppId(mGlobalAdSettings.PublisherId) .DisableAutoRequesting() .Start(); // Add callback handlers BannerAdCallbackListener = new MyBannerListener(); BannerAdCallbackListener.setAdClient(this); InterstitialAdCallbackListener = new MyInterstitialListener(); InterstitialAdCallbackListener.setAdClient(this); RewardedAdCallbackListener = new MyRewardedListener(); RewardedAdCallbackListener.setAdClient(this); Banner.SetBannerListener(BannerAdCallbackListener); Interstitial.SetInterstitialListener(InterstitialAdCallbackListener); Rewarded.SetRewardedListener(RewardedAdCallbackListener); mIsInitialized = true; Debug.Log("FairBid client has been initialized."); #else Debug.LogError(NO_SDK_MESSAGE); #endif }
//------------------------------------------------------------ // Show Test Suite (not IAdClient method) //------------------------------------------------------------ public void ShowTestSuite() { #if EM_FAIRBID FairBid.ShowTestSuite(); #else Debug.LogError(NO_SDK_MESSAGE); #endif }
/// <summary> /// Helper method for showing the test suite /// </summary> public void ShowTestSuite() { FairBid.ShowTestSuite(); }
/// <summary> /// Helper method for initializing the SDK with the given app id /// </summary> /// <param name="appId">The app id provided through the Fyber console</param> private void startFairBidSdk(String appId) { FairBid.Start(appId); }