private void setOnAdErrorCallback(string gameObject, string method) { #if UNITY_ANDROID instance.Call("setOnAdErrorCallback", gameObject, method); #elif UNITY_IPHONE AppnextIOSSDKBridge.setOnAdErrorCallback(adKey, gameObject, method); #endif }
protected override void initConfig() { base.initConfig(); this.creativeType = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_CREATIVE_TYPE); this.skipText = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_SKIP_TEXT); this.autoPlay = AppnextIOSSDKBridge.getConfigDefaultBool(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_AUTO_PLAY); }
public void setShowClose(bool showClose, long delay) { #if UNITY_ANDROID instance.Call("setShowClose", showClose, delay); #elif UNITY_IPHONE double tDelay = delay / 1000; AppnextIOSSDKBridge.setShowClose(adKey, showClose); AppnextIOSSDKBridge.setCloseDelay(adKey, tDelay); #endif }
protected virtual void initConfig() { this.buttonText = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_BUTTON_TEXT); this.buttonColor = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_BUTTON_COLOR); this.categories = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_CATEGORIES); this.postback = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_POSTBACK); this.orientation = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_ORIENTATION); this.backButtonCanClose = false; this.mute = AppnextIOSSDKBridge.getConfigDefaultBool(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_MUTE); }
protected override void initConfig() { base.initConfig(); this.progressType = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_PROGRESS_TYPE); this.progressColor = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_PROGRESS_COLOR); this.videoLength = AppnextIOSSDKBridge.getConfigDefaultString(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_VIDEO_LENGTH); this.delay = (long)(AppnextIOSSDKBridge.getConfigDefaultDouble(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_DELAY) * 1000); this.showClose = AppnextIOSSDKBridge.getConfigDefaultBool(AppnextIOSSDKBridge.AD_CONFIG_DEFAULT_SHOW_CLOSE); }
public bool isAdLoaded() { #if UNITY_ANDROID return(AndroidJNI.CallBooleanMethod(instance.GetRawObject(), AndroidJNIHelper.GetMethodID(instance.GetRawClass(), "isAdLoaded", "()Z"), new jvalue[0] { })); #elif UNITY_IPHONE return(AppnextIOSSDKBridge.adIsLoaded(adKey)); #else return(false); #endif }
// // IDisposable // public void Dispose() { if (!this.disposed) { #if UNITY_ANDROID #elif UNITY_IPHONE AppnextIOSSDKBridge.disposeAd(adKey); #endif } this.disposed = true; }
public void setRewardedServerSidePostback(string rewardsTransactionId, string rewardsUserId, string rewardsRewardTypeCurrency, string rewardsAmountRewarded, string rewardsCustomParameter) { #if UNITY_ANDROID instance.Call("setRewardedServerSidePostback", rewardsTransactionId, rewardsUserId, rewardsRewardTypeCurrency, rewardsAmountRewarded, rewardsCustomParameter); #elif UNITY_IPHONE AppnextIOSSDKBridge.setRewardsTransactionId(adKey, rewardsTransactionId); AppnextIOSSDKBridge.setRewardsUserId(adKey, rewardsUserId); AppnextIOSSDKBridge.setRewardsRewardTypeCurrency(adKey, rewardsRewardTypeCurrency); AppnextIOSSDKBridge.setRewardsAmountRewarded(adKey, rewardsAmountRewarded); AppnextIOSSDKBridge.setRewardsCustomParameter(adKey, rewardsCustomParameter); #endif }