feat: 广告位管理第三方广告相关优化—客户端 https://jira.shanqu.cc/browse/GHZS-4959
This commit is contained in:
@ -192,7 +192,8 @@ object AdDelegateHelper {
|
||||
/**
|
||||
* 热启动是否需要显示开屏广告
|
||||
*/
|
||||
private fun shouldShowStartUpAdWhenHotLaunch() = mSplashAd?.displayRule?.hotStartSplashAd?.type == AD_TYPE_SDK
|
||||
private fun shouldShowStartUpAdWhenHotLaunch() =
|
||||
mSplashAd?.displayRule?.hotStartSplashAd?.type == AD_TYPE_SDK && mSplashAd?.hotStartThirdPartyAd != null
|
||||
|
||||
/**
|
||||
* 是否需要显示下载管理广告
|
||||
@ -386,8 +387,10 @@ object AdDelegateHelper {
|
||||
}
|
||||
}
|
||||
|
||||
val thirdPartyAd = if (isHotLaunch) mSplashAd?.hotStartThirdPartyAd else mSplashAd?.thirdPartyAd
|
||||
|
||||
// 第三方广告的数据为空,按加载失败处理
|
||||
if (mSplashAd == null || mSplashAd?.thirdPartyAd == null) {
|
||||
if (mSplashAd == null || thirdPartyAd == null) {
|
||||
sdkSplashCallback.invoke(false)
|
||||
return
|
||||
}
|
||||
@ -398,14 +401,14 @@ object AdDelegateHelper {
|
||||
((mSplashAd?.displayRule?.timeout ?: 3.5F) * 1000).toInt()
|
||||
}
|
||||
|
||||
if (mSplashAd?.thirdPartyAd?.sourceName == AD_SDK_BEIZI) {
|
||||
if (thirdPartyAd.sourceName == AD_SDK_BEIZI) {
|
||||
sdkStartAdContainer.visibility = View.VISIBLE
|
||||
requestBeiziSplashAd(sdkStartAdContainer, adsViewGroup, adViewWidthInPx, adViewHeightInPx, timeout.toLong(), sdkSplashCallback)
|
||||
} else if (mSplashAd?.thirdPartyAd?.sourceName == AD_SDK_CSJ) {
|
||||
} else if (thirdPartyAd.sourceName == AD_SDK_CSJ) {
|
||||
sdkStartAdContainer.visibility = View.VISIBLE
|
||||
requestCsjSplashAd(
|
||||
activity,
|
||||
mSplashAd?.thirdPartyAd?.slotId ?: "unknown",
|
||||
thirdPartyAd.slotId,
|
||||
adViewWidthInPx,
|
||||
adViewHeightInPx,
|
||||
adViewWidthInDp,
|
||||
|
||||
@ -13,6 +13,8 @@ class AdConfig(
|
||||
val displayRule: DisplayRule,
|
||||
@SerializedName("third_party_ads")
|
||||
val thirdPartyAd: ThirdPartyAd? = null,
|
||||
@SerializedName("third_party_ads_1")
|
||||
val hotStartThirdPartyAd: ThirdPartyAd? = null, // 热启动开屏广告
|
||||
@SerializedName("owner_ads")
|
||||
val ownerAd: OwnerAdEntity? = null,
|
||||
) {
|
||||
|
||||
Reference in New Issue
Block a user