Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
O
Out
Project
Project
Details
Activity
Releases
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
xjl
Out
Commits
a24094c8
Commit
a24094c8
authored
Jan 04, 2024
by
xujialang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加播放失败监听回调
parent
f8306a2f
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
38 additions
and
12 deletions
+38
-12
AdManagerV2.java
app/src/main/java/com/zl/sdk/ad/AdManagerV2.java
+14
-1
OnInAdListener.java
app/src/main/java/com/zl/sdk/ad/OnInAdListener.java
+11
-9
DxActivity.java
app/src/main/java/com/zl/sdk/out/ui/DxActivity.java
+13
-2
No files found.
app/src/main/java/com/zl/sdk/ad/AdManagerV2.java
View file @
a24094c8
...
...
@@ -19,6 +19,8 @@ import java.util.Date;
public
class
AdManagerV2
implements
ATInterstitialListener
{
private
volatile
ATInterstitial
atInterstitial
=
null
;
private
OnInAdListener
mListener
=
null
;
private
int
reloadCount
=
3
;
private
String
adId
=
""
;
...
...
@@ -112,6 +114,14 @@ public class AdManagerV2 implements ATInterstitialListener {
@Override
public
void
onInterstitialAdVideoError
(
AdError
adError
)
{
LogUtil
.
d
(
"OutShow"
,
"Topon: ad video error"
);
String
builder
=
"error info : code="
+
adError
.
getCode
()
+
" msg="
+
adError
.
getDesc
()
+
" all="
+
adError
.
getFullErrorInfo
();
EventUtils
.
statDisplayFail
(
getReportBean
(
null
,
builder
));
if
(
mListener
!=
null
)
{
mListener
.
showFail
();
}
}
public
boolean
loadAd
(
String
id
)
{
...
...
@@ -142,8 +152,11 @@ public class AdManagerV2 implements ATInterstitialListener {
return
true
;
}
public
void
showAd
(
Activity
activity
)
{
public
void
showAd
(
Activity
activity
,
OnInAdListener
listener
)
{
LogUtil
.
d
(
"OutShow"
,
"Topon: showAd"
);
mListener
=
listener
;
ATInterstitial
.
entryAdScenario
(
"111"
,
""
);
atInterstitial
.
show
(
activity
);
}
...
...
app/src/main/java/com/zl/sdk/ad/OnInAdListener.java
View file @
a24094c8
package
com
.
zl
.
sdk
.
ad
;
public
interface
OnInAdListener
{
void
onCloseAd
();
void
onLoadAd
();
//
void onCloseAd();
//
//
void onLoadAd();
//
void
onShow
();
//
// void onNotAd(String errorMessage);
//
// void onClk();
//
// void cacheDataTimeOut();
void
onNotAd
(
String
errorMessage
);
void
onClk
();
void
cacheDataTimeOut
();
void
showFail
();
}
app/src/main/java/com/zl/sdk/out/ui/DxActivity.java
View file @
a24094c8
...
...
@@ -12,6 +12,7 @@ import android.widget.FrameLayout;
import
com.zl.sdk.OutHelp
;
import
com.zl.sdk.ad.AdManagerV2
;
import
com.zl.sdk.ad.OnInAdListener
;
import
com.zl.sdk.event.EventUtils
;
import
com.zl.sdk.event.statistics.Statistics
;
import
com.zl.sdk.icon.IconHelp
;
...
...
@@ -69,7 +70,7 @@ public class DxActivity extends BaseActivity {
execute
();
hadStart
=
true
;
}
},
500
);
},
500
);
}
@Override
...
...
@@ -146,6 +147,16 @@ public class DxActivity extends BaseActivity {
onceStayTime
=
System
.
currentTimeMillis
();
AdManagerV2
.
get
().
showAd
(
activity
);
AdManagerV2
.
get
().
showAd
(
activity
,
new
OnInAdListener
()
{
@Override
public
void
onShow
()
{
}
@Override
public
void
showFail
()
{
close
();
}
});
}
}
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