Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold_pro
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_highgold_pro
Commits
2ac1e17c
Commit
2ac1e17c
authored
May 19, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
超级翻倍及高额任务权重优化
parent
48f7cd88
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
69 additions
and
40 deletions
+69
-40
VideoAdingManager.java
.../java/com/mints/goldspace/ad/video/VideoAdingManager.java
+12
-29
AppConfig.java
app/src/main/java/com/mints/goldspace/common/AppConfig.java
+15
-0
UserTaskMsgBean.java
...n/java/com/mints/goldspace/mvp/model/UserTaskMsgBean.java
+27
-0
AwardActivity.kt
...in/java/com/mints/goldspace/ui/activitys/AwardActivity.kt
+1
-0
MainFragment.kt
...main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
+7
-0
MyFragment.kt
...c/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
+7
-11
No files found.
app/src/main/java/com/mints/goldspace/ad/video/VideoAdingManager.java
View file @
2ac1e17c
...
...
@@ -52,11 +52,6 @@ public class VideoAdingManager {
private
int
ksVideoWeight
;
private
int
owVideoWeight
;
// 高额任务权重
private
int
csjHighVideoWeight
;
private
int
ksHighVideoWeight
;
private
int
ylhHighVideoWeight
;
private
ArrayList
<
WeightBean
>
weightList
;
// 是否是高额视频任务
...
...
@@ -159,18 +154,6 @@ public class VideoAdingManager {
this
.
owVideoWeight
=
owVideoWeight
;
}
/**
* 初始化高额任务广告权重
*/
public
void
initHighAdWeight
(
int
csjVideoWeight
,
int
ylhWeight
,
int
ksVideoWeight
)
{
this
.
csjHighVideoWeight
=
csjVideoWeight
;
this
.
ylhHighVideoWeight
=
ylhWeight
;
this
.
ksHighVideoWeight
=
ksVideoWeight
;
}
/**
* 根据类型加载对应视频(第一次加载)
*
...
...
@@ -265,24 +248,24 @@ public class VideoAdingManager {
}
// 穿山甲
if
(
csjHighVideoWeigh
t
>
0
)
{
weightList
.
add
(
new
WeightBean
(
csjHighVideoWeigh
t
,
Constant
.
CSJ_VEDIO_AD
));
weight
=
weight
+
csjHighVideoWeigh
t
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:csjVideoWeight:"
+
csjHighVideoWeigh
t
);
if
(
AppConfig
.
csjHighVideoAdCoun
t
>
0
)
{
weightList
.
add
(
new
WeightBean
(
AppConfig
.
csjHighVideoAdCoun
t
,
Constant
.
CSJ_VEDIO_AD
));
weight
=
weight
+
AppConfig
.
csjHighVideoAdCoun
t
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:csjVideoWeight:"
+
AppConfig
.
csjHighVideoAdCoun
t
);
}
// 优量汇
if
(
ylhHighVideoWeigh
t
>
0
)
{
weightList
.
add
(
new
WeightBean
(
ylhHighVideoWeigh
t
,
Constant
.
YLH_VEDIO_AD
));
weight
=
weight
+
ylhHighVideoWeigh
t
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ylhVideoWeight:"
+
ylhHighVideoWeigh
t
);
if
(
AppConfig
.
ylhHighVideoAdCoun
t
>
0
)
{
weightList
.
add
(
new
WeightBean
(
AppConfig
.
ylhHighVideoAdCoun
t
,
Constant
.
YLH_VEDIO_AD
));
weight
=
weight
+
AppConfig
.
ylhHighVideoAdCoun
t
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ylhVideoWeight:"
+
AppConfig
.
ylhHighVideoAdCoun
t
);
}
// 快手
if
(
ksHighVideoWeigh
t
>
0
)
{
weightList
.
add
(
new
WeightBean
(
ksHighVideoWeigh
t
,
Constant
.
KS_VEDIO_AD
));
weight
=
weight
+
ksHighVideoWeigh
t
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ksVideoWeight:"
+
ksHighVideoWeigh
t
);
if
(
AppConfig
.
ksHighVideoAdCoun
t
>
0
)
{
weightList
.
add
(
new
WeightBean
(
AppConfig
.
ksHighVideoAdCoun
t
,
Constant
.
KS_VEDIO_AD
));
weight
=
weight
+
AppConfig
.
ksHighVideoAdCoun
t
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ksVideoWeight:"
+
AppConfig
.
ksHighVideoAdCoun
t
);
}
// 权重随机
...
...
app/src/main/java/com/mints/goldspace/common/AppConfig.java
View file @
2ac1e17c
...
...
@@ -97,6 +97,21 @@ public class AppConfig {
*/
public
static
int
owVideoAdCount
=
0
;
/**
* 高额任务和超级翻倍 csjVideo 剩余广告播放数
*/
public
static
int
csjHighVideoAdCount
=
0
;
/**
* 高额任务和超级翻倍 ylhVideo 剩余广告播放数
*/
public
static
int
ylhHighVideoAdCount
=
0
;
/**
* 高额任务和超级翻倍 ksVideo 剩余广告播放数
*/
public
static
int
ksHighVideoAdCount
=
0
;
/**
* 高额试玩任务标识
*/
...
...
app/src/main/java/com/mints/goldspace/mvp/model/UserTaskMsgBean.java
View file @
2ac1e17c
...
...
@@ -12,6 +12,7 @@ public class UserTaskMsgBean implements Serializable {
private
UserRiskAppsBean
userRiskApps
;
private
AdcodeBean
adcode_v1
=
null
;
private
FlowAdRulesBean
flowAdRules
;
private
HighRatePlanBean
highRatePlan
;
private
String
ip
;
private
String
channel
;
...
...
@@ -124,4 +125,30 @@ public class UserTaskMsgBean implements Serializable {
public
FlowAdRulesBean
getFlowAdRules
()
{
return
flowAdRules
;
}
public
HighRatePlanBean
getHighRatePlan
()
{
return
highRatePlan
;
}
public
void
setHighRatePlan
(
HighRatePlanBean
highRatePlan
)
{
this
.
highRatePlan
=
highRatePlan
;
}
public
static
class
HighRatePlanBean
implements
Serializable
{
private
int
YLH
;
private
int
KS
;
private
int
CSJ
;
public
int
getYLH
()
{
return
YLH
;
}
public
int
getKS
()
{
return
KS
;
}
public
int
getCSJ
()
{
return
CSJ
;
}
}
}
app/src/main/java/com/mints/goldspace/ui/activitys/AwardActivity.kt
View file @
2ac1e17c
...
...
@@ -423,6 +423,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 是否开启应用使用情况权限
if
(
AppUtil
.
isOpenUsageStats
())
{
registerBroad
()
videoAdingManager
.
setIsHighWeight
(
true
)
awardVideo
()
}
else
{
AppTryPlayManager
.
openAppUsageStats
(
this
)
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MainFragment.kt
View file @
2ac1e17c
...
...
@@ -214,6 +214,13 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
userMsgBean
=
data
// 高额任务及超级翻倍次数
if
(
data
.
flowAdRules
!=
null
)
{
AppConfig
.
csjHighVideoAdCount
=
data
.
highRatePlan
.
csj
AppConfig
.
ylhHighVideoAdCount
=
data
.
highRatePlan
.
ylh
AppConfig
.
ksHighVideoAdCount
=
data
.
highRatePlan
.
ks
}
if
(
userMsgBean
?.
shareNews
!=
null
)
{
AppConfig
.
wzReadCoin
=
userMsgBean
!!
.
shareNews
.
readCoin
}
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
View file @
2ac1e17c
package
com.mints.goldspace.ui.fragment
import
android.Manifest
import
android.annotation.SuppressLint
import
android.content.*
import
android.os.Bundle
...
...
@@ -15,7 +14,6 @@ import androidx.recyclerview.widget.DividerItemDecoration
import
androidx.viewpager.widget.ViewPager
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.mints.goldspace.BuildConfig
import
com.mints.goldspace.MintsApplication
import
com.mints.goldspace.R
import
com.mints.goldspace.ad.banner.BannerManager
import
com.mints.goldspace.ad.express.PreLoadExpressManager
...
...
@@ -24,7 +22,6 @@ import com.mints.goldspace.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goldspace.ad.video.VideoAdingManager
import
com.mints.goldspace.common.AppConfig
import
com.mints.goldspace.common.Constant
import
com.mints.goldspace.common.DeviceInfo
import
com.mints.goldspace.manager.*
import
com.mints.goldspace.mvp.model.*
import
com.mints.goldspace.mvp.presenters.MyPresenter
...
...
@@ -44,13 +41,10 @@ import com.mints.goldspace.utils.*
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.GlideUtils
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.rd.animation.type.AnimationType
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.snail.antifake.jni.EmulatorDetectUtil
import
com.tbruyelle.rxpermissions.RxPermissions
import
kotlinx.android.synthetic.main.fragment_main_my.*
import
kotlinx.android.synthetic.main.header_layout.*
import
kotlinx.android.synthetic.main.item_fragment_main_my_clock.*
...
...
@@ -312,6 +306,13 @@ class MyFragment : BaseFragment(),
AppConfig
.
wzReadCoin
=
data
.
shareNews
.
readCoin
}
// 高额任务及超级翻倍次数
if
(
data
.
flowAdRules
!=
null
)
{
AppConfig
.
csjHighVideoAdCount
=
data
.
highRatePlan
.
csj
AppConfig
.
ylhHighVideoAdCount
=
data
.
highRatePlan
.
ylh
AppConfig
.
ksHighVideoAdCount
=
data
.
highRatePlan
.
ks
}
// 更新权重
UserWeight
.
initAdWeight
(
data
)
...
...
@@ -1327,11 +1328,6 @@ class MyFragment : BaseFragment(),
carrierType
=
Constant
.
CARRIER_HIGH_ACTIVITY
vedioAdingManager
.
setIsHighWeight
(
true
)
vedioAdingManager
.
initHighAdWeight
(
taskBean
.
otherConfig
.
ratePlan
.
csj
,
taskBean
.
otherConfig
.
ratePlan
.
ylh
,
taskBean
.
otherConfig
.
ratePlan
.
ks
)
awardVedio
(
taskBean
.
otherConfig
.
coin
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
// 注册高额任务广播监听
...
...
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