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
cb2ffa05
Commit
cb2ffa05
authored
May 11, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Plain Diff
代码合并
parents
68fb9a75
533121bc
Changes
25
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
25 changed files
with
462 additions
and
323 deletions
+462
-323
build.gradle
GoodMoney/app/build.gradle
+4
-3
goodmoneypkg_1.2.4.apk
GoodMoney/app/goodmoneypkg/release/goodmoneypkg_1.2.4.apk
+0
-0
output-metadata.json
GoodMoney/app/goodmoneypkg/release/output-metadata.json
+0
-20
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+133
-65
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+4
-0
DeviceInfo.kt
...pp/src/main/java/com/mints/goodmoney/common/DeviceInfo.kt
+33
-0
SimulatorManager.kt
...main/java/com/mints/goodmoney/manager/SimulatorManager.kt
+23
-0
TrackManager.java
...c/main/java/com/mints/goodmoney/manager/TrackManager.java
+12
-0
UserWeight.kt
...p/src/main/java/com/mints/goodmoney/manager/UserWeight.kt
+60
-0
VedioRulesBean.java
...in/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
+6
-0
AwardPresenter.java
...va/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
+0
-49
DrawcashPresenter.java
...com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
+2
-43
LoginPresenter.kt
...java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
+2
-43
TrackPresenter.java
...va/com/mints/goodmoney/mvp/presenters/TrackPresenter.java
+98
-0
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+9
-1
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+6
-3
DrawNativeVideoActivity.kt
...m/mints/goodmoney/ui/activitys/DrawNativeVideoActivity.kt
+6
-2
KylVideoActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
+6
-2
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+6
-2
BaseActivity.java
...a/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
+3
-0
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+1
-43
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+7
-46
TurnTableFragment.kt
...java/com/mints/goodmoney/ui/fragment/TurnTableFragment.kt
+3
-0
DrawcashVideoDialog.kt
.../mints/goodmoney/ui/widgets/dialog/DrawcashVideoDialog.kt
+1
-1
AccessibilityUtils.java
...in/java/com/mints/goodmoney/utils/AccessibilityUtils.java
+37
-0
No files found.
GoodMoney/app/build.gradle
View file @
cb2ffa05
...
@@ -14,8 +14,8 @@ android {
...
@@ -14,8 +14,8 @@ android {
applicationId
"com.mints.goodmoney"
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
25
versionCode
30
versionName
"1.
2.4
"
versionName
"1.
3.0
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
@@ -199,7 +199,8 @@ dependencies {
...
@@ -199,7 +199,8 @@ dependencies {
implementation
'com.github.SheHuan:NiceImageView:1.0.5'
implementation
'com.github.SheHuan:NiceImageView:1.0.5'
// 跑马灯
// 跑马灯
implementation
'com.sunfusheng:marqueeview:1.2.0'
implementation
'com.sunfusheng:marqueeview:1.2.0'
// 检测运行设备是否模拟器
implementation
'com.snail:antifake:1.4'
// 工具类
// 工具类
// gson
// gson
...
...
GoodMoney/app/goodmoneypkg/release/goodmoneypkg_1.2.4.apk
deleted
100644 → 0
View file @
68fb9a75
File deleted
GoodMoney/app/goodmoneypkg/release/output-metadata.json
deleted
100644 → 0
View file @
68fb9a75
{
"version"
:
1
,
"artifactType"
:
{
"type"
:
"APK"
,
"kind"
:
"Directory"
},
"applicationId"
:
"com.mints.goodmoney"
,
"variantName"
:
"goodmoneypkgRelease"
,
"elements"
:
[
{
"type"
:
"SINGLE"
,
"filters"
:
[],
"properties"
:
[],
"versionCode"
:
25
,
"versionName"
:
"1.2.4"
,
"enabled"
:
true
,
"outputFile"
:
"goodmoneypkg_1.2.4.apk"
}
]
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VideoAdingManager.java
View file @
cb2ffa05
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
cb2ffa05
...
@@ -131,4 +131,8 @@ public class AppConfig {
...
@@ -131,4 +131,8 @@ public class AppConfig {
*/
*/
public
static
boolean
isSuperTask
=
false
;
public
static
boolean
isSuperTask
=
false
;
/**
* 激励视频是否休眠 false-不休眠 提示:加载失败,请稍后重试。
*/
public
static
boolean
isVideoSleep
=
false
;
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/common/DeviceInfo.kt
View file @
cb2ffa05
...
@@ -1017,6 +1017,39 @@ class DeviceInfo private constructor() {
...
@@ -1017,6 +1017,39 @@ class DeviceInfo private constructor() {
return
0
return
0
}
}
/**
* 获取后台运行APP
*/
fun
getRunningApp
():
String
{
try
{
val
appList
:
MutableList
<
MutableMap
<
String
,
String
>>
=
ArrayList
()
val
localPackageManager
=
mContext
?.
packageManager
localPackageManager
?.
let
{
val
localList
=
localPackageManager
.
getInstalledPackages
(
0
)
for
(
i
in
0
until
localList
.
size
)
{
val
pinfo
=
localList
.
get
(
i
)
as
PackageInfo
if
(
pinfo
.
applicationInfo
.
flags
and
ApplicationInfo
.
FLAG_SYSTEM
>
0
)
{
//系统程序 忽略
continue
}
if
(
ApplicationInfo
.
FLAG_UPDATED_SYSTEM_APP
and
pinfo
.
applicationInfo
.
flags
==
0
&&
ApplicationInfo
.
FLAG_STOPPED
and
pinfo
.
applicationInfo
.
flags
==
0
)
{
val
appMap
:
MutableMap
<
String
,
String
>
=
HashMap
()
appMap
[
"appName"
]
=
pinfo
.
applicationInfo
.
loadLabel
(
mContext
!!
.
packageManager
)
as
String
appMap
[
"appPkg"
]
=
pinfo
.
packageName
appList
.
add
(
appMap
)
}
}
return
JsonUtil
.
toJson
(
appList
)
}
}
catch
(
e
:
Exception
){
}
return
""
}
companion
object
{
companion
object
{
private
var
_inst
:
DeviceInfo
?
=
null
private
var
_inst
:
DeviceInfo
?
=
null
val
instance
:
DeviceInfo
val
instance
:
DeviceInfo
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/SimulatorManager.kt
0 → 100644
View file @
cb2ffa05
package
com.mints.goodmoney.manager
import
com.mints.goodmoney.MintsApplication
import
com.snail.antifake.jni.EmulatorDetectUtil
/**
* 描述:模拟器校验
* 作者:孟崔广
*/
object
SimulatorManager
{
/**
* 是否是模拟器 0-不是模拟器
*/
fun
isEmulator
():
Int
{
try
{
return
if
(
EmulatorDetectUtil
.
isEmulator
(
MintsApplication
.
getContext
()))
1
else
0
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
return
0
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TrackManager.java
View file @
cb2ffa05
...
@@ -131,4 +131,16 @@ public class TrackManager {
...
@@ -131,4 +131,16 @@ public class TrackManager {
trackPresenter
.
reportErrornterface
(
url
,
request
);
trackPresenter
.
reportErrornterface
(
url
,
request
);
}
}
}
}
public
void
getAdWeight
()
{
if
(
trackPresenter
!=
null
&&
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getUserID
()))
{
trackPresenter
.
getAdWeight
();
}
}
public
void
riskinfo
()
{
if
(
trackPresenter
!=
null
&&
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getUserID
()))
{
trackPresenter
.
riskinfo
();
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/UserWeight.kt
0 → 100644
View file @
cb2ffa05
package
com.mints.goodmoney.manager
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.ui.fragment.MainFragment
import
com.mints.goodmoney.utils.ForegroundOrBackground
import
com.mints.goodmoney.utils.LogUtil
/**
* 描述:用户广告视频数和权重
* 作者:孟崔广
*/
object
UserWeight
{
private
val
TAG
=
UserWeight
::
class
.
java
.
simpleName
private
val
videoAdingManager
by
lazy
{
VideoAdingManager
.
getInstance
(
ForegroundOrBackground
.
getApp_activity
())
}
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
AppConfig
.
isVideoSleep
=
data
.
vedioRules
.
isVedioSleep
videoAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
,
data
.
vedioRules
.
rtA_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
AppConfig
.
rtaVideoAdCount
=
data
.
vedioRules
.
rtA_VEDIO
.
surplus
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount} "
+
"rtaCount:${AppConfig.rtaVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
View file @
cb2ffa05
...
@@ -13,6 +13,8 @@ public class VedioRulesBean implements Serializable {
...
@@ -13,6 +13,8 @@ public class VedioRulesBean implements Serializable {
private
KSVedioBean
KS_VEDIO
;
private
KSVedioBean
KS_VEDIO
;
private
RTAVedioBean
RTA_VEDIO
;
private
RTAVedioBean
RTA_VEDIO
;
private
boolean
flVideoFlag
;
private
boolean
flVideoFlag
;
private
boolean
vedioSleep
;
public
class
CsjVedioBean
implements
Serializable
{
public
class
CsjVedioBean
implements
Serializable
{
private
int
surplus
;
//剩余可看视频数
private
int
surplus
;
//剩余可看视频数
...
@@ -158,4 +160,8 @@ public class VedioRulesBean implements Serializable {
...
@@ -158,4 +160,8 @@ public class VedioRulesBean implements Serializable {
public
boolean
isFlVideoFlag
()
{
public
boolean
isFlVideoFlag
()
{
return
flVideoFlag
;
return
flVideoFlag
;
}
}
public
boolean
isVedioSleep
()
{
return
vedioSleep
;
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/AwardPresenter.java
View file @
cb2ffa05
...
@@ -199,53 +199,4 @@ public class AwardPresenter extends BasePresenter<AwardView> {
...
@@ -199,53 +199,4 @@ public class AwardPresenter extends BasePresenter<AwardView> {
});
});
}
}
public
void
riskinfo
()
{
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
setT
(
deviceInfo
.
getAppInfoMap
());
}
@Override
public
void
doInUIThread
()
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"androidid"
,
deviceInfo
.
getAndroidId
(
null
));
vo
.
put
(
"os"
,
"android"
);
vo
.
put
(
"model"
,
deviceInfo
.
getBrand
()
+
" "
+
deviceInfo
.
getMobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
().
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
vo
.
put
(
"applist"
,
getT
());
vo
.
put
(
"eventid"
,
Constant
.
RISK_EVENT_ID_TASK
);
vo
.
put
(
"ischarge"
,
deviceInfo
.
isCharging
());
vo
.
put
(
"isusbdebug"
,
deviceInfo
.
getGetUsbStatus
());
vo
.
put
(
"iswifi"
,
deviceInfo
.
getGetWifiConnected
());
vo
.
put
(
"isroot"
,
deviceInfo
.
isRoot
());
vo
.
put
(
"isvpn"
,
deviceInfo
.
isVPN
());
vo
.
put
(
"memory"
,
deviceInfo
.
getTotalMemory
()
+
"+"
+
deviceInfo
.
getTotalStorage
());
vo
.
put
(
"operator"
,
deviceInfo
.
getOperator
());
vo
.
put
(
"idfa"
,
""
);
vo
.
put
(
"imei"
,
deviceInfo
.
getIMEI
());
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
riskinfo
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
if
(
isLinkView
())
return
;
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
}
});
}
});
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/DrawcashPresenter.java
View file @
cb2ffa05
...
@@ -8,6 +8,7 @@ import com.mints.goodmoney.common.Constant;
...
@@ -8,6 +8,7 @@ import com.mints.goodmoney.common.Constant;
import
com.mints.goodmoney.common.DeviceInfo
;
import
com.mints.goodmoney.common.DeviceInfo
;
import
com.mints.goodmoney.manager.AppHttpManager
;
import
com.mints.goodmoney.manager.AppHttpManager
;
import
com.mints.goodmoney.manager.ShumeiManager
;
import
com.mints.goodmoney.manager.ShumeiManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.DrawcashBean
;
import
com.mints.goodmoney.mvp.model.DrawcashBean
;
...
@@ -152,7 +153,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
...
@@ -152,7 +153,7 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
}
}
riskinfo
(
deviceInfo
,
getT
()
);
TrackManager
.
getInstance
().
riskinfo
(
);
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
...
@@ -314,46 +315,4 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
...
@@ -314,46 +315,4 @@ public class DrawcashPresenter extends BasePresenter<DrawcashView> {
});
});
}
}
/**
* 风控信息
*/
private
void
riskinfo
(
DeviceInfo
deviceInfo
,
String
appPkgList
)
{
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
vo
.
put
(
"androidid"
,
deviceInfo
.
getAndroidId
(
null
));
vo
.
put
(
"os"
,
"android"
);
vo
.
put
(
"model"
,
deviceInfo
.
getBrand
()
+
" "
+
deviceInfo
.
getMobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
().
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
vo
.
put
(
"applist"
,
appPkgList
);
vo
.
put
(
"eventid"
,
Constant
.
RISK_EVENT_ID_DRAWCASH
);
vo
.
put
(
"ischarge"
,
deviceInfo
.
isCharging
());
vo
.
put
(
"isusbdebug"
,
deviceInfo
.
getGetUsbStatus
());
vo
.
put
(
"iswifi"
,
deviceInfo
.
getGetWifiConnected
());
vo
.
put
(
"isroot"
,
deviceInfo
.
isRoot
());
vo
.
put
(
"isvpn"
,
deviceInfo
.
isVPN
());
vo
.
put
(
"memory"
,
deviceInfo
.
getTotalMemory
()
+
"+"
+
deviceInfo
.
getTotalStorage
());
vo
.
put
(
"operator"
,
deviceInfo
.
getOperator
());
vo
.
put
(
"idfa"
,
""
);
vo
.
put
(
"imei"
,
deviceInfo
.
getIMEI
());
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
riskinfo
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
if
(
isLinkView
())
return
;
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
}
});
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/LoginPresenter.kt
View file @
cb2ffa05
...
@@ -4,10 +4,7 @@ import android.text.TextUtils
...
@@ -4,10 +4,7 @@ import android.text.TextUtils
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.manager.JpushManager
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.views.LoginView
import
com.mints.goodmoney.mvp.views.LoginView
...
@@ -251,7 +248,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
...
@@ -251,7 +248,7 @@ class LoginPresenter : BasePresenter<LoginView>() {
vo
[
"shumeiId"
]
=
ShumeiManager
.
getInstance
().
getShumeiDeviceId
()
vo
[
"shumeiId"
]
=
ShumeiManager
.
getInstance
().
getShumeiDeviceId
()
vo
[
"appPkgList"
]
=
t
.
toString
()
vo
[
"appPkgList"
]
=
t
.
toString
()
riskinfo
(
deviceInfo
,
t
.
toString
()
)
TrackManager
.
getInstance
().
riskinfo
(
)
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
.
call
(
loanService
.
saveTerminalInfo
(
vo
),
...
@@ -281,42 +278,4 @@ class LoginPresenter : BasePresenter<LoginView>() {
...
@@ -281,42 +278,4 @@ class LoginPresenter : BasePresenter<LoginView>() {
}
}
/**
* 风控信息
*/
fun
riskinfo
(
deviceInfo
:
DeviceInfo
,
appPkgList
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"androidid"
]
=
deviceInfo
.
getAndroidId
(
null
)
vo
[
"os"
]
=
"android"
vo
[
"model"
]
=
deviceInfo
.
brand
+
" "
+
deviceInfo
.
mobileModel
vo
[
"uuid"
]
=
DeviceUuidFactory
().
deviceUuid
vo
[
"osversion"
]
=
deviceInfo
.
oSVersion
vo
[
"appversion"
]
=
deviceInfo
.
versionName
vo
[
"applist"
]
=
appPkgList
vo
[
"eventid"
]
=
Constant
.
RISK_EVENT_ID_LOGIN
vo
[
"ischarge"
]
=
deviceInfo
.
isCharging
vo
[
"isusbdebug"
]
=
deviceInfo
.
getUsbStatus
vo
[
"iswifi"
]
=
deviceInfo
.
getWifiConnected
vo
[
"isroot"
]
=
deviceInfo
.
isRoot
vo
[
"isvpn"
]
=
deviceInfo
.
isVPN
vo
[
"memory"
]
=
deviceInfo
.
totalMemory
+
"+"
+
deviceInfo
.
totalStorage
vo
[
"operator"
]
=
deviceInfo
.
operator
vo
[
"idfa"
]
=
""
vo
[
"imei"
]
=
deviceInfo
.
iMEI
vo
[
"oaid"
]
=
MintsApplication
.
OAID
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
riskinfo
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
override
fun
onCompleted
()
{
}
override
fun
onError
(
e
:
Throwable
)
{
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
Object
>)
{
}
})
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TrackPresenter.java
View file @
cb2ffa05
package
com
.
mints
.
goodmoney
.
mvp
.
presenters
;
package
com
.
mints
.
goodmoney
.
mvp
.
presenters
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.text.TextUtils
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonObject
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.DeviceInfo
;
import
com.mints.goodmoney.manager.AppHttpManager
;
import
com.mints.goodmoney.manager.AppHttpManager
;
import
com.mints.goodmoney.manager.SimulatorManager
;
import
com.mints.goodmoney.manager.UserWeight
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.CommonParamBean
;
import
com.mints.goodmoney.mvp.model.CommonParamBean
;
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
;
import
com.mints.goodmoney.utils.AccessibilityUtils
;
import
com.mints.goodmoney.utils.DeviceUuidFactory
;
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
;
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
;
import
com.mints.library.net.neterror.BaseSubscriber
;
import
com.mints.library.net.neterror.BaseSubscriber
;
import
com.mints.library.net.neterror.Throwable
;
import
com.mints.library.net.neterror.Throwable
;
...
@@ -66,6 +75,9 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -66,6 +75,9 @@ public class TrackPresenter extends BaseTrackPresenter {
@Override
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
if
(
TextUtils
.
equals
(
Constant
.
EVENT_TYPE_ONE
,
eventType
))
{
getAdWeight
();
}
}
}
});
});
}
}
...
@@ -302,4 +314,90 @@ public class TrackPresenter extends BaseTrackPresenter {
...
@@ -302,4 +314,90 @@ public class TrackPresenter extends BaseTrackPresenter {
}
}
});
});
}
}
/**
* 获取权重
*/
public
void
getAdWeight
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
vedioPlans
(),
new
BaseSubscriber
<
BaseResponse
<
UserTaskMsgBean
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
UserTaskMsgBean
>
baseResponse
)
{
UserWeight
.
INSTANCE
.
initAdWeight
(
baseResponse
.
getData
());
}
});
}
public
void
riskinfo
()
{
DeviceInfo
deviceInfo
=
DeviceInfo
.
Companion
.
getInstance
();
HashMap
<
String
,
Object
>
vo
=
new
HashMap
<>();
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
setT
(
deviceInfo
.
getAppInfoMap
());
}
@Override
public
void
doInUIThread
()
{
vo
.
put
(
"androidid"
,
deviceInfo
.
getAndroidId
(
null
));
vo
.
put
(
"os"
,
"android"
);
vo
.
put
(
"model"
,
deviceInfo
.
getBrand
()
+
" "
+
deviceInfo
.
getMobileModel
());
vo
.
put
(
"uuid"
,
new
DeviceUuidFactory
().
getDeviceUuid
());
vo
.
put
(
"osversion"
,
deviceInfo
.
getOSVersion
());
vo
.
put
(
"appversion"
,
deviceInfo
.
getVersionName
());
vo
.
put
(
"applist"
,
getT
());
vo
.
put
(
"eventid"
,
Constant
.
RISK_EVENT_ID_TASK
);
vo
.
put
(
"ischarge"
,
deviceInfo
.
isCharging
());
vo
.
put
(
"isusbdebug"
,
deviceInfo
.
getGetUsbStatus
());
vo
.
put
(
"iswifi"
,
deviceInfo
.
getGetWifiConnected
());
vo
.
put
(
"isroot"
,
deviceInfo
.
isRoot
());
vo
.
put
(
"isvpn"
,
deviceInfo
.
isVPN
());
vo
.
put
(
"memory"
,
deviceInfo
.
getTotalMemory
()
+
"+"
+
deviceInfo
.
getTotalStorage
());
vo
.
put
(
"operator"
,
deviceInfo
.
getOperator
());
vo
.
put
(
"idfa"
,
""
);
vo
.
put
(
"imei"
,
deviceInfo
.
getIMEI
());
vo
.
put
(
"oaid"
,
MintsApplication
.
OAID
);
vo
.
put
(
"isSimulator"
,
SimulatorManager
.
INSTANCE
.
isEmulator
());
vo
.
put
(
"isAccessibility"
,
AccessibilityUtils
.
isAccessibilityEnabled
());
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
setT
(
deviceInfo
.
getRunningApp
());
}
@Override
public
void
doInUIThread
()
{
vo
.
put
(
"appRunningPkgList"
,
getT
());
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
riskinfo
(
vo
),
new
BaseSubscriber
<
BaseResponse
<
Object
>>()
{
@Override
public
void
onCompleted
()
{
}
@Override
public
void
onError
(
Throwable
e
)
{
}
@Override
public
void
onNext
(
BaseResponse
<
Object
>
baseResponse
)
{
}
});
}
});
}
});
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
cb2ffa05
...
@@ -582,7 +582,6 @@ public interface LoanService {
...
@@ -582,7 +582,6 @@ public interface LoanService {
Observable
<
BaseResponse
<
JsonObject
>>
reportErrornterface
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
JsonObject
>>
reportErrornterface
(
@Body
Map
<
String
,
Object
>
vo
);
/**
/**
* <<<<<<< Updated upstream
* 获取大转盘信息
* 获取大转盘信息
*
*
* @return
* @return
...
@@ -629,6 +628,15 @@ public interface LoanService {
...
@@ -629,6 +628,15 @@ public interface LoanService {
*/
*/
@POST
(
"api/setWechatTipsStatus"
)
@POST
(
"api/setWechatTipsStatus"
)
Observable
<
BaseResponse
<
JsonObject
>>
setWechatTipsStatus
(
@Body
Map
<
String
,
Object
>
vo
);
Observable
<
BaseResponse
<
JsonObject
>>
setWechatTipsStatus
(
@Body
Map
<
String
,
Object
>
vo
);
/**
* 获取权重信息
*
* @return
*/
@POST
(
"api/vedioPlans"
)
Observable
<
BaseResponse
<
UserTaskMsgBean
>>
vedioPlans
();
/**
/**
* 默认http工厂
* 默认http工厂
*/
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
cb2ffa05
...
@@ -502,7 +502,10 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -502,7 +502,10 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardVideo
()
{
private
fun
awardVideo
()
{
if
(
videoAdingManager
.
videoFinishFlag
)
{
if
(
AppConfig
.
isVideoSleep
)
{
showToast
(
"加载失败,请稍后重试。"
)
return
}
else
if
(
videoAdingManager
.
videoFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
...
@@ -529,7 +532,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -529,7 +532,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
...
@@ -608,7 +611,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -608,7 +611,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 上传风控信息
// 上传风控信息
if
(
riskFlag
)
{
if
(
riskFlag
)
{
awardPresenter
.
riskinfo
()
TrackManager
.
getInstance
()
.
riskinfo
()
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawNativeVideoActivity.kt
View file @
cb2ffa05
...
@@ -25,6 +25,7 @@ import com.mints.goodmoney.call.business.VideoDBHelper
...
@@ -25,6 +25,7 @@ import com.mints.goodmoney.call.business.VideoDBHelper
import
com.mints.goodmoney.call.detail.DetailApplyActivity
import
com.mints.goodmoney.call.detail.DetailApplyActivity
import
com.mints.goodmoney.call.permission.PermissionActivity
import
com.mints.goodmoney.call.permission.PermissionActivity
import
com.mints.goodmoney.call.permission.PermissionManager
import
com.mints.goodmoney.call.permission.PermissionManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.DrawVideoBean
import
com.mints.goodmoney.mvp.model.DrawVideoBean
...
@@ -321,7 +322,10 @@ class DrawNativeVideoActivity : BaseActivity(),
...
@@ -321,7 +322,10 @@ class DrawNativeVideoActivity : BaseActivity(),
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardVideo
()
{
private
fun
awardVideo
()
{
if
(
videoAdingManager
.
videoFinishFlag
)
{
if
(
AppConfig
.
isVideoSleep
)
{
showToast
(
"加载失败,请稍后重试。"
)
return
}
else
if
(
videoAdingManager
.
videoFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
...
@@ -345,7 +349,7 @@ class DrawNativeVideoActivity : BaseActivity(),
...
@@ -345,7 +349,7 @@ class DrawNativeVideoActivity : BaseActivity(),
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
View file @
cb2ffa05
...
@@ -14,6 +14,7 @@ import com.mints.goodmoney.call.business.VideoDBHelper
...
@@ -14,6 +14,7 @@ import com.mints.goodmoney.call.business.VideoDBHelper
import
com.mints.goodmoney.call.detail.DetailApplyActivity
import
com.mints.goodmoney.call.detail.DetailApplyActivity
import
com.mints.goodmoney.call.permission.PermissionActivity
import
com.mints.goodmoney.call.permission.PermissionActivity
import
com.mints.goodmoney.call.permission.PermissionManager
import
com.mints.goodmoney.call.permission.PermissionManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.KylBean
import
com.mints.goodmoney.mvp.model.KylBean
...
@@ -163,7 +164,10 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
...
@@ -163,7 +164,10 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardVideo
()
{
private
fun
awardVideo
()
{
if
(
videoAdingManager
.
videoFinishFlag
)
{
if
(
AppConfig
.
isVideoSleep
)
{
showToast
(
"加载失败,请稍后重试。"
)
return
}
else
if
(
videoAdingManager
.
videoFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
...
@@ -187,7 +191,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
...
@@ -187,7 +191,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
cb2ffa05
...
@@ -8,6 +8,7 @@ import com.mints.goodmoney.R
...
@@ -8,6 +8,7 @@ import com.mints.goodmoney.R
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.ad.video.VideoAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.manager.TtCsjAdManager
import
com.mints.goodmoney.mvp.model.MorningClockBean
import
com.mints.goodmoney.mvp.model.MorningClockBean
import
com.mints.goodmoney.mvp.model.VideoAdingBean
import
com.mints.goodmoney.mvp.model.VideoAdingBean
...
@@ -107,7 +108,10 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
...
@@ -107,7 +108,10 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardVideo
()
{
private
fun
awardVideo
()
{
if
(
videoAdingManager
.
videoFinishFlag
)
{
if
(
AppConfig
.
isVideoSleep
)
{
showToast
(
"加载失败,请稍后重试。"
)
return
}
else
if
(
videoAdingManager
.
videoFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
...
@@ -131,7 +135,7 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
...
@@ -131,7 +135,7 @@ class MorningClockActivity : BaseActivity(), View.OnClickListener, MorningClockV
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
View file @
cb2ffa05
...
@@ -34,6 +34,9 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
...
@@ -34,6 +34,9 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
@Override
@Override
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
protected
void
onCreate
(
Bundle
savedInstanceState
)
{
super
.
onCreate
(
savedInstanceState
);
super
.
onCreate
(
savedInstanceState
);
getWindow
().
addFlags
(
WindowManager
.
LayoutParams
.
FLAG_SECURE
);
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
!=
Build
.
VERSION_CODES
.
O
)
{
if
(
android
.
os
.
Build
.
VERSION
.
SDK_INT
!=
Build
.
VERSION_CODES
.
O
)
{
setRequestedOrientation
(
ActivityInfo
.
SCREEN_ORIENTATION_PORTRAIT
);
setRequestedOrientation
(
ActivityInfo
.
SCREEN_ORIENTATION_PORTRAIT
);
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
cb2ffa05
...
@@ -241,7 +241,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -241,7 +241,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
// 新人福利 放到个人中心展示 防止首页红包转动异常
// 新人福利 放到个人中心展示 防止首页红包转动异常
// 设置视频权重
// 设置视频权重
initAdWeight
(
data
)
UserWeight
.
initAdWeight
(
data
)
initExpress
(
data
.
flowAdRules
)
initExpress
(
data
.
flowAdRules
)
// 调用金币视频信息接口
// 调用金币视频信息接口
...
@@ -645,48 +645,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -645,48 +645,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
})
})
}
}
/**
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
videoAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
,
data
.
vedioRules
.
rtA_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
AppConfig
.
rtaVideoAdCount
=
data
.
vedioRules
.
rtA_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount} "
+
"ratCount:${AppConfig.rtaVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
cb2ffa05
...
@@ -341,8 +341,8 @@ class MyFragment : BaseFragment(),
...
@@ -341,8 +341,8 @@ class MyFragment : BaseFragment(),
AppConfig
.
wzReadCoin
=
data
.
shareNews
.
readCoin
AppConfig
.
wzReadCoin
=
data
.
shareNews
.
readCoin
}
}
//
更新
权重
//
设置视频
权重
initAdWeight
(
data
)
UserWeight
.
initAdWeight
(
data
)
initExpress
(
data
.
flowAdRules
)
initExpress
(
data
.
flowAdRules
)
AppConfig
.
app_black_name
=
data
.
userRiskApps
.
userRiskAppName
AppConfig
.
app_black_name
=
data
.
userRiskApps
.
userRiskAppName
AppConfig
.
app_black_pkg
=
data
.
userRiskApps
.
userRiskAppPkg
AppConfig
.
app_black_pkg
=
data
.
userRiskApps
.
userRiskAppPkg
...
@@ -1193,7 +1193,10 @@ class MyFragment : BaseFragment(),
...
@@ -1193,7 +1193,10 @@ class MyFragment : BaseFragment(),
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardVideo
(
coin
:
Int
,
carrierType
:
String
)
{
private
fun
awardVideo
(
coin
:
Int
,
carrierType
:
String
)
{
if
(
videoAdingManager
.
videoFinishFlag
)
{
if
(
AppConfig
.
isVideoSleep
)
{
showToast
(
"加载失败,请稍后重试。"
)
return
}
else
if
(
videoAdingManager
.
videoFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
...
@@ -1220,7 +1223,7 @@ class MyFragment : BaseFragment(),
...
@@ -1220,7 +1223,7 @@ class MyFragment : BaseFragment(),
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
...
@@ -1349,48 +1352,6 @@ class MyFragment : BaseFragment(),
...
@@ -1349,48 +1352,6 @@ class MyFragment : BaseFragment(),
mainMyAdapter
?.
setOnItemChildClickListener
(
this
)
mainMyAdapter
?.
setOnItemChildClickListener
(
this
)
}
}
/**
* 设置视频权重
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
videoAdingManager
.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
,
data
.
vedioRules
.
sdhZ_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
,
data
.
vedioRules
.
rtA_VEDIO
.
rate
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
// 广告视频数
AppConfig
.
csjVideoAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
AppConfig
.
rtaVideoAdCount
=
data
.
vedioRules
.
rtA_VEDIO
.
surplus
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount} "
+
"rtaCount:${AppConfig.rtaVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
)
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TurnTableFragment.kt
View file @
cb2ffa05
...
@@ -18,6 +18,7 @@ import com.mints.goodmoney.R
...
@@ -18,6 +18,7 @@ import com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.MokuManager
import
com.mints.goodmoney.manager.MokuManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.ClickTurnBean
import
com.mints.goodmoney.mvp.model.ClickTurnBean
import
com.mints.goodmoney.mvp.model.TurnBean
import
com.mints.goodmoney.mvp.model.TurnBean
...
@@ -129,6 +130,8 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
...
@@ -129,6 +130,8 @@ class TurnTableFragment : BaseFragment(), TurnTableView, AdapterView.OnItemClick
}
}
override
fun
getTurnTableSuc
(
data
:
TurnBean
)
{
override
fun
getTurnTableSuc
(
data
:
TurnBean
)
{
TrackManager
.
getInstance
().
getAdWeight
()
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_THREE
||
if
(
AppConfig
.
fragmentClickFlag
!=
Constant
.
FRAGMENT_CLICK_THREE
||
activity
==
null
||
requireActivity
().
isFinishing
)
{
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
return
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/dialog/DrawcashVideoDialog.kt
View file @
cb2ffa05
...
@@ -108,7 +108,7 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -108,7 +108,7 @@ class DrawcashVideoDialog(activity: Activity) :
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
override
fun
videoAdingListenerFail
(
adType
:
String
)
{
loadVideoFailCount
++
loadVideoFailCount
++
if
(
loadVideoFailCount
>=
2
)
{
if
(
loadVideoFailCount
>=
3
)
{
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
}
else
{
}
else
{
loadVideo
(
videoAdingManager
,
bean
,
false
)
loadVideo
(
videoAdingManager
,
bean
,
false
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/AccessibilityUtils.java
0 → 100644
View file @
cb2ffa05
package
com
.
mints
.
goodmoney
.
utils
;
import
android.content.Context
;
import
android.view.accessibility.AccessibilityManager
;
import
com.mints.goodmoney.MintsApplication
;
/**
* 无障碍服务
*/
public
class
AccessibilityUtils
{
/**
* 判断用户是否开启无障碍服务
*
* @return 0-未开启无障碍功能
* @throws RuntimeException
*/
public
static
int
isAccessibilityEnabled
()
{
try
{
// 检查AccessibilityService是否开启
AccessibilityManager
am
=
(
AccessibilityManager
)
MintsApplication
.
getContext
().
getSystemService
(
Context
.
ACCESSIBILITY_SERVICE
);
boolean
isAccessibilityEnabled_flag
=
am
.
isEnabled
();
return
isAccessibilityEnabled_flag
?
1
:
0
;
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
0
;
// boolean isExploreByTouchEnabled_flag = false;
//
// // 检查无障碍服务是否以语音播报的方式开启
// isExploreByTouchEnabled_flag = isScreenReaderActive(context);
//
// return (isAccessibilityEnabled_flag && isExploreByTouchEnabled_flag);
}
}
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