Example #1
0
 private void HandleCustomNativeAdLoaded(object sender, CustomNativeEventArgs args)
 {
     this.nativeAdLoaded = true;
     this.nativeAd       = args.nativeAd;
     this.nativeAd.RecordImpression();
     Debug.Log("HandleCustomNativeAdLoaded");
 }
        private static void AdLoaderDidReceiveNativeCustomTemplateAdCallback(

            IntPtr adLoader, IntPtr nativeCustomTemplateAd, string templateID)

        {
            AdLoaderClient client = IntPtrToAdLoaderClient(adLoader);

            Action <CustomNativeTemplateAd, string> clickHandler =

                client.customNativeTemplateCallbacks.ContainsKey(templateID) ?

                client.customNativeTemplateCallbacks[templateID] : null;

            if (client.OnCustomNativeTemplateAdLoaded != null)

            {
                CustomNativeEventArgs args = new CustomNativeEventArgs()

                {
                    nativeAd = new CustomNativeTemplateAd(new CustomNativeTemplateClient(

                                                              nativeCustomTemplateAd, clickHandler))
                };

                client.OnCustomNativeTemplateAdLoaded(client, args);
            }
        }
Example #3
0
        public void onCustomTemplateAdLoaded(AndroidJavaObject ad)
        {
            CustomNativeEventArgs args = new CustomNativeEventArgs()
            {
                nativeAd = new CustomNativeTemplateAd(new CustomNativeTemplateClient(ad))
            };

            onCustomNativeTemplateAdLoaded(this, args);
        }
Example #4
0
 public void onCustomTemplateAdLoaded(AndroidJavaObject ad)
 {
     if (this.OnCustomNativeTemplateAdLoaded != null)
     {
         CustomNativeEventArgs customNativeEventArgs = new CustomNativeEventArgs();
         customNativeEventArgs.nativeAd = new CustomNativeTemplateAd(new CustomNativeTemplateClient(ad));
         CustomNativeEventArgs e = customNativeEventArgs;
         this.OnCustomNativeTemplateAdLoaded(this, e);
     }
 }
Example #5
0
 public void onCustomTemplateAdLoaded(AndroidJavaObject ad)
 {
     if (OnCustomNativeTemplateAdLoaded != null)
     {
         var args = new CustomNativeEventArgs
         {
             nativeAd = new CustomNativeTemplateAd(new CustomNativeTemplateClient(ad))
         };
         OnCustomNativeTemplateAdLoaded(this, args);
     }
 }
Example #6
0
        public void DummyOnCustomNativeTemplateAdLoaded()
        {
            CustomNativeEventArgs args = new CustomNativeEventArgs();

            this.OnCustomNativeTemplateAdLoaded(this, args);
        }
Example #7
0
 /// <summary>
 /// Handles the ad event corresponding to a CustomNativeTemplateAd succesfully loading.
 /// </summary>
 /// <param name="sender">Sender.</param>
 /// <param name="args">EventArgs wrapper for CustomNativeTemplateAd that loaded.</param>
 private void HandleCustomNativeAdLoaded(object sender, CustomNativeEventArgs args)
 {
     this.nativeAd       = args.nativeAd;
     this.nativeAdLoaded = true;
 }