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
5623c54f
Commit
5623c54f
authored
May 25, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Plain Diff
解决冲突
parents
99b6b840
96064363
Changes
11
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
213 additions
and
145 deletions
+213
-145
build.gradle
GoodMoney/app/build.gradle
+6
-6
KsPreLoadExpressManager.kt
...com/mints/goodmoney/ad/express/KsPreLoadExpressManager.kt
+6
-1
KsVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/KsVideoAdManager.kt
+2
-0
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+44
-29
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+14
-0
KsManager.kt
...pp/src/main/java/com/mints/goodmoney/manager/KsManager.kt
+3
-0
UserTaskMsgBean.java
...n/java/com/mints/goodmoney/mvp/model/UserTaskMsgBean.java
+27
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-0
SplashKsADActivity.kt
...va/com/mints/goodmoney/ui/activitys/SplashKsADActivity.kt
+3
-0
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+100
-109
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+7
-0
No files found.
GoodMoney/app/build.gradle
View file @
5623c54f
...
@@ -341,8 +341,8 @@ dependencies {
...
@@ -341,8 +341,8 @@ dependencies {
implementation
'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
implementation
'com.sensorsdata.analytics.android:SensorsAnalyticsSDK:4.4.3'
api
'org.aspectj:aspectjrt:1.9.5'
api
'org.aspectj:aspectjrt:1.9.5'
//小满
//小满
implementation
(
"com.bx:adsdk:1.4.2.2"
)
{
implementation
(
"com.bx:adsdk:1.4.2.2"
)
{
exclude
group:
"com.miit.sdk"
exclude
group:
"com.miit.sdk"
transitive
=
true
transitive
=
true
changing
=
true
changing
=
true
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/express/KsPreLoadExpressManager.kt
View file @
5623c54f
package
com.mints.goodmoney.ad.express
package
com.mints.goodmoney.ad.express
import
android.annotation.SuppressLint
import
android.annotation.SuppressLint
import
android.content.DialogInterface
import
android.text.TextUtils
import
android.text.TextUtils
import
android.util.Log
import
android.util.Log
import
android.view.LayoutInflater
import
android.view.LayoutInflater
...
@@ -95,7 +96,7 @@ object KsPreLoadExpressManager {
...
@@ -95,7 +96,7 @@ object KsPreLoadExpressManager {
}
}
override
fun
onVideoPlayError
(
what
:
Int
,
extra
:
Int
)
{
override
fun
onVideoPlayError
(
what
:
Int
,
extra
:
Int
)
{
LogUtil
.
d
(
"KsPreLoadExpressManager"
,
"id=${what} extra=${extra}"
)
LogUtil
.
d
(
"KsPreLoadExpressManager"
,
"id=${what} extra=${extra}"
)
}
}
})
})
...
@@ -191,6 +192,10 @@ object KsPreLoadExpressManager {
...
@@ -191,6 +192,10 @@ object KsPreLoadExpressManager {
// Toast.makeText(mContext, "广告" + ad.appName + "展示", Toast.LENGTH_SHORT).show()
// Toast.makeText(mContext, "广告" + ad.appName + "展示", Toast.LENGTH_SHORT).show()
}
}
}
}
override
fun
handleDownloadDialog
(
p0
:
DialogInterface
.
OnClickListener
?):
Boolean
{
return
false
}
})
})
// 广告描述
// 广告描述
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/KsVideoAdManager.kt
View file @
5623c54f
...
@@ -120,6 +120,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
...
@@ -120,6 +120,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
}
}
}
}
override
fun
onRequestResult
(
p0
:
Int
)
{}
})
})
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VideoAdingManager.java
View file @
5623c54f
...
@@ -6,8 +6,6 @@ import android.content.Context;
...
@@ -6,8 +6,6 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.content.IntentFilter
;
import
android.content.IntentFilter
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
;
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
...
@@ -17,8 +15,6 @@ import com.mints.goodmoney.mvp.model.WeightBean;
...
@@ -17,8 +15,6 @@ import com.mints.goodmoney.mvp.model.WeightBean;
import
com.mints.goodmoney.service.AppInstallService
;
import
com.mints.goodmoney.service.AppInstallService
;
import
com.mints.goodmoney.utils.AppUtil
;
import
com.mints.goodmoney.utils.AppUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
java.lang.ref.WeakReference
;
import
java.lang.ref.WeakReference
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.HashSet
;
import
java.util.HashSet
;
...
@@ -64,8 +60,6 @@ public class VideoAdingManager {
...
@@ -64,8 +60,6 @@ public class VideoAdingManager {
// 是否是高额视频任务
// 是否是高额视频任务
private
boolean
isHighWeight
=
false
;
private
boolean
isHighWeight
=
false
;
private
boolean
isTTVideoAd
=
false
;
private
int
highIndex
=
0
;
//0-穿山甲 1-优量汇 2-快手
private
Activity
activity
;
private
Activity
activity
;
private
boolean
isVideoAdDownload
=
false
;
// 是否点击广告下载 true-点击
private
boolean
isVideoAdDownload
=
false
;
// 是否点击广告下载 true-点击
...
@@ -235,31 +229,52 @@ public class VideoAdingManager {
...
@@ -235,31 +229,52 @@ public class VideoAdingManager {
/**
/**
* 高额任务广告类型
* 高额任务广告类型
*
*
* @return
_
* @return
*/
*/
private
String
getHighWeight
()
{
public
String
getHighWeight
()
{
// isTTVideoAd = !isTTVideoAd;
// if (isTTVideoAd) {
int
weight
=
0
;
// return Constant.CSJ_VEDIO_AD;
// } else {
if
(
weightList
!=
null
)
{
// return Constant.YLH_VEDIO_AD;
weightList
.
clear
();
// }
String
adType
=
""
;
switch
(
highIndex
)
{
case
0
:
highIndex
=
1
;
adType
=
Constant
.
CSJ_VEDIO_AD
;
break
;
case
1
:
highIndex
=
2
;
adType
=
Constant
.
YLH_VEDIO_AD
;
break
;
case
2
:
highIndex
=
0
;
adType
=
Constant
.
KS_VEDIO_AD
;
break
;
}
}
return
adType
;
// 穿山甲
if
(
AppConfig
.
csjHighVideoAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
AppConfig
.
csjHighVideoAdCount
,
Constant
.
CSJ_VEDIO_AD
));
weight
=
weight
+
AppConfig
.
csjHighVideoAdCount
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:csjVideoWeight:"
+
AppConfig
.
csjHighVideoAdCount
);
}
// 优量汇
if
(
AppConfig
.
ylhHighVideoAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
AppConfig
.
ylhHighVideoAdCount
,
Constant
.
YLH_VEDIO_AD
));
weight
=
weight
+
AppConfig
.
ylhHighVideoAdCount
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ylhVideoWeight:"
+
AppConfig
.
ylhHighVideoAdCount
);
}
// 快手
if
(
AppConfig
.
ksHighVideoAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
AppConfig
.
ksHighVideoAdCount
,
Constant
.
KS_VEDIO_AD
));
weight
=
weight
+
AppConfig
.
ksHighVideoAdCount
;
LogUtil
.
d
(
TAG
,
"高额任务 -> 权重值:ksVideoWeight:"
+
AppConfig
.
ksHighVideoAdCount
);
}
// 权重随机
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
Constant
.
CSJ_VEDIO_AD
;
}
}
/**
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
5623c54f
...
@@ -100,6 +100,20 @@ public class AppConfig {
...
@@ -100,6 +100,20 @@ public class AppConfig {
* rtaVideo 剩余广告播放数
* rtaVideo 剩余广告播放数
*/
*/
public
static
int
rtaVideoAdCount
=
0
;
public
static
int
rtaVideoAdCount
=
0
;
/**
* 高额任务和超级翻倍 csjVideo 剩余广告播放数
*/
public
static
int
csjHighVideoAdCount
=
0
;
/**
* 高额任务和超级翻倍 ylhVideo 剩余广告播放数
*/
public
static
int
ylhHighVideoAdCount
=
0
;
/**
* 高额任务和超级翻倍 ksVideo 剩余广告播放数
*/
public
static
int
ksHighVideoAdCount
=
0
;
/**
/**
* 高额试玩任务标识
* 高额试玩任务标识
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/KsManager.kt
View file @
5623c54f
...
@@ -23,6 +23,9 @@ object KsManager {
...
@@ -23,6 +23,9 @@ object KsManager {
/* vedio-postid */
/* vedio-postid */
const
val
KS_AD_VEDIO_POSTID
=
5746000022
const
val
KS_AD_VEDIO_POSTID
=
5746000022
/* 内容联盟id */
const
val
KS_CONTENT_POSTID
=
5746000049
/**
/**
* 初始化
* 初始化
*/
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/UserTaskMsgBean.java
View file @
5623c54f
...
@@ -13,6 +13,7 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -13,6 +13,7 @@ public class UserTaskMsgBean implements Serializable {
private
UserRiskAppsBean
userRiskApps
;
private
UserRiskAppsBean
userRiskApps
;
private
AdcodeBean
adcode_v1
=
null
;
private
AdcodeBean
adcode_v1
=
null
;
private
FlowAdRulesBean
flowAdRules
;
private
FlowAdRulesBean
flowAdRules
;
private
HighRatePlanBean
highRatePlan
;
private
String
ip
;
private
String
ip
;
private
String
channel
;
private
String
channel
;
...
@@ -135,4 +136,30 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -135,4 +136,30 @@ public class UserTaskMsgBean implements Serializable {
public
FlowAdRulesBean
getFlowAdRules
()
{
public
FlowAdRulesBean
getFlowAdRules
()
{
return
flowAdRules
;
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
;
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
5623c54f
...
@@ -425,6 +425,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -425,6 +425,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 是否开启应用使用情况权限
// 是否开启应用使用情况权限
if
(
AppUtil
.
isOpenUsageStats
())
{
if
(
AppUtil
.
isOpenUsageStats
())
{
registerBroad
()
registerBroad
()
videoAdingManager
.
setIsHighWeight
(
true
)
awardVideo
()
awardVideo
()
}
else
{
}
else
{
AppTryPlayManager
.
openAppUsageStats
(
this
)
AppTryPlayManager
.
openAppUsageStats
(
this
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashKsADActivity.kt
View file @
5623c54f
...
@@ -29,6 +29,7 @@ class SplashKsADActivity : BaseActivity() {
...
@@ -29,6 +29,7 @@ class SplashKsADActivity : BaseActivity() {
* 记录拉取广告的时间
* 记录拉取广告的时间
*/
*/
private
val
handler
=
Handler
(
Looper
.
getMainLooper
())
private
val
handler
=
Handler
(
Looper
.
getMainLooper
())
override
fun
getContentViewLayoutID
():
Int
{
override
fun
getContentViewLayoutID
():
Int
{
return
R
.
layout
.
activity_splash_ylh
return
R
.
layout
.
activity_splash_ylh
}
}
...
@@ -100,6 +101,8 @@ class SplashKsADActivity : BaseActivity() {
...
@@ -100,6 +101,8 @@ class SplashKsADActivity : BaseActivity() {
next
()
next
()
}
}
override
fun
onRequestResult
(
p0
:
Int
)
{}
override
fun
onSplashScreenAdLoad
(
p0
:
KsSplashScreenAd
?)
{
override
fun
onSplashScreenAdLoad
(
p0
:
KsSplashScreenAd
?)
{
LogUtil
.
d
(
TAG
,
"onSplashScreenAdLoad"
)
LogUtil
.
d
(
TAG
,
"onSplashScreenAdLoad"
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
5623c54f
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
5623c54f
...
@@ -324,6 +324,13 @@ class MyFragment : BaseFragment(),
...
@@ -324,6 +324,13 @@ class MyFragment : BaseFragment(),
return
return
}
}
// 高额任务及超级翻倍次数
if
(
data
.
highRatePlan
!=
null
)
{
AppConfig
.
csjHighVideoAdCount
=
data
.
highRatePlan
.
csj
AppConfig
.
ylhHighVideoAdCount
=
data
.
highRatePlan
.
ylh
AppConfig
.
ksHighVideoAdCount
=
data
.
highRatePlan
.
ks
}
if
(
data
.
shareNews
!=
null
)
{
if
(
data
.
shareNews
!=
null
)
{
AppConfig
.
wzReadCoin
=
data
.
shareNews
.
readCoin
AppConfig
.
wzReadCoin
=
data
.
shareNews
.
readCoin
}
}
...
...
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