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
3ad2018f
Commit
3ad2018f
authored
May 18, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
高额任务修改百分比显示
parent
71861b14
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
111 additions
and
21 deletions
+111
-21
build.gradle
app/build.gradle
+1
-2
VideoAdingManager.java
.../java/com/mints/goldspace/ad/video/VideoAdingManager.java
+57
-13
KsManager.kt
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
+2
-2
DrawcashBean.java
...main/java/com/mints/goldspace/mvp/model/DrawcashBean.java
+5
-0
MyInfo.java
app/src/main/java/com/mints/goldspace/mvp/model/MyInfo.java
+35
-0
DrawcashActivity.kt
...java/com/mints/goldspace/ui/activitys/DrawcashActivity.kt
+4
-2
MyFragment.kt
...c/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
+5
-0
gradle.properties
gradle.properties
+1
-1
local.properties
local.properties
+1
-1
No files found.
app/build.gradle
View file @
3ad2018f
...
@@ -64,8 +64,7 @@ android {
...
@@ -64,8 +64,7 @@ android {
// 不显示Log
// 不显示Log
buildConfigField
"boolean"
,
"LOG_DEBUG"
,
"true"
buildConfigField
"boolean"
,
"LOG_DEBUG"
,
"true"
buildConfigField
"String"
,
"AppKeyPre"
,
"\"abcd\""
buildConfigField
"String"
,
"AppKeyPre"
,
"\"abcd\""
// buildConfigField "String", "MainIp", DEBUG_URL
buildConfigField
"String"
,
"MainIp"
,
DEBUG_URL
buildConfigField
"String"
,
"MainIp"
,
RELEASE_URL
manifestPlaceholders
=
[
TD_SCHEMA_KEY:
DEBUG_TD_SCHEMA_KEY
,
manifestPlaceholders
=
[
TD_SCHEMA_KEY:
DEBUG_TD_SCHEMA_KEY
,
TD_KEY
:
DEBUG_TD_KEY
]
TD_KEY
:
DEBUG_TD_KEY
]
...
...
app/src/main/java/com/mints/goldspace/ad/video/VideoAdingManager.java
View file @
3ad2018f
...
@@ -7,7 +7,6 @@ import android.content.Intent;
...
@@ -7,7 +7,6 @@ import android.content.Intent;
import
android.content.IntentFilter
;
import
android.content.IntentFilter
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.mints.goldspace.MintsApplication
;
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
;
import
com.mints.goldspace.ad.video.base.VideoAdStatusListener
;
import
com.mints.goldspace.common.AppConfig
;
import
com.mints.goldspace.common.AppConfig
;
import
com.mints.goldspace.common.Constant
;
import
com.mints.goldspace.common.Constant
;
...
@@ -17,8 +16,6 @@ import com.mints.goldspace.mvp.model.WeightBean;
...
@@ -17,8 +16,6 @@ import com.mints.goldspace.mvp.model.WeightBean;
import
com.mints.goldspace.service.AppInstallService
;
import
com.mints.goldspace.service.AppInstallService
;
import
com.mints.goldspace.utils.AppUtil
;
import
com.mints.goldspace.utils.AppUtil
;
import
com.mints.goldspace.utils.LogUtil
;
import
com.mints.goldspace.utils.LogUtil
;
import
com.mints.goldspace.utils.ToastUtil
;
import
com.mints.library.utils.json.JsonUtil
;
import
java.lang.ref.WeakReference
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
...
@@ -55,11 +52,15 @@ public class VideoAdingManager {
...
@@ -55,11 +52,15 @@ public class VideoAdingManager {
private
int
ksVideoWeight
;
private
int
ksVideoWeight
;
private
int
owVideoWeight
;
private
int
owVideoWeight
;
// 高额任务权重
private
int
csjHighVideoWeight
;
private
int
ksHighVideoWeight
;
private
int
ylhHighVideoWeight
;
private
ArrayList
<
WeightBean
>
weightList
;
private
ArrayList
<
WeightBean
>
weightList
;
// 是否是高额视频任务
// 是否是高额视频任务
private
boolean
isHighWeight
=
false
;
private
boolean
isHighWeight
=
false
;
private
boolean
isTTVideoAd
=
false
;
private
Activity
activity
;
private
Activity
activity
;
private
boolean
isVideoAdDownload
=
false
;
// 是否点击广告下载 true-点击
private
boolean
isVideoAdDownload
=
false
;
// 是否点击广告下载 true-点击
...
@@ -82,7 +83,7 @@ public class VideoAdingManager {
...
@@ -82,7 +83,7 @@ public class VideoAdingManager {
/**
/**
* 初始化广告manager
* 初始化广告manager
*
*
* @param activity
* @param activity
—
*/
*/
private
void
init
(
Activity
activity
)
{
private
void
init
(
Activity
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
...
@@ -158,6 +159,18 @@ public class VideoAdingManager {
...
@@ -158,6 +159,18 @@ public class VideoAdingManager {
this
.
owVideoWeight
=
owVideoWeight
;
this
.
owVideoWeight
=
owVideoWeight
;
}
}
/**
* 初始化高额任务广告权重
*/
public
void
initHighAdWeight
(
int
csjVideoWeight
,
int
ylhWeight
,
int
ksVideoWeight
)
{
this
.
csjHighVideoWeight
=
csjVideoWeight
;
this
.
ylhHighVideoWeight
=
ylhWeight
;
this
.
ksHighVideoWeight
=
ksVideoWeight
;
}
/**
/**
* 根据类型加载对应视频(第一次加载)
* 根据类型加载对应视频(第一次加载)
*
*
...
@@ -188,7 +201,7 @@ public class VideoAdingManager {
...
@@ -188,7 +201,7 @@ public class VideoAdingManager {
/**
/**
* 根据广告优先级获取下一个
* 根据广告优先级获取下一个
* <p>
* <p>
*
*
<p>
* 穿山甲>优量汇>快手>oneway>闪电盒子>穿山甲全屏>珊瑚>枫岚(兜底)
* 穿山甲>优量汇>快手>oneway>闪电盒子>穿山甲全屏>珊瑚>枫岚(兜底)
*/
*/
private
String
getNextFailAdType
()
{
private
String
getNextFailAdType
()
{
...
@@ -243,13 +256,44 @@ public class VideoAdingManager {
...
@@ -243,13 +256,44 @@ public class VideoAdingManager {
*
*
* @return
* @return
*/
*/
p
rivate
String
getHighWeight
()
{
p
ublic
String
getHighWeight
()
{
isTTVideoAd
=
!
isTTVideoAd
;
i
f
(
isTTVideoAd
)
{
i
nt
weight
=
0
;
return
Constant
.
CSJ_VEDIO_AD
;
}
else
{
if
(
weightList
!=
null
)
{
return
Constant
.
YLH_VEDIO_AD
;
weightList
.
clear
()
;
}
}
// 穿山甲
weightList
.
add
(
new
WeightBean
(
csjHighVideoWeight
,
Constant
.
CSJ_VEDIO_AD
));
weight
=
weight
+
csjHighVideoWeight
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:csjVideoWeight:"
+
csjHighVideoWeight
);
// 优量汇
weightList
.
add
(
new
WeightBean
(
ylhHighVideoWeight
,
Constant
.
YLH_VEDIO_AD
));
weight
=
weight
+
ylhHighVideoWeight
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ylhVideoWeight:"
+
ylhHighVideoWeight
);
// 快手
weightList
.
add
(
new
WeightBean
(
ksHighVideoWeight
,
Constant
.
KS_VEDIO_AD
));
weight
=
weight
+
ksHighVideoWeight
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ksVideoWeight:"
+
ksHighVideoWeight
);
// 权重随机
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
&&
weight
>
0
)
{
LogUtil
.
d
(
TAG
,
"高额任务 -> 1、权重总值:"
+
weight
);
Random
r
=
new
Random
();
int
randomWeight
=
r
.
nextInt
(
weight
)
+
1
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 2、权重随机值:"
+
randomWeight
);
for
(
WeightBean
weightBean
:
weightList
)
{
randomWeight
-=
weightBean
.
getWeight
();
if
(
randomWeight
<=
0
)
{
LogUtil
.
d
(
TAG
,
"高额任务 -> 3、权重结果:"
+
weightBean
.
getType
());
return
weightBean
.
getType
();
}
}
}
return
""
;
}
}
/**
/**
...
@@ -721,7 +765,7 @@ public class VideoAdingManager {
...
@@ -721,7 +765,7 @@ public class VideoAdingManager {
});
});
ksVideoAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
ksVideoAdManager
.
loadAd
(
activity
,
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
videoAdType
,
Constant
.
OW_VEDIO_AD
))
{
}
else
if
(
TextUtils
.
equals
(
videoAdType
,
Constant
.
OW_VEDIO_AD
))
{
// oneway广告激励视频
// oneway广告激励视频
if
(
owVideoAdManager
==
null
)
{
if
(
owVideoAdManager
==
null
)
{
if
(
activity
==
null
)
{
if
(
activity
==
null
)
{
...
...
app/src/main/java/com/mints/goldspace/manager/KsManager.kt
View file @
3ad2018f
...
@@ -15,10 +15,10 @@ object KsManager {
...
@@ -15,10 +15,10 @@ object KsManager {
private
const
val
KS_APP_ID
=
"574600004"
private
const
val
KS_APP_ID
=
"574600004"
/*信息流*/
/*信息流*/
const
val
KS_AD_NATIVEEXPRESS_AWARD
=
5746000025
const
val
KS_AD_NATIVEEXPRESS_AWARD
=
5746000025
L
/* vedio-postid */
/* vedio-postid */
const
val
KS_AD_VEDIO_POSTID
=
5746000024
const
val
KS_AD_VEDIO_POSTID
=
5746000024
L
/**
/**
* 初始化
* 初始化
...
...
app/src/main/java/com/mints/goldspace/mvp/model/DrawcashBean.java
View file @
3ad2018f
...
@@ -86,6 +86,7 @@ public class DrawcashBean implements Serializable {
...
@@ -86,6 +86,7 @@ public class DrawcashBean implements Serializable {
private
int
YLH_VEDIO
;
private
int
YLH_VEDIO
;
private
int
FL_VEDIO
;
private
int
FL_VEDIO
;
private
int
CORAL_VEDIO
;
private
int
CORAL_VEDIO
;
private
int
OW_VEDIO
;
public
int
getKS_VEDIO
()
{
public
int
getKS_VEDIO
()
{
return
KS_VEDIO
;
return
KS_VEDIO
;
...
@@ -119,6 +120,10 @@ public class DrawcashBean implements Serializable {
...
@@ -119,6 +120,10 @@ public class DrawcashBean implements Serializable {
public
int
getFL_VEDIO
()
{
public
int
getFL_VEDIO
()
{
return
FL_VEDIO
;
return
FL_VEDIO
;
}
}
public
int
getOW_VEDIO
()
{
return
OW_VEDIO
;
}
}
}
public
class
CashOutMoneyArrBean
implements
Serializable
{
public
class
CashOutMoneyArrBean
implements
Serializable
{
...
...
app/src/main/java/com/mints/goldspace/mvp/model/MyInfo.java
View file @
3ad2018f
...
@@ -207,6 +207,41 @@ public class MyInfo implements Serializable {
...
@@ -207,6 +207,41 @@ public class MyInfo implements Serializable {
private
int
coin
;
private
int
coin
;
private
int
readCoin
;
private
int
readCoin
;
private
int
needSeconds
;
private
int
needSeconds
;
private
RatePlanBean
ratePlan
;
public
class
RatePlanBean
implements
Serializable
{
private
int
YLH
;
private
int
KS
;
private
int
CSJ
;
public
int
getYLH
()
{
return
YLH
;
}
public
void
setYLH
(
int
YLH
)
{
this
.
YLH
=
YLH
;
}
public
int
getKS
()
{
return
KS
;
}
public
void
setKS
(
int
KS
)
{
this
.
KS
=
KS
;
}
public
int
getCSJ
()
{
return
CSJ
;
}
public
void
setCSJ
(
int
CSJ
)
{
this
.
CSJ
=
CSJ
;
}
}
public
RatePlanBean
getRatePlan
()
{
return
ratePlan
;
}
public
String
getDownloadUrl
()
{
public
String
getDownloadUrl
()
{
return
downloadUrl
;
return
downloadUrl
;
...
...
app/src/main/java/com/mints/goldspace/ui/activitys/DrawcashActivity.kt
View file @
3ad2018f
...
@@ -304,7 +304,8 @@ class DrawcashActivity : BaseActivity(),
...
@@ -304,7 +304,8 @@ class DrawcashActivity : BaseActivity(),
data
.
fL_VEDIO
,
data
.
fL_VEDIO
,
data
.
coraL_VEDIO
,
data
.
coraL_VEDIO
,
data
.
csjfulL_VEDIO
,
data
.
csjfulL_VEDIO
,
data
.
kS_VEDIO
data
.
kS_VEDIO
,
data
.
oW_VEDIO
)
)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} "
+
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} "
+
"ylhWeight:${data.ylH_VEDIO} "
+
"ylhWeight:${data.ylH_VEDIO} "
+
...
@@ -312,7 +313,8 @@ class DrawcashActivity : BaseActivity(),
...
@@ -312,7 +313,8 @@ class DrawcashActivity : BaseActivity(),
"csjFullWeight:${data.csjfulL_VEDIO} "
+
"csjFullWeight:${data.csjfulL_VEDIO} "
+
"shWeight:${data.coraL_VEDIO} "
+
"shWeight:${data.coraL_VEDIO} "
+
"flWeight:${data.fL_VEDIO} "
+
"flWeight:${data.fL_VEDIO} "
+
"ksWeight:${data.kS_VEDIO} "
)
"ksWeight:${data.kS_VEDIO} "
+
"owWeight:${data.oW_VEDIO} "
)
// 广告视频数
// 广告视频数
AppConfig
.
csjVideoAdCount
=
10
AppConfig
.
csjVideoAdCount
=
10
AppConfig
.
ylhAdCount
=
10
AppConfig
.
ylhAdCount
=
10
...
...
app/src/main/java/com/mints/goldspace/ui/fragment/MyFragment.kt
View file @
3ad2018f
...
@@ -1327,6 +1327,11 @@ class MyFragment : BaseFragment(),
...
@@ -1327,6 +1327,11 @@ class MyFragment : BaseFragment(),
carrierType
=
Constant
.
CARRIER_HIGH_ACTIVITY
carrierType
=
Constant
.
CARRIER_HIGH_ACTIVITY
vedioAdingManager
.
setIsHighWeight
(
true
)
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
)
awardVedio
(
taskBean
.
otherConfig
.
coin
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
// 注册高额任务广播监听
// 注册高额任务广播监听
...
...
gradle.properties
View file @
3ad2018f
...
@@ -16,7 +16,7 @@ org.gradle.jvmargs=-Xmx1536m
...
@@ -16,7 +16,7 @@ org.gradle.jvmargs=-Xmx1536m
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# http://www.gradle.org/docs/current/userguide/multi_project_builds.html#sec:decoupled_projects
# org.gradle.parallel=true
# org.gradle.parallel=true
DEBUG_URL
=
"http://39.97.65.143:9082/api/"
DEBUG_URL
=
"http://39.97.65.143:9082/api
-gs
/"
#DEBUG_URL="http://192.168.110.7:8101/"
#DEBUG_URL="http://192.168.110.7:8101/"
RELEASE_URL="https://api.mints-id.com/gsnew-api/"
RELEASE_URL="https://api.mints-id.com/gsnew-api/"
...
...
local.properties
View file @
3ad2018f
...
@@ -5,4 +5,4 @@
...
@@ -5,4 +5,4 @@
# For customization when using a Version Control System, please read the
# For customization when using a Version Control System, please read the
# header note.
# header note.
#Tue May 18 10:39:00 CST 2021
#Tue May 18 10:39:00 CST 2021
sdk.dir
=
/Users/
mcg
/Library/Android/sdk
sdk.dir
=
/Users/
Hello
/Library/Android/sdk
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