Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
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
android
android_goodmoney
Commits
f977ef6b
Commit
f977ef6b
authored
Jan 15, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
穿山甲全屏广告提交
parent
c578f556
Changes
10
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
267 additions
and
182 deletions
+267
-182
CsjFullVedioAdManager.java
...a/com/mints/goodmoney/ad/vedio/CsjFullVedioAdManager.java
+167
-170
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/vedio/VedioAdingManager.java
+55
-2
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+4
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+1
-0
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+1
-1
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+5
-0
VedioRulesBean.java
...in/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
+18
-0
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+3
-3
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+5
-3
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+8
-3
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/CsjFullVedioAdManager.java
View file @
f977ef6b
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/vedio/VedioAdingManager.java
View file @
f977ef6b
...
...
@@ -28,11 +28,13 @@ public class VedioAdingManager {
private
CsjVedioAdManager
csjVedioAdManager
;
private
YlhVedioAdManager
ylhVedioAdManager
;
private
MhVedioAdManager
mhVedioAdManager
;
private
CsjFullVedioAdManager
csjFullVedioAdManager
;
private
int
wnWeight
;
private
int
ylhWeight
;
private
int
csjVedioWeight
;
private
int
flVedioWeight
;
private
int
csjFullVedioWeight
;
private
ArrayList
<
WeightBean
>
weightList
;
// 是否是高额视频任务
...
...
@@ -65,17 +67,20 @@ public class VedioAdingManager {
ylhVedioAdManager
=
YlhVedioAdManager
.
getInstance
(
activity
);
wnVedioAdManager
=
WnVedioAdManager
.
Companion
.
getInstance
(
activity
);
mhVedioAdManager
=
MhVedioAdManager
.
Companion
.
getInstance
(
activity
);
csjFullVedioAdManager
=
CsjFullVedioAdManager
.
getInstance
(
activity
);
weightList
=
new
ArrayList
<>();
}
/**
* 初始化广告权重
*/
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
wnWeight
,
int
flVedioWeight
)
{
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
wnWeight
,
int
flVedioWeight
,
int
csjFullVedioWeight
)
{
this
.
csjVedioWeight
=
csjVedioWeight
;
this
.
ylhWeight
=
ylhWeight
;
this
.
wnWeight
=
wnWeight
;
this
.
flVedioWeight
=
flVedioWeight
;
this
.
csjFullVedioWeight
=
csjFullVedioWeight
;
}
/**
...
...
@@ -144,6 +149,8 @@ public class VedioAdingManager {
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
}
else
if
(
AppConfig
.
ylhAdCount
>
0
)
{
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
}
else
if
(
AppConfig
.
csjFullVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_FULL_AD
;
}
else
{
nextAdType
=
Constant
.
FL_VEDIO_AD
;
}
...
...
@@ -206,6 +213,11 @@ public class VedioAdingManager {
weight
=
weight
+
ylhWeight
;
LogUtil
.
d
(
TAG
,
"权重值:ylhWeight:"
+
ylhWeight
);
}
if
(
AppConfig
.
csjFullVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
csjFullVedioWeight
,
Constant
.
CSJ_FULL_AD
));
weight
=
weight
+
csjFullVedioWeight
;
LogUtil
.
d
(
TAG
,
"权重值:csjFullVedioWeight:"
+
csjFullVedioWeight
);
}
if
(
AppConfig
.
flVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
flVedioWeight
,
Constant
.
FL_VEDIO_AD
));
weight
=
weight
+
flVedioWeight
;
...
...
@@ -254,8 +266,10 @@ public class VedioAdingManager {
int
ylhAdCount
=
AppConfig
.
ylhAdCount
;
int
wnAdCount
=
AppConfig
.
wnVedioAdCount
;
int
flVedioAdCount
=
AppConfig
.
flVedioAdCount
;
int
csjFullVedioAdCount
=
AppConfig
.
csjFullVedioAdCount
;
if
(
ylhAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
wnAdCount
<=
0
&&
flVedioAdCount
<=
0
)
{
if
(
ylhAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
wnAdCount
<=
0
&&
flVedioAdCount
<=
0
&&
csjFullVedioAdCount
<=
0
)
{
// showToast("今日视频已看完,请明天再来吧");
return
true
;
}
...
...
@@ -286,6 +300,11 @@ public class VedioAdingManager {
mhVedioAdManager
.
onDestory
();
mhVedioAdManager
=
null
;
}
if
(
csjFullVedioAdManager
!=
null
)
{
csjFullVedioAdManager
.
setCsjFullVedioAdListener
(
null
);
csjFullVedioAdManager
.
onDestory
();
csjFullVedioAdManager
=
null
;
}
activity
=
null
;
}
...
...
@@ -449,6 +468,40 @@ public class VedioAdingManager {
});
mhVedioAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
CSJ_FULL_AD
))
{
// 穿山甲全屏视频
if
(
csjFullVedioAdManager
==
null
)
{
if
(
activity
==
null
)
{
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerError
(
Constant
.
CSJ_FULL_AD
);
}
return
;
}
csjFullVedioAdManager
=
CsjFullVedioAdManager
.
getInstance
(
activity
);
}
csjFullVedioAdManager
.
setCsjFullVedioAdListener
(
new
CsjFullVedioAdManager
.
CsjFullVedioAdListener
()
{
@Override
public
void
csjFullVedioAdFail
()
{
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerFail
(
Constant
.
CSJ_FULL_AD
);
}
}
@Override
public
void
csjFullVedioAdSuccess
()
{
AppConfig
.
csjFullVedioAdCount
--;
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerSuccess
(
Constant
.
CSJ_FULL_AD
);
}
}
@Override
public
void
csjFullVedioDownload
()
{
isVedioAdDownload
=
true
;
}
});
csjFullVedioAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
f977ef6b
...
...
@@ -75,6 +75,10 @@ public class AppConfig {
* flVedio 剩余广告播放数
*/
public
static
int
flVedioAdCount
=
5
;
/**
* csjFull 剩余广告播放数
*/
public
static
int
csjFullVedioAdCount
=
5
;
/**
* 高额试玩任务标识
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
f977ef6b
...
...
@@ -159,6 +159,7 @@ object Constant {
const
val
YLH_VEDIO_AD
=
"YLH_VEDIO_AD"
const
val
SDHZ_VEDIO_AD
=
"SDHZ_VEDIO_AD"
const
val
FL_VEDIO_AD
=
"Fl_VEDIO_AD"
const
val
CSJ_FULL_AD
=
"CSJFULL_VEDIO_AD"
// 游戏类型
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
f977ef6b
...
...
@@ -41,7 +41,7 @@ public class TtCsjAdManager {
public
static
String
TT_AD_VEDIO_HOMEVEDIO
=
"945744137"
;
// 首页视频翻倍
public
static
String
TT_AD_VEDIO_SMALLHOMEVEDIO
=
"945744186"
;
// 短视频翻倍
/*全屏视频*/
public
static
String
TT_AD_FULLVEDIO_ALL
=
""
;
// 通用
public
static
String
TT_AD_FULLVEDIO_ALL
=
"
945752969
"
;
// 通用
/*信息流*/
public
static
String
TT_AD_NATIVEEXPRESS_XMLY
=
"945700753"
;
//喜马拉雅信息流
public
static
String
TT_AD_NATIVEEXPRESS_AWARD
=
"945562047"
;
//信息流弹窗
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
f977ef6b
...
...
@@ -81,6 +81,7 @@ public class DrawcashBean implements Serializable {
public
class
VedioRules
implements
Serializable
{
private
int
SDHZ_VEDIO
;
private
int
CSJFULL_VEDIO
;
private
int
CSJ_VEDIO
;
private
int
YLH_VEDIO
;
private
int
FL_VEDIO
;
...
...
@@ -89,6 +90,10 @@ public class DrawcashBean implements Serializable {
return
SDHZ_VEDIO
;
}
public
int
getCSJFULL_VEDIO
()
{
return
CSJFULL_VEDIO
;
}
public
int
getCSJ_VEDIO
()
{
return
CSJ_VEDIO
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
View file @
f977ef6b
...
...
@@ -8,6 +8,7 @@ public class VedioRulesBean implements Serializable {
private
YlhVedioBean
YLH_VEDIO
;
private
SdhzVedioBean
SDHZ_VEDIO
;
private
FLVedioBean
FL_VEDIO
;
private
CsjfullVedioBean
CSJFULL_VEDIO
;
private
boolean
flVideoFlag
;
public
class
CsjVedioBean
implements
Serializable
{
...
...
@@ -62,6 +63,19 @@ public class VedioRulesBean implements Serializable {
}
}
public
class
CsjfullVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
public
int
getSurplus
()
{
return
surplus
;
}
public
int
getRate
()
{
return
rate
;
}
}
public
FLVedioBean
getFL_VEDIO
()
{
return
FL_VEDIO
;
}
...
...
@@ -78,6 +92,10 @@ public class VedioRulesBean implements Serializable {
return
SDHZ_VEDIO
;
}
public
CsjfullVedioBean
getCSJFULL_VEDIO
()
{
return
CSJFULL_VEDIO
;
}
public
boolean
isFlVideoFlag
()
{
return
flVideoFlag
;
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
f977ef6b
...
...
@@ -299,14 +299,14 @@ class DrawcashActivity : BaseActivity(),
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
DrawcashBean
.
VedioRules
)
{
vedioAdingManager
.
initAdWeight
(
data
.
csJ_VEDIO
,
data
.
ylH_VEDIO
,
data
.
sdhZ_VEDIO
,
data
.
fL_VEDIO
)
// vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO} flWeight:${data.fL_VEDIO}"
)
vedioAdingManager
.
initAdWeight
(
data
.
csJ_VEDIO
,
data
.
ylH_VEDIO
,
data
.
sdhZ_VEDIO
,
data
.
fL_VEDIO
,
data
.
csjfulL_VEDIO
)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO} flWeight:${data.fL_VEDIO} csjfullWeight:${data.csjfulL_VEDIO}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
10
AppConfig
.
ylhAdCount
=
10
AppConfig
.
wnVedioAdCount
=
10
AppConfig
.
flVedioAdCount
=
10
AppConfig
.
csjFullVedioAdCount
=
10
}
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
f977ef6b
...
...
@@ -565,16 +565,18 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
+
" sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
" sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}
csjfulLWeight:${data.vedioRules.csjfulL_VEDIO.rate}
"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
csjFullVedioAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
+
" sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
" sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}
csjfullCount:${AppConfig.csjFullVedioAdCount}
"
)
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
f977ef6b
...
...
@@ -18,6 +18,7 @@ import com.mints.goodmoney.R
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.vedio.CsjFullVedioAdManager
import
com.mints.goodmoney.ad.vedio.VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
...
...
@@ -1046,14 +1047,18 @@ class MyFragment : BaseFragment(),
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
vedioAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate} sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
+
" sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate} csjfulLWeight:${data.vedioRules.csjfulL_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
AppConfig
.
csjFullVedioAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
+
" sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount} csjfullCount:${AppConfig.csjFullVedioAdCount}"
)
}
/**
...
...
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