Commit f935ab00 authored by maxiaoliang's avatar maxiaoliang

修改插屏广告

parent 0ad4dc0b
......@@ -104,12 +104,12 @@
android:name="org.apache.http.legacy"
android:required="false" />
<!-- <meta-data-->
<!-- android:name="design_width_in_dp"-->
<!-- android:value="420"/>-->
<!-- <meta-data-->
<!-- android:name="design_height_in_dp"-->
<!-- android:value="740"/>-->
<meta-data
android:name="design_width_in_dp"
android:value="420"/>
<meta-data
android:name="design_height_in_dp"
android:value="740"/>
<!-- <meta-data-->
<!-- android:name="design_width_in_dp"-->
<!-- android:value="360"/>-->
......
PACKAGE_NAME=com.zxhl.shop
VERSION_CODE=26
VERSION_NAME=1.2.5
\ No newline at end of file
VERSION_CODE=27
VERSION_NAME=1.2.6
\ No newline at end of file
......@@ -14,7 +14,11 @@ import com.pay.paytypelibrary.base.OnPayResultListener
import com.pay.paytypelibrary.base.OrderInfo
import com.pay.paytypelibrary.base.PayUtil
import com.zx.ad.AdManager
import com.zx.ad.callback.AdLoadCallBack
import com.zx.ad.callback.InterertionAdListener
import com.zx.ad.callback.RewardVideoAdListener
import com.zx.ad.modulecommon.module.NewsEntity
import com.zx.ad.platform.csj.CSJAdManager
import com.zxbw.modulemain.R
import com.zxbw.modulemain.adapter.OperatorAdapter
import com.zxbw.modulemain.adapter.RechargeAdapter
......@@ -106,8 +110,28 @@ class RechargeActivity : BaseActivity(), OnRecycleItemClickListener<MemberEntity
})
}
fun showRewardViewAd(){
AdManager.loadRewardAd(this@RechargeActivity, object : RewardVideoAdListener {
override fun onRewardVideoAdClose() {
}
override fun onRewardVideoAdReward() {
}
override fun onRewardVideoAdShow() {
}
override fun onRewardVideoAdError(errorMsg: String?) {
}
})
}
override fun init() {
showIntriAd()
// showRewardViewAd()
id_img_back?.setOnClickListener {
finish()
}
......
......@@ -104,7 +104,7 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
fun showIntriAd(){
AdManager.loadInterAd(this!!, object : InterertionAdListener {
override fun onAdShow() {
Log.e("MXL","onshow")
}
override fun onAdError(errorMsg: String?) {
......@@ -112,7 +112,7 @@ class RightsDetailActivity : BaseActivity(), RightsDetailContract.View, RightsPa
}
override fun onAdClose() {
Log.e("MXL","onAdClose")
}
})
......
......@@ -160,8 +160,9 @@ object CSJAdManager {
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
val adSlot = AdSlot.Builder()
.setCodeId(entity.codeId) //此次加载广告的用途是实时加载,当用来作为缓存时,请使用:TTAdLoadType.PRELOAD
// .setCodeId("949814576") //此次加载广告的用途是实时加载,当用来作为缓存时,请使用:TTAdLoadType.PRELOAD
//.setCodeId("949814576") //此次加载广告的用途是实时加载,当用来作为缓存时,请使用:TTAdLoadType.PRELOAD
.setAdLoadType(TTAdLoadType.LOAD)
// .setExpressViewAcceptedSize(200f,200f)
.build()
mTTAdNative?.loadFullScreenVideoAd(adSlot, object : TTAdNative.FullScreenVideoAdListener {
override fun onError(p0: Int, p1: String?) {
......@@ -195,7 +196,11 @@ object CSJAdManager {
//该方法直接展示广告
//mttFullVideoAd.showFullScreenVideoAd(FullScreenVideoActivity.this);
innterstitialAd?.showFullScreenVideoAd(context,TTAdConstant.RitScenes.GAME_GIFT_BONUS, null)
innterstitialAd?.showFullScreenVideoAd(
context,
TTAdConstant.RitScenes.GAME_GIFT_BONUS,
null
)
innterstitialAd = null
innterstitialAd?.setFullScreenVideoAdInteractionListener(object :
TTFullScreenVideoAd.FullScreenVideoAdInteractionListener {
......@@ -219,18 +224,6 @@ object CSJAdManager {
override fun onSkippedVideo() {
}
// override fun onAdClicked() {
//
// }
//
// override fun onAdShow() {
//
// }
//
// override fun onAdDismiss() {
//
// }
})
......@@ -244,8 +237,8 @@ object CSJAdManager {
fun loadRewardVideoAd(context: Context, entity: NewsEntity, loadCallBack: AdLoadCallBack) {
mTTAdNative = TTAdManagerHolder.get().createAdNative(context)
var adSlot = AdSlot.Builder()
.setCodeId(entity.codeId)
// .setCodeId("901121365")
// .setCodeId(entity.codeId)
.setCodeId("950070471")
.setExpressViewAcceptedSize(500f, 500f)
.setOrientation(TTAdConstant.VERTICAL) //必填参数,期望视频的播放方向:TTAdConstant.HORIZONTAL 或 TTAdConstant.VERTICAL
.setAdLoadType(TTAdLoadType.UNKNOWN)//推荐使用,用于标注此次的广告请求用途为预加载(当做缓存)还是实时加载,方便后续为开发者优化相关策略
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment