Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Sign in / Register
Toggle navigation
L
LuckyFarm
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
王雪伟
LuckyFarm
Commits
1b861e2e
Commit
1b861e2e
authored
Oct 28, 2020
by
wangxuewei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[提交人]:王雪伟
[提交简述] :幸福农场 [实现方案] :luckyfarm_1.0.5
parent
1602490b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
76 additions
and
28 deletions
+76
-28
version.properties
app/version.properties
+2
-2
XiaoManActivity.kt
.../src/main/java/com/ym/library/activity/XiaoManActivity.kt
+74
-26
No files found.
app/version.properties
View file @
1b861e2e
PACKAGE_NAME
=
com.ym.xync
PACKAGE_NAME
=
com.ym.xync
VERSION_CODE
=
5
VERSION_CODE
=
6
VERSION_NAME
=
1.0.4
VERSION_NAME
=
1.0.5
\ No newline at end of file
\ No newline at end of file
library/src/main/java/com/ym/library/activity/XiaoManActivity.kt
View file @
1b861e2e
...
@@ -149,32 +149,80 @@ class XiaoManActivity : BaseActivity() {
...
@@ -149,32 +149,80 @@ class XiaoManActivity : BaseActivity() {
*/
*/
fun
showGDTAd
(
appID
:
String
,
pId
:
String
,
requestId
:
String
)
{
fun
showGDTAd
(
appID
:
String
,
pId
:
String
,
requestId
:
String
)
{
GDTADManager
.
getInstance
().
initWith
(
this
@XiaoManActivity
,
requestId
)
GDTADManager
.
getInstance
().
initWith
(
this
@XiaoManActivity
,
requestId
)
rewardVideoAD
=
RewardVideoAD
(
this
,
appID
,
pId
,
object
:
RewardVideoADListener
{
// rewardVideoAD = RewardVideoAD(this, appID, pId, object : RewardVideoADListener {
override
fun
onADLoad
()
{
// override fun onADLoad() {
if
(
rewardVideoAD
!=
null
)
rewardVideoAD
?.
showAD
()
// if (rewardVideoAD != null) rewardVideoAD?.showAD()
campaignFragment
?.
setVideoLoad
(
requestId
)
// campaignFragment?.setVideoLoad(requestId)
}
// }
override
fun
onVideoCached
()
{}
// override fun onVideoCached() {}
override
fun
onADShow
()
{
// override fun onADShow() {
EventUtils
.
onEvent
(
"XIAO_MAN_GDT_SHOW"
,
"小满广点通广告展示"
)
// EventUtils.onEvent("XIAO_MAN_GDT_SHOW","小满广点通广告展示")
// }
// override fun onADExpose() {}
// override fun onReward() {}
// override fun onADClick() {
// EventUtils.onEvent("XIAO_MAN_GDT_CLICK","小满广点通广告点击")
// }
// override fun onVideoComplete() {
// campaignFragment?.setVideoComplete(requestId)
// }
// override fun onADClose() {
// EventUtils.onEvent("XIAO_MAN_GDT_CLOSE_CLICK","小满广点通广告关闭点击")
// campaignFragment?.setVideoClose(requestId)
// }
// override fun onError(adError: AdError) {
// campaignFragment?.setVideoError(requestId)
// }
// })
// rewardVideoAD?.loadAD()
var
rewardVideoAD
=
RewardVideoAD
(
this
,
pId
,
object
:
RewardVideoADListener
{
override
fun
onADExpose
()
{
// listener.onAdShow()
}
}
override
fun
onADExpose
()
{}
override
fun
onReward
()
{}
override
fun
onADClick
()
{
override
fun
onADClick
()
{
EventUtils
.
onEvent
(
"XIAO_MAN_GDT_CLICK"
,
"小满广点通广告点击"
)
EventUtils
.
onEvent
(
"XIAO_MAN_GDT_CLICK"
,
"小满广点通广告点击"
)
}
}
override
fun
onVideoComplete
()
{
campaignFragment
?.
setVideoComplete
(
requestId
)
override
fun
onVideoCached
()
{
}
}
override
fun
onReward
()
{
}
override
fun
onADClose
()
{
override
fun
onADClose
()
{
EventUtils
.
onEvent
(
"XIAO_MAN_GDT_CLOSE_CLICK"
,
"小满广点通广告关闭点击"
)
EventUtils
.
onEvent
(
"XIAO_MAN_GDT_CLOSE_CLICK"
,
"小满广点通广告关闭点击"
)
campaignFragment
?.
setVideoClose
(
requestId
)
campaignFragment
?.
setVideoClose
(
requestId
)
}
}
override
fun
onError
(
adError
:
AdError
)
{
//如果这里
override
fun
onADLoad
()
{
if
(
rewardVideoAD
!=
null
)
rewardVideoAD
?.
showAD
()
campaignFragment
?.
setVideoLoad
(
requestId
)
}
override
fun
onVideoComplete
()
{
campaignFragment
?.
setVideoComplete
(
requestId
)
}
override
fun
onError
(
p0
:
AdError
?)
{
campaignFragment
?.
setVideoError
(
requestId
)
campaignFragment
?.
setVideoError
(
requestId
)
}
}
})
rewardVideoAD
?.
loadAD
()
override
fun
onADShow
()
{
EventUtils
.
onEvent
(
"XIAO_MAN_GDT_SHOW"
,
"小满广点通广告展示"
)
}
})
// 有声播放
rewardVideoAD
.
loadAD
()
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
...
...
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