Esempio n. 1
0
        public static void ShowWithOptions(HZOfferWallShowOptions showOptions)
        {
            if (Application.platform != RuntimePlatform.Android)
            {
                return;
            }

            AndroidJNIHelper.debug = false;
            using (AndroidJavaClass jc = new AndroidJavaClass("com.heyzap.sdk.extensions.unity3d.UnityHelper")) {
                jc.CallStatic("showOfferWall", showOptions.Tag);
            }
        }
Esempio n. 2
0
        /// <summary>
        /// Shows an ad with the given options.
        /// </summary>
        /// <param name="showOptions"> The options to show the ad with, or the default options if <c>null</c></param>
        public static void ShowWithOptions(HZOfferWallShowOptions showOptions)
        {
            if (showOptions == null)
            {
                showOptions = new HZOfferWallShowOptions();
            }

            #if !UNITY_EDITOR && (UNITY_ANDROID || UNITY_IPHONE)
                #if UNITY_ANDROID
            HZOfferWallAdAndroid.ShowWithOptions(showOptions);
                #elif UNITY_IPHONE
            HZOfferWallAdIOS.ShowWithOptions(showOptions);
                #endif
            #else
            UnityEngine.Debug.LogWarning("Call received to show an HZOfferWallAd, but the SDK does not function in the editor. You must use a device/emulator to fetch/show ads.");
            _instance.StartCoroutine(InvokeCallbackNextFrame(HeyzapAds.NetworkCallback.SHOW_FAILED, showOptions.Tag));
            #endif
        }
Esempio n. 3
0
 public static void ShowWithOptions(HZOfferWallShowOptions showOptions)
 {
     hz_ads_show_offerwall(showOptions.Tag, showOptions.ShouldCloseAfterFirstClick);
 }