互动广告收益上报
This commit is contained in:
parent
2a560acb56
commit
a748fc8166
|
|
@ -36,6 +36,21 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
|
|
||||||
#region ad
|
#region ad
|
||||||
|
|
||||||
|
public void ShowRewardAd(string position, Action<bool,double> callback = null)
|
||||||
|
{
|
||||||
|
bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady();
|
||||||
|
if (isRewardAdReady)
|
||||||
|
{
|
||||||
|
AdsSDKManager.Instance.ShowRewardAd(position, (isReward, revenue) =>
|
||||||
|
{
|
||||||
|
if (isReward)
|
||||||
|
{
|
||||||
|
//callback?.Invoke();
|
||||||
|
callback?.Invoke(true, revenue);
|
||||||
|
}
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
public void ShowInterstitial(string position, IvType ivadType = IvType.IV1, Action<double> callback = null)
|
public void ShowInterstitial(string position, IvType ivadType = IvType.IV1, Action<double> callback = null)
|
||||||
{
|
{
|
||||||
//插屏展示逻辑
|
//插屏展示逻辑
|
||||||
|
|
@ -114,23 +129,6 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
public void ShowRewardAd(string position, Action<bool,double> callback = null)
|
|
||||||
{
|
|
||||||
bool isRewardAdReady = AdsSDKManager.Instance.IsRewardAdReady();
|
|
||||||
if (isRewardAdReady)
|
|
||||||
{
|
|
||||||
AdsSDKManager.Instance.ShowRewardAd(position, (isReward, revenue) =>
|
|
||||||
{
|
|
||||||
if (isReward)
|
|
||||||
{
|
|
||||||
//callback?.Invoke();
|
|
||||||
callback?.Invoke(true, revenue);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#region 在线参数
|
#region 在线参数
|
||||||
|
|
||||||
public bool GetRemoteConfigBool(string key, bool defaultValue = false)
|
public bool GetRemoteConfigBool(string key, bool defaultValue = false)
|
||||||
|
|
@ -151,7 +149,7 @@ public class AppSDKManager : D_MonoSingleton<AppSDKManager>
|
||||||
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue);
|
return FireBaseRemoteConfigManager.Instance.GetRemoteConfigInt(key, defaultValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
public string GetRemoteConfigString(string key, string defaultValue = "")
|
public string GetRemoteConfigStr(string key, string defaultValue = "")
|
||||||
{
|
{
|
||||||
if (Application.isEditor)
|
if (Application.isEditor)
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -34,6 +34,7 @@ namespace WZ
|
||||||
});
|
});
|
||||||
|
|
||||||
SetSDKEventCallback();
|
SetSDKEventCallback();
|
||||||
|
SetHdH5ImpressionCallback();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void SetSDKEventCallback()
|
private void SetSDKEventCallback()
|
||||||
|
|
@ -44,5 +45,26 @@ namespace WZ
|
||||||
ShuShuEvent.Instance.Track(eventName, dict);
|
ShuShuEvent.Instance.Track(eventName, dict);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// <summary>
|
||||||
|
/// 互动广告展示回调,此时可以计算上报互动广告展示次数和收益
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="callback">string 是互动广告的url</param>
|
||||||
|
public void SetHdH5ImpressionCallback()
|
||||||
|
{
|
||||||
|
EFSdk.get().SetHdH5ImpressionCallback((url) =>
|
||||||
|
{
|
||||||
|
//TODO 判断是okspin还是appluck
|
||||||
|
string h5ad_okspinrev = FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("H5ad_okspinrev", "0");
|
||||||
|
string h5ad_appluckrev= FireBaseRemoteConfigManager.Instance.GetRemoteConfigString("H5ad_appluckrev", "0");
|
||||||
|
//TODO 上报
|
||||||
|
//adjust
|
||||||
|
//AdjustTrackEvent.Instance.TrackAdEvent();
|
||||||
|
//firebase
|
||||||
|
//FireBaseAnalyticsManager.Instance.OnAdRevenueEvent();
|
||||||
|
//数数
|
||||||
|
//ShuShuEvent.Instance.OnAdRevenueEvent();
|
||||||
|
});
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
Reference in New Issue