// Main initialization method. Based on result of initialization, certain events may be fired off. // This service uses the API from the main AdColony API, that must be set first public static void Configure(string initParams = null) { // Using SharedInstance to make sure the MonoBehaviour is instantiated if (SharedInstance._instance == null) { Debug.LogWarning(Constants.PubServicesMessageSdkUnavailable); return; } Debug.Log(Constants.PubServicesManagerName + " SDK init, initParams: " + AdColonyJson.Encode(initParams)); Hashtable h = null; try { if (initParams != null) { h = (Hashtable)AdColonyJson.Decode(initParams); } } catch { } SharedInstance._instance.Configure(h); _initialized = true; SharedInstance._instance.SetUnityInitialized(); }
public void Configure(Hashtable initParams) { // Need to use the YvolverUnity bridge so it can get the required context string initParamsJson = AdColonyJson.Encode(initParams); _pluginWrapper.CallStatic("configure", initParamsJson); }
public void LogEvent(string name, Hashtable data) { string json = "{}"; if (data != null) { json = AdColonyJson.Encode(data); } _AdcLogEvent(name, json); }
public void LogEvent(string name, Hashtable data) { if (data != null) { string json = AdColonyJson.Encode(data); _pluginWrapper.CallStatic("logEvent", name, json); } else { _plugin.CallStatic("logEvent", name); } }
public void PurchaseProductGoogle(string googleReceiptJson, string googleSignature, string purchaseLocale, long purchasePriceMicro, int inGameCurrencyQuantityForProduct) { Hashtable values = new Hashtable(); values["googleReceiptJson"] = googleReceiptJson; values["googleSignature"] = googleSignature; values["purchaseLocale"] = purchaseLocale; values["purchasePriceMicro"] = purchasePriceMicro; values["inGameCurrencyQuantityForProduct"] = inGameCurrencyQuantityForProduct; string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("purchaseProductGoogle", json); }
public void RequestInterstitialAd(string zoneId, AdOptions adOptions) { Hashtable values = new Hashtable(); values["zone_id"] = zoneId; if (adOptions != null) { values["ad_options"] = adOptions.ToHashtable(); } string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("requestInterstitialAd", json); }
public string toJsonString() { Hashtable data = new Hashtable(); data.Add(Constants.ZoneIdentifierKey, Identifier); data.Add(Constants.ZoneTypeKey, Convert.ToInt32(Type).ToString()); data.Add(Constants.ZoneEnabledKey, Enabled ? "1" : "0"); data.Add(Constants.ZoneRewardedKey, Rewarded ? "1" : "0"); data.Add(Constants.ZoneViewsPerRewardKey, ViewsPerReward.ToString()); data.Add(Constants.ZoneViewsUntilRewardKey, ViewsUntilReward.ToString()); data.Add(Constants.ZoneRewardAmountKey, RewardAmount.ToString()); data.Add(Constants.ZoneRewardNameKey, RewardName); return(AdColonyJson.Encode(data)); }
public void Configure(string appId, AppOptions appOptions, params string[] zoneIds) { Hashtable values = new Hashtable(); values["app_id"] = appId; values["zone_ids"] = new ArrayList(zoneIds); if (appOptions != null) { values["app_options"] = appOptions.ToHashtable(); } string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("configure", json); }
public void RequestAdView(string zoneId, AdSize adSize, AdPosition adPosition, AdOptions adOptions) { Hashtable values = new Hashtable(); values["zone_id"] = zoneId; values["ad_size"] = (Int32)adSize; values["ad_position"] = (Int32)adPosition; if (adOptions != null) { values["ad_options"] = adOptions.ToHashtable(); } string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("requestAdView", json); }
public void Configure(string appId, AppOptions appOptions, params string[] zoneIds) { Hashtable values = new Hashtable(); values["app_id"] = appId; values["zone_ids"] = new ArrayList(zoneIds); if (appOptions == null) { appOptions = new AppOptions(); } appOptions.SetOption("plugin_version", AdColony.Constants.AdapterVersion); values["app_options"] = appOptions.ToHashtable(); string json = AdColonyJson.Encode(values); _pluginWrapper.CallStatic("configure", json); }
public string ToJsonString() { return(AdColonyJson.Encode(_data)); }
public string ToJsonString() { Hashtable data = ToHashtable(); return(AdColonyJson.Encode(data)); }