예제 #1
0
    private void RequestNativeAd()
    {
        AdLoader adLoader = new AdLoader.Builder(idNative).ForUnifiedNativeAd().Build();

        adLoader.OnUnifiedNativeAdLoaded += this.HandleOnUnifiedNativeAdLoaded;
        adLoader.LoadAd(AdRequestBuild());
    }
예제 #2
0
    /// <summary>
    /// Requests a CustomNativeTemplateAd.
    /// </summary>
    private void RequestNativeAd()
    {
        AdLoader adLoader = new AdLoader.Builder(AdUnitId)
                            .ForCustomNativeAd(TemplateId)
                            .Build();

        adLoader.OnCustomNativeTemplateAdLoaded += this.HandleCustomNativeAdLoaded;
        adLoader.OnAdFailedToLoad += this.HandleNativeAdFailedToLoad;
        adLoader.LoadAd(new AdRequest.Builder().Build());
    }
예제 #3
0
    public void RequestAd()
    {
        Debug.Log("Requested!");
        AdLoader adLoader = new AdLoader.Builder(NativeAdUnitId)
                            .forCustomNativeAd(TemplateId)
                            .Build();

        adLoader.onCustomNativeTemplateAdLoaded += this.HandleCustomNativeAdLoaded;
        adLoader.OnAdFailedToLoad += this.HandleNativeAdFailedToLoad;
        adLoader.LoadAd(new AdRequest.Builder().Build());
    }
예제 #4
0
        public static void OnAdMobNativeAdRequest(AdMobNativeAd adMobNativeAd)
        {
            _adMobNativeAdZoneId        = adMobNativeAd.zoneId;
            _adMobNativeAdResponseId    = adMobNativeAd.responseId;
            _adMobNativeAdNetworkZoneId = adMobNativeAd.adNetworkZoneId;
            var adLoader = new AdLoader.Builder(_adMobNativeAdNetworkZoneId).ForUnifiedNativeAd().Build();

            adLoader.OnUnifiedNativeAdLoaded += HandleOnUnifiedNativeAdLoaded;
            adLoader.OnAdFailedToLoad        += HandleNativeAdFailedToLoad;

            adLoader.LoadAd(AdRequestBuild());
        }
예제 #5
0
    private void RequestNativeAd()
    {
        AdLoader adLoader = new AdLoader.Builder("ca-app-pub-3940256099942544/2247696110")
                            .ForUnifiedNativeAd()
                            .Build();

        adLoader.OnUnifiedNativeAdLoaded += this.HandleUnifiedNativeAdLoaded;
        adLoader.OnAdFailedToLoad        += this.HandleNativeAdFailedToLoad;


        adLoader.LoadAd(new AdRequest.Builder().Build());
    }
        void LaunchAdLoader()
        {
            if (ad != null)
            {
                return;
            }

            var adLoader = new AdLoader.Builder(Xamarin.Forms.Forms.Context, "ca-app-pub-3940256099942544/2247696110")
                           .ForAppInstallAd(new NativeAppInstallAdListener {
                Renderer = this
            })
                           .WithAdListener(new NativeAdListener()).Build();

            adLoader.LoadAd(new AdRequest.Builder().Build());
        }
예제 #7
0
    private void RequestNativeAd()
    {
        var      unitId   = AdDisplayer.get_unit_id_native();
        AdLoader adLoader = new AdLoader.Builder(unitId)
                            .ForUnifiedNativeAd()
                            .Build();

        adLoader.OnUnifiedNativeAdLoaded += HandleUnifiedNativeAdLoaded;
        adLoader.OnAdFailedToLoad        += AdLoader_OnAdFailedToLoad;
        var rq = new AdRequest.Builder()
                 .AddTestDevice(AdRequest.TestDeviceSimulator)
                 .AddTestDevice("954EEF7C5310E3782526624C14668FCA")
                 .Build();

        adLoader.LoadAd(rq);
    }