Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
X
xxsq
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
王雪伟
xxsq
Commits
abaab1b6
Commit
abaab1b6
authored
Sep 23, 2022
by
maxiaoliang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
盲盒
parent
c1beff49
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
19 deletions
+8
-19
CSJAdManager.kt
...ZxAd/src/main/java/com/zx/ad/platform/csj/CSJAdManager.kt
+7
-18
TTAdManagerHolder.java
...c/main/java/com/zx/ad/platform/csj/TTAdManagerHolder.java
+1
-1
No files found.
moduleZxAd/src/main/java/com/zx/ad/platform/csj/CSJAdManager.kt
View file @
abaab1b6
...
...
@@ -34,8 +34,8 @@ object CSJAdManager {
}
fun
adInit
(
context
:
Context
,
appId
:
String
,
initCallback
:
TTAdSdk
.
InitCallback
?)
{
TTAdManagerHolder
.
init
(
context
,
appId
,
initCallback
)
//
TTAdManagerHolder.init(context, "5335826", initCallback)
//
TTAdManagerHolder.init(context, appId, initCallback)
TTAdManagerHolder
.
init
(
context
,
"5335826"
,
initCallback
)
}
private
var
splashAd
:
TTSplashAd
?
=
null
...
...
@@ -156,11 +156,11 @@ object CSJAdManager {
// // .setExpressViewAcceptedSize(300f, 300f) //期望模板广告view的size,单位dp
// .setAdLoadType(TTAdLoadType.LOAD) //推荐使用,用于标注此次的广告请求用途为预加载(当做缓存)还是实时加载,方便后续为开发者优化相关策略
// .build()
//step4:创建广告请求参数AdSlot,具体参数含义参考文档
val
adSlot
=
AdSlot
.
Builder
()
.
setCodeId
(
entity
.
codeId
)
//此次加载广告的用途是实时加载,当用来作为缓存时,请使用:TTAdLoadType.PRELOAD
// .setCodeId("949814576") //此次加载广告的用途是实时加载,当用来作为缓存时,请使用:TTAdLoadType.PRELOAD
//.setCodeId(entity.codeId)
.
setCodeId
(
"949817040"
)
// .setImageAcceptedSize(1080, 1920)
// .setExpressViewAcceptedSize(350f,300f)
.
setAdLoadType
(
TTAdLoadType
.
LOAD
)
.
build
()
mTTAdNative
?.
loadFullScreenVideoAd
(
adSlot
,
object
:
TTAdNative
.
FullScreenVideoAdListener
{
...
...
@@ -195,7 +195,7 @@ object CSJAdManager {
//该方法直接展示广告
//mttFullVideoAd.showFullScreenVideoAd(FullScreenVideoActivity.this);
innterstitialAd
?.
showFullScreenVideoAd
(
context
,
TTAdConstant
.
RitScenes
.
GAME_GIFT_BONUS
,
null
)
innterstitialAd
?.
showFullScreenVideoAd
(
context
)
innterstitialAd
=
null
innterstitialAd
?.
setFullScreenVideoAdInteractionListener
(
object
:
TTFullScreenVideoAd
.
FullScreenVideoAdInteractionListener
{
...
...
@@ -219,17 +219,6 @@ object CSJAdManager {
override
fun
onSkippedVideo
()
{
}
// override fun onAdClicked() {
//
// }
//
// override fun onAdShow() {
//
// }
//
// override fun onAdDismiss() {
//
// }
})
...
...
moduleZxAd/src/main/java/com/zx/ad/platform/csj/TTAdManagerHolder.java
View file @
abaab1b6
...
...
@@ -70,7 +70,7 @@ public class TTAdManagerHolder {
private
static
TTAdConfig
buildConfig
(
Context
context
,
String
appId
)
{
return
new
TTAdConfig
.
Builder
()
.
appId
(
appId
)
.
appId
(
"5335826"
)
.
useTextureView
(
true
)
//使用TextureView控件播放视频,默认为SurfaceView,当有SurfaceView冲突的场景,可以使用TextureView
.
allowShowNotify
(
true
)
//是否允许sdk展示通知栏提示
.
debug
(
false
)
//测试阶段打开,可以通过日志排查问题,上线时去除该调用
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment