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
175d5a63
Commit
175d5a63
authored
Jan 15, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
珊瑚激励视频集成
parent
2e5ae5df
Changes
51
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
51 changed files
with
987 additions
and
407 deletions
+987
-407
build.gradle
GoodMoney/app/build.gradle
+16
-16
GDTSDK.tbsNoPlugin.4.290.1160.aar
GoodMoney/app/libs/GDTSDK.tbsNoPlugin.4.290.1160.aar
+0
-0
discovery-2.0.17.aar
GoodMoney/app/libs/discovery-2.0.17.aar
+0
-0
ks_adsdk-2.6.8.aar
GoodMoney/app/libs/ks_adsdk-2.6.8.aar
+0
-0
shanhuAD-1.3.1.aar
GoodMoney/app/libs/shanhuAD-1.3.1.aar
+0
-0
tzsdk_coral-2.1.0-20200807130815-release.aar
...ney/app/libs/tzsdk_coral-2.1.0-20200807130815-release.aar
+0
-0
tzsdk_core-3.0.0-20200807130815-release.aar
...oney/app/libs/tzsdk_core-3.0.0-20200807130815-release.aar
+0
-0
tzsdk_reporter-3.0.0-20200807130815-release.aar
.../app/libs/tzsdk_reporter-3.0.0-20200807130815-release.aar
+0
-0
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+1
-1
CoralDownload.java
...main/java/com/mints/goodmoney/ad/tz_ad/CoralDownload.java
+12
-8
BaseVideoAd.kt
...src/main/java/com/mints/goodmoney/ad/video/BaseVideoAd.kt
+3
-3
CsjVideoAdManager.java
.../java/com/mints/goodmoney/ad/video/CsjVideoAdManager.java
+25
-25
MhVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/MhVideoAdManager.kt
+28
-28
TzVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/TzVideoAdManager.kt
+26
-18
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+523
-0
WnVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/WnVideoAdManager.kt
+28
-28
YlhVideoAdManager.java
.../java/com/mints/goodmoney/ad/video/YlhVideoAdManager.java
+33
-35
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+10
-6
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+2
-1
TzManager.kt
...pp/src/main/java/com/mints/goodmoney/manager/TzManager.kt
+1
-1
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+4
-0
MainVideoMsgBean.java
.../java/com/mints/goodmoney/mvp/model/MainVideoMsgBean.java
+1
-1
VedioRulesBean.java
...in/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
+16
-0
VideoAdingBean.java
...in/java/com/mints/goodmoney/mvp/model/VideoAdingBean.java
+1
-1
HomePresenter.kt
.../java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
+3
-4
HorizChannelPresenter.kt
...m/mints/goodmoney/mvp/presenters/HorizChannelPresenter.kt
+3
-3
KylVideoPresenter.kt
...a/com/mints/goodmoney/mvp/presenters/KylVideoPresenter.kt
+2
-3
MhVedioAdPresenter.kt
.../com/mints/goodmoney/mvp/presenters/MhVedioAdPresenter.kt
+2
-3
TzVideoAdPresenter.kt
.../com/mints/goodmoney/mvp/presenters/TzVideoAdPresenter.kt
+2
-2
WnVideoAdPresenter.kt
.../com/mints/goodmoney/mvp/presenters/WnVideoAdPresenter.kt
+2
-3
YlhVideoAdPresenter.java
...m/mints/goodmoney/mvp/presenters/YlhVideoAdPresenter.java
+2
-2
HomeView.kt
...p/src/main/java/com/mints/goodmoney/mvp/views/HomeView.kt
+2
-2
HorizChannelView.kt
...in/java/com/mints/goodmoney/mvp/views/HorizChannelView.kt
+2
-2
KylVideoView.kt
...c/main/java/com/mints/goodmoney/mvp/views/KylVideoView.kt
+6
-0
VideoAdManagerView.java
...ava/com/mints/goodmoney/mvp/views/VideoAdManagerView.java
+5
-0
LoanService.java
...pp/src/main/java/com/mints/goodmoney/net/LoanService.java
+3
-3
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+25
-25
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+13
-10
KylVideoActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
+51
-52
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+3
-3
MorningClockActivity.kt
.../com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
+22
-22
SettingsActivity.kt
...java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
+1
-1
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+1
-1
HorizonChannelFragment.kt
...com/mints/goodmoney/ui/fragment/HorizonChannelFragment.kt
+5
-5
KuYinYuePageFragment.kt
...a/com/mints/goodmoney/ui/fragment/KuYinYuePageFragment.kt
+3
-5
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+38
-31
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+27
-19
CountDownVideoView.java
...va/com/mints/goodmoney/ui/widgets/CountDownVideoView.java
+11
-11
DrawcashVideoDialog.kt
...ava/com/mints/goodmoney/ui/widgets/DrawcashVideoDialog.kt
+22
-22
activity_kyl_video.xml
GoodMoney/app/src/main/res/layout/activity_kyl_video.xml
+0
-0
layout_red_box.xml
GoodMoney/app/src/main/res/layout/layout_red_box.xml
+1
-1
No files found.
GoodMoney/app/build.gradle
View file @
175d5a63
...
@@ -254,7 +254,7 @@ dependencies {
...
@@ -254,7 +254,7 @@ dependencies {
// 枫岚
// 枫岚
implementation
(
name:
'mh-adsdk'
,
ext:
'aar'
)
implementation
(
name:
'mh-adsdk'
,
ext:
'aar'
)
implementation
(
name:
'mh-adsdk-ext'
,
ext:
'aar'
)
implementation
(
name:
'mh-adsdk-ext'
,
ext:
'aar'
)
//
implementation(name: 'ks_3.3.5.3', ext: 'aar')
implementation
(
name:
'ks_3.3.5.3'
,
ext:
'aar'
)
// 聚乐云
// 聚乐云
implementation
(
name:
'okgo-2.2'
,
ext:
'aar'
)
implementation
(
name:
'okgo-2.2'
,
ext:
'aar'
)
implementation
(
name:
'scenemodule-2.2'
,
ext:
'aar'
)
implementation
(
name:
'scenemodule-2.2'
,
ext:
'aar'
)
...
@@ -264,23 +264,23 @@ dependencies {
...
@@ -264,23 +264,23 @@ dependencies {
// 微转阅读
// 微转阅读
implementation
(
name:
'articlesdk-v1.0.6.202012121917-x'
,
ext:
'aar'
)
implementation
(
name:
'articlesdk-v1.0.6.202012121917-x'
,
ext:
'aar'
)
//天卓SDK的珊瑚2.0组件
//天卓SDK的珊瑚2.0组件
// implementation("com.android.support:support-v4:28.+")
implementation
(
"com.android.support:support-v4:28.+"
)
// implementation(name: 'adapt-1.3.3', ext: 'aar')
// implementation(name: 'commonbase-1.0.2', ext: 'aar')
// implementation(name: 'discovery-2.0.14', ext: 'aar')
// implementation(name: 'shanhuAD.1.2.0', ext: 'aar')
// implementation(name: 'tzsdk_coral-2.0.0-20200807131516-release', ext: 'aar')
// implementation(name: 'tzsdk_core-3.0.0-20200807131516-release', ext: 'aar')
// implementation(name: 'tzsdk_reporter-3.0.0-20200807131516-release', ext: 'aar')
// implementation(name: 'ks_adsdk-2.6.8', ext: 'aar')
implementation
(
name:
'adapt-1.3.3'
,
ext:
'aar'
)
implementation
(
name:
'adapt-1.3.3'
,
ext:
'aar'
)
implementation
(
name:
'commonbase-1.0.2'
,
ext:
'aar'
)
implementation
(
name:
'commonbase-1.0.2'
,
ext:
'aar'
)
implementation
(
name:
'discovery-2.0.17'
,
ext:
'aar'
)
implementation
(
name:
'discovery-2.0.14'
,
ext:
'aar'
)
implementation
(
name:
'shanhuAD-1.3.1'
,
ext:
'aar'
)
implementation
(
name:
'shanhuAD.1.2.0'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_coral-2.1.0-20200807130815-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_coral-2.0.0-20200807131516-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_core-3.0.0-20200807130815-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_core-3.0.0-20200807131516-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_reporter-3.0.0-20200807130815-release'
,
ext:
'aar'
)
implementation
(
name:
'tzsdk_reporter-3.0.0-20200807131516-release'
,
ext:
'aar'
)
// implementation(name: 'ks_adsdk-2.6.8', ext: 'aar')
// implementatiion(name: 'adapt-1.3.3', ext: 'aar')
// implementation(name: 'commonbase-1.0.2', ext: 'aar')
// implementation(name: 'discovery-2.0.17', ext: 'aar')
// implementation(name: 'shanhuAD-1.3.1', ext: 'aar')
// implementation(name: 'tzsdk_coral-2.1.0-20200807130815-release', ext: 'aar')
// implementaton(name: 'tzsdk_core-3.0.0-20200807130815-release', ext: 'aar')
// implementation(name: 'tzsdk_reporter-3.0.0-20200807130815-release', ext: 'aar')
// testImplementation 'junit:junit:4.13'
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
GoodMoney/app/libs/GDTSDK.tbsNoPlugin.4.290.1160.aar
deleted
100755 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/libs/discovery-2.0.17.aar
deleted
100644 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/libs/ks_adsdk-2.6.8.aar
deleted
100644 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/libs/shanhuAD-1.3.1.aar
deleted
100644 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/libs/tzsdk_coral-2.1.0-20200807130815-release.aar
deleted
100644 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/libs/tzsdk_core-3.0.0-20200807130815-release.aar
deleted
100644 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/libs/tzsdk_reporter-3.0.0-20200807130815-release.aar
deleted
100644 → 0
View file @
2e5ae5df
File deleted
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
175d5a63
...
@@ -161,7 +161,7 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -161,7 +161,7 @@ public class MintsApplication extends MultiDexApplication {
// PR下载附件
// PR下载附件
// initPRDownloader();
// initPRDownloader();
// 天卓
// 天卓
珊瑚
TzManager
.
INSTANCE
.
initTz
(
this
);
TzManager
.
INSTANCE
.
initTz
(
this
);
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/tz_ad/CoralDownload.java
View file @
175d5a63
...
@@ -2,6 +2,7 @@ package com.mints.goodmoney.ad.tz_ad;
...
@@ -2,6 +2,7 @@ package com.mints.goodmoney.ad.tz_ad;
import
androidx.annotation.Nullable
;
import
androidx.annotation.Nullable
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.tz.sdk.coral.ad.CoralAD
;
import
com.tz.sdk.coral.ad.CoralAD
;
...
@@ -21,18 +22,21 @@ import java.util.List;
...
@@ -21,18 +22,21 @@ import java.util.List;
*/
*/
public
final
class
CoralDownload
{
public
final
class
CoralDownload
{
public
static
final
int
RELEASE_TASK_TYPE
=
103
;
private
int
mTaskType
;
/**
/**
* taskType 珊瑚的任务类型 103正式环境 134测试环境
* taskType 珊瑚的任务类型 103正式环境 134测试环境
*/
*/
public
CoralDownload
(
int
taskType
)
{
public
static
final
int
RELEASE_TASK_TYPE_DEBUG
=
134
;
mTaskType
=
taskType
;
public
static
final
int
RELEASE_TASK_TYPE_RELEASE
=
103
;
}
public
void
pull
()
{
public
void
pull
()
{
int
type
;
if
(
BuildConfig
.
DEBUG
)
{
type
=
RELEASE_TASK_TYPE_DEBUG
;
}
else
{
type
=
RELEASE_TASK_TYPE_RELEASE
;
}
new
ADLoader
(
MintsApplication
.
getContext
())
new
ADLoader
(
MintsApplication
.
getContext
())
.
get
(
ADType
.
APP_DOWNLOAD
)
.
get
(
ADType
.
APP_DOWNLOAD
)
.
from
(
ADSource
.
CORAL
)
.
from
(
ADSource
.
CORAL
)
...
@@ -40,7 +44,7 @@ public final class CoralDownload {
...
@@ -40,7 +44,7 @@ public final class CoralDownload {
.
reward
(
true
)
.
reward
(
true
)
.
with
(
new
HashMap
<
String
,
Object
>()
{
.
with
(
new
HashMap
<
String
,
Object
>()
{
{
{
put
(
CoralAD
.
Key
.
TASK_TYPE
,
mTaskT
ype
);
put
(
CoralAD
.
Key
.
TASK_TYPE
,
t
ype
);
put
(
CoralAD
.
Key
.
ACCOUNT_ID
,
UserManager
.
getInstance
().
getUserID
());
put
(
CoralAD
.
Key
.
ACCOUNT_ID
,
UserManager
.
getInstance
().
getUserID
());
put
(
CoralAD
.
Key
.
LOGIN_KEY
,
UserManager
.
getInstance
().
getTokenID
());
put
(
CoralAD
.
Key
.
LOGIN_KEY
,
UserManager
.
getInstance
().
getTokenID
());
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edio/BaseVedi
oAd.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ideo/BaseVide
oAd.kt
View file @
175d5a63
package
com.mints.goodmoney.ad.v
edi
o
package
com.mints.goodmoney.ad.v
ide
o
import
android.app.Activity
import
android.app.Activity
import
android.content.DialogInterface
import
android.content.DialogInterface
...
@@ -11,7 +11,7 @@ import com.mints.goodmoney.ui.widgets.LoadingDialog
...
@@ -11,7 +11,7 @@ import com.mints.goodmoney.ui.widgets.LoadingDialog
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.goodmoney.utils.ToastUtil
import
java.util.HashMap
import
java.util.HashMap
open
class
BaseV
edi
oAd
(
activity
:
Activity
)
:
BaseView
{
open
class
BaseV
ide
oAd
(
activity
:
Activity
)
:
BaseView
{
open
var
activity
:
Activity
?
=
null
open
var
activity
:
Activity
?
=
null
var
progressDialog
:
LoadingDialog
?
=
null
var
progressDialog
:
LoadingDialog
?
=
null
...
@@ -111,5 +111,5 @@ open class BaseVedioAd(activity: Activity) : BaseView {
...
@@ -111,5 +111,5 @@ open class BaseVedioAd(activity: Activity) : BaseView {
open
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{}
open
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{}
open
fun
onDest
or
y
()
{}
open
fun
onDest
ro
y
()
{}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edio/CsjVedi
oAdManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ideo/CsjVide
oAdManager.java
View file @
175d5a63
package
com
.
mints
.
goodmoney
.
ad
.
v
edi
o
;
package
com
.
mints
.
goodmoney
.
ad
.
v
ide
o
;
import
android.app.Activity
;
import
android.app.Activity
;
...
@@ -25,13 +25,13 @@ import java.util.HashMap;
...
@@ -25,13 +25,13 @@ import java.util.HashMap;
/**
/**
* 穿山甲激励视频广告
* 穿山甲激励视频广告
*/
*/
public
class
CsjV
edioAdManager
extends
BaseVedi
oAd
{
public
class
CsjV
ideoAdManager
extends
BaseVide
oAd
{
private
static
CsjV
edi
oAdManager
_inst
;
private
static
CsjV
ide
oAdManager
_inst
;
private
AppPreferences
ps
;
private
AppPreferences
ps
;
private
int
curCoin
;
private
int
curCoin
;
private
String
extraId
;
private
String
extraId
;
private
CsjV
edioAdListener
csjVedi
oAdListener
;
private
CsjV
ideoAdListener
csjVide
oAdListener
;
Activity
activity
;
Activity
activity
;
private
TTAdNative
ttAdNative
;
private
TTAdNative
ttAdNative
;
...
@@ -40,16 +40,16 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -40,16 +40,16 @@ public class CsjVedioAdManager extends BaseVedioAd {
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
public
static
CsjV
edi
oAdManager
getInstance
(
Activity
activity
)
{
public
static
CsjV
ide
oAdManager
getInstance
(
Activity
activity
)
{
if
(
_inst
!=
null
)
{
if
(
_inst
!=
null
)
{
return
_inst
;
return
_inst
;
}
else
{
}
else
{
_inst
=
new
CsjV
edi
oAdManager
(
activity
);
_inst
=
new
CsjV
ide
oAdManager
(
activity
);
return
_inst
;
return
_inst
;
}
}
}
}
private
CsjV
edi
oAdManager
(
Activity
activity
)
{
private
CsjV
ide
oAdManager
(
Activity
activity
)
{
super
(
activity
);
super
(
activity
);
init
(
activity
);
init
(
activity
);
}
}
...
@@ -64,7 +64,7 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -64,7 +64,7 @@ public class CsjVedioAdManager extends BaseVedioAd {
}
}
@Override
@Override
public
void
onDest
or
y
()
{
public
void
onDest
ro
y
()
{
if
(
mttRewardVideoAd
!=
null
)
{
if
(
mttRewardVideoAd
!=
null
)
{
mttRewardVideoAd
.
setRewardAdInteractionListener
(
null
);
mttRewardVideoAd
.
setRewardAdInteractionListener
(
null
);
}
}
...
@@ -148,9 +148,9 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -148,9 +148,9 @@ public class CsjVedioAdManager extends BaseVedioAd {
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
LogUtil
.
d
(
"
CsjVedioAdManag
er"
,
"onError "
+
code
+
message
);
LogUtil
.
d
(
"
csjVideoAdListen
er"
,
"onError "
+
code
+
message
);
if
(
csjV
edi
oAdListener
!=
null
)
{
if
(
csjV
ide
oAdListener
!=
null
)
{
csjV
edioAdListener
.
csjVedi
oAdFail
();
csjV
ideoAdListener
.
csjVide
oAdFail
();
}
}
}
}
...
@@ -163,8 +163,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -163,8 +163,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
}
else
{
}
else
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Cached Fail"
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Cached Fail"
);
if
(
csjV
edi
oAdListener
!=
null
)
{
if
(
csjV
ide
oAdListener
!=
null
)
{
csjV
edioAdListener
.
csjVedi
oAdFail
();
csjV
ideoAdListener
.
csjVide
oAdFail
();
}
}
}
}
}
}
...
@@ -196,8 +196,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -196,8 +196,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
);
isClickScreen
=
false
;
isClickScreen
=
false
;
}
}
if
(
csjV
edi
oAdListener
!=
null
)
{
if
(
csjV
ide
oAdListener
!=
null
)
{
csjV
edioAdListener
.
csjVedi
oDownload
();
csjV
ideoAdListener
.
csjVide
oDownload
();
}
}
}
}
...
@@ -205,8 +205,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -205,8 +205,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
public
void
onAdClose
()
{
public
void
onAdClose
()
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
if
(
csjV
edi
oAdListener
!=
null
)
{
if
(
csjV
ide
oAdListener
!=
null
)
{
csjV
edioAdListener
.
csjVedi
oAdSuccess
();
csjV
ideoAdListener
.
csjVide
oAdSuccess
();
}
}
}
}
...
@@ -218,8 +218,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -218,8 +218,8 @@ public class CsjVedioAdManager extends BaseVedioAd {
public
void
onVideoError
()
{
public
void
onVideoError
()
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"VideoError"
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"VideoError"
);
if
(
csjV
edi
oAdListener
!=
null
)
{
if
(
csjV
ide
oAdListener
!=
null
)
{
csjV
edioAdListener
.
csjVedi
oAdFail
();
csjV
ideoAdListener
.
csjVide
oAdFail
();
}
}
}
}
...
@@ -298,15 +298,15 @@ public class CsjVedioAdManager extends BaseVedioAd {
...
@@ -298,15 +298,15 @@ public class CsjVedioAdManager extends BaseVedioAd {
return
vo
;
return
vo
;
}
}
public
void
setCsjV
edioAdListener
(
CsjVedioAdListener
csjVedi
oAdListener
)
{
public
void
setCsjV
ideoAdListener
(
CsjVideoAdListener
csjVide
oAdListener
)
{
this
.
csjV
edioAdListener
=
csjVedi
oAdListener
;
this
.
csjV
ideoAdListener
=
csjVide
oAdListener
;
}
}
public
interface
CsjV
edi
oAdListener
{
public
interface
CsjV
ide
oAdListener
{
void
csjV
edi
oAdFail
();
void
csjV
ide
oAdFail
();
void
csjV
edi
oAdSuccess
();
void
csjV
ide
oAdSuccess
();
void
csjV
edi
oDownload
();
void
csjV
ide
oDownload
();
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edio/MhVedi
oAdManager.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ideo/MhVide
oAdManager.kt
View file @
175d5a63
package
com.mints.goodmoney.ad.v
edi
o
package
com.mints.goodmoney.ad.v
ide
o
import
android.app.Activity
import
android.app.Activity
import
com.maplehaze.adsdk.video.RewardVideoAd
import
com.maplehaze.adsdk.video.RewardVideoAd
...
@@ -6,32 +6,32 @@ import com.mints.goodmoney.common.AppConfig
...
@@ -6,32 +6,32 @@ import com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.MhManager
import
com.mints.goodmoney.manager.MhManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.mvp.presenters.MhV
edi
oAdPresenter
import
com.mints.goodmoney.mvp.presenters.MhV
ide
oAdPresenter
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
private
val
TAG
=
MhV
edi
oAdManager
::
class
.
java
.
simpleName
private
val
TAG
=
MhV
ide
oAdManager
::
class
.
java
.
simpleName
/**
/**
* 枫岚广告视频
* 枫岚广告视频
*/
*/
class
MhV
edi
oAdManager
private
constructor
(
activity
:
Activity
)
:
class
MhV
ide
oAdManager
private
constructor
(
activity
:
Activity
)
:
BaseV
edioAd
(
activity
),
Vedi
oAdManagerView
{
BaseV
ideoAd
(
activity
),
Vide
oAdManagerView
{
private
var
mhV
dedioAdPresenter
:
MhVedi
oAdPresenter
?
=
null
private
var
mhV
ideoAdPresenter
:
MhVide
oAdPresenter
?
=
null
private
var
mhV
edioAdListener
:
MhVedi
oAdListener
?
=
null
private
var
mhV
ideoAdListener
:
MhVide
oAdListener
?
=
null
private
var
mRewardVideoAd
:
RewardVideoAd
?
=
null
private
var
mRewardVideoAd
:
RewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
override
var
activity
:
Activity
?
=
null
override
var
activity
:
Activity
?
=
null
companion
object
{
companion
object
{
private
var
_inst
:
MhV
edi
oAdManager
?
=
null
private
var
_inst
:
MhV
ide
oAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
MhV
edi
oAdManager
?
{
fun
getInstance
(
activity
:
Activity
):
MhV
ide
oAdManager
?
{
return
if
(
_inst
!=
null
)
{
return
if
(
_inst
!=
null
)
{
_inst
_inst
}
else
{
}
else
{
_inst
=
MhV
edi
oAdManager
(
activity
)
_inst
=
MhV
ide
oAdManager
(
activity
)
_inst
_inst
}
}
}
}
...
@@ -43,8 +43,8 @@ class MhVedioAdManager private constructor(activity: Activity) :
...
@@ -43,8 +43,8 @@ class MhVedioAdManager private constructor(activity: Activity) :
private
fun
init
(
activity
:
Activity
)
{
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
this
.
activity
=
activity
mhV
dedioAdPresenter
=
MhVedi
oAdPresenter
()
mhV
ideoAdPresenter
=
MhVide
oAdPresenter
()
mhV
dedi
oAdPresenter
?.
attachView
(
this
)
mhV
ide
oAdPresenter
?.
attachView
(
this
)
}
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
...
@@ -88,8 +88,8 @@ class MhVedioAdManager private constructor(activity: Activity) :
...
@@ -88,8 +88,8 @@ class MhVedioAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
isClickScreen
=
false
}
}
if
(
mhV
edi
oAdListener
!=
null
)
{
if
(
mhV
ide
oAdListener
!=
null
)
{
mhV
edioAdListener
?.
mhVedi
oAdDownload
()
mhV
ideoAdListener
?.
mhVide
oAdDownload
()
}
}
}
}
...
@@ -100,12 +100,12 @@ class MhVedioAdManager private constructor(activity: Activity) :
...
@@ -100,12 +100,12 @@ class MhVedioAdManager private constructor(activity: Activity) :
override
fun
onADClose
()
{
override
fun
onADClose
()
{
LogUtil
.
d
(
TAG
,
"onADClose"
)
LogUtil
.
d
(
TAG
,
"onADClose"
)
mhV
dedi
oAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_FL
,
extraId
,
curCoin
))
mhV
ide
oAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_FL
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
if
(
mhV
edi
oAdListener
!=
null
)
{
if
(
mhV
ide
oAdListener
!=
null
)
{
mhV
edioAdListener
?.
mhVedi
oAdSuccess
()
mhV
ideoAdListener
?.
mhVide
oAdSuccess
()
}
}
}
}
...
@@ -114,8 +114,8 @@ class MhVedioAdManager private constructor(activity: Activity) :
...
@@ -114,8 +114,8 @@ class MhVedioAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
""
)
if
(
mhV
edi
oAdListener
!=
null
)
{
if
(
mhV
ide
oAdListener
!=
null
)
{
mhV
edioAdListener
?.
mhVedi
oAdFail
()
mhV
ideoAdListener
?.
mhVide
oAdFail
()
}
}
}
}
...
@@ -124,18 +124,18 @@ class MhVedioAdManager private constructor(activity: Activity) :
...
@@ -124,18 +124,18 @@ class MhVedioAdManager private constructor(activity: Activity) :
mRewardVideoAd
?.
loadAd
()
mRewardVideoAd
?.
loadAd
()
}
}
fun
setMhV
edioAdListener
(
mhVedioAdListener
:
MhVedi
oAdListener
?)
{
fun
setMhV
ideoAdListener
(
mhVideoAdListener
:
MhVide
oAdListener
?)
{
this
.
mhV
edioAdListener
=
mhVedi
oAdListener
this
.
mhV
ideoAdListener
=
mhVide
oAdListener
}
}
interface
MhV
edi
oAdListener
{
interface
MhV
ide
oAdListener
{
fun
mhV
edi
oAdSuccess
()
fun
mhV
ide
oAdSuccess
()
fun
mhV
edi
oAdFail
()
fun
mhV
ide
oAdFail
()
fun
mhV
edi
oAdDownload
()
fun
mhV
ide
oAdDownload
()
}
}
override
fun
onDest
or
y
()
{
override
fun
onDest
ro
y
()
{
mhV
dedi
oAdPresenter
?.
let
{
mhV
ide
oAdPresenter
?.
let
{
it
.
dispose
()
it
.
dispose
()
it
.
detachView
()
it
.
detachView
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edi
o/TzVideoAdManager.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ide
o/TzVideoAdManager.kt
View file @
175d5a63
package
com.mints.goodmoney.ad.v
edi
o
package
com.mints.goodmoney.ad.v
ide
o
import
android.app.Activity
import
android.app.Activity
import
androidx.annotation.Nullable
import
androidx.annotation.Nullable
import
com.mints.goodmoney.BuildConfig
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.TrackManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.presenters.TzVideoAdPresenter
import
com.mints.goodmoney.mvp.presenters.TzVideoAdPresenter
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.tz.sdk.coral.ad.CoralAD
import
com.tz.sdk.coral.ad.CoralAD
import
com.tz.sdk.coral.callback.CoralVideoListener
import
com.tz.sdk.coral.callback.CoralVideoListener
...
@@ -19,10 +20,10 @@ import com.tz.sdk.core.loader.ADLoader
...
@@ -19,10 +20,10 @@ import com.tz.sdk.core.loader.ADLoader
private
val
TAG
=
TzVideoAdManager
::
class
.
java
.
simpleName
private
val
TAG
=
TzVideoAdManager
::
class
.
java
.
simpleName
/**
/**
* 天卓广告视频
* 天卓
珊瑚
广告视频
*/
*/
class
TzVideoAdManager
private
constructor
(
activity
:
Activity
)
:
class
TzVideoAdManager
private
constructor
(
activity
:
Activity
)
:
BaseV
edioAd
(
activity
),
Vedi
oAdManagerView
{
BaseV
ideoAd
(
activity
),
Vide
oAdManagerView
{
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
...
@@ -36,7 +37,8 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -36,7 +37,8 @@ class TzVideoAdManager private constructor(activity: Activity) :
* 104(正式环境使用,珊瑚和广点通、快手视频混出)
* 104(正式环境使用,珊瑚和广点通、快手视频混出)
* 131(测试环境使用,广点通视频单出)
* 131(测试环境使用,广点通视频单出)
*/
*/
const
val
TZ_REWRAD_TYPE
=
132
const
val
TZ_REWRAD_TYPE_DEBUG
=
131
const
val
TZ_REWRAD_TYPE_RELEASE
=
104
private
var
_inst
:
TzVideoAdManager
?
=
null
private
var
_inst
:
TzVideoAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
TzVideoAdManager
?
{
fun
getInstance
(
activity
:
Activity
):
TzVideoAdManager
?
{
...
@@ -63,6 +65,12 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -63,6 +65,12 @@ class TzVideoAdManager private constructor(activity: Activity) :
this
.
activity
=
activity
this
.
activity
=
activity
isClickScreen
=
true
isClickScreen
=
true
val
type
=
if
(
BuildConfig
.
DEBUG
)
{
TZ_REWRAD_TYPE_DEBUG
}
else
{
TZ_REWRAD_TYPE_RELEASE
}
ADLoader
(
activity
)
ADLoader
(
activity
)
.
get
(
ADType
.
REWARD_VIDEO
)
.
get
(
ADType
.
REWARD_VIDEO
)
.
from
(
ADSource
.
CORAL
)
.
from
(
ADSource
.
CORAL
)
...
@@ -70,7 +78,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -70,7 +78,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
.
count
(
1
)
.
count
(
1
)
.
with
(
object
:
HashMap
<
String
?,
Any
?>()
{
.
with
(
object
:
HashMap
<
String
?,
Any
?>()
{
init
{
init
{
put
(
CoralAD
.
Key
.
TASK_TYPE
,
TZ_REWRAD_TYPE
)
put
(
CoralAD
.
Key
.
TASK_TYPE
,
type
)
put
(
CoralAD
.
Key
.
ACCOUNT_ID
,
UserManager
.
getInstance
().
userID
)
put
(
CoralAD
.
Key
.
ACCOUNT_ID
,
UserManager
.
getInstance
().
userID
)
put
(
CoralAD
.
Key
.
LOGIN_KEY
,
UserManager
.
getInstance
().
tokenID
)
put
(
CoralAD
.
Key
.
LOGIN_KEY
,
UserManager
.
getInstance
().
tokenID
)
// put(CoralAD.Key.VIDEO_AUTO_PLAY, true) //拉取成功后是否自动播放视频,非必须,默认true
// put(CoralAD.Key.VIDEO_AUTO_PLAY, true) //拉取成功后是否自动播放视频,非必须,默认true
...
@@ -80,18 +88,18 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -80,18 +88,18 @@ class TzVideoAdManager private constructor(activity: Activity) :
override
fun
onAdLoaded
(
adList
:
List
<
CoralAD
>?)
{
override
fun
onAdLoaded
(
adList
:
List
<
CoralAD
>?)
{
LogUtil
.
d
(
TAG
,
"onAdLoaded"
)
LogUtil
.
d
(
TAG
,
"onAdLoaded"
)
if
(
adList
!=
null
&&
adList
.
isNotEmpty
())
{
//
if (adList != null && adList.isNotEmpty()) {
val
ad
=
adList
[
0
]
//
val ad = adList[0]
// ad.playVideo(activity)
// ad.playVideo(activity)
}
else
{
//
} else {
//
}
//
}
}
}
override
fun
onAdFailed
(
adError
:
ADError
)
{
override
fun
onAdFailed
(
adError
:
ADError
)
{
LogUtil
.
d
(
TAG
,
"onAdFailed"
)
LogUtil
.
d
(
TAG
,
"onAdFailed"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
TZ
,
Constant
.
EVENT_TYPE_ONE
,
(
adError
.
code
).
toString
(),
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
SH
,
Constant
.
EVENT_TYPE_ONE
,
(
adError
.
code
).
toString
(),
""
)
if
(
tzVideoAdListener
!=
null
)
{
if
(
tzVideoAdListener
!=
null
)
{
tzVideoAdListener
?.
tzVideoAdFail
()
tzVideoAdListener
?.
tzVideoAdFail
()
...
@@ -101,7 +109,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -101,7 +109,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
override
fun
onAdShow
(
@Nullable
ad
:
CoralAD
?):
Boolean
{
override
fun
onAdShow
(
@Nullable
ad
:
CoralAD
?):
Boolean
{
LogUtil
.
d
(
TAG
,
"onAdShow"
)
LogUtil
.
d
(
TAG
,
"onAdShow"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
TZ
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
SH
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
return
super
.
onAdShow
(
ad
)
return
super
.
onAdShow
(
ad
)
}
}
...
@@ -114,7 +122,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -114,7 +122,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
if
(
isClickScreen
)
{
if
(
isClickScreen
)
{
// 防止重复
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
FL
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
SH
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
isClickScreen
=
false
}
}
if
(
tzVideoAdListener
!=
null
)
{
if
(
tzVideoAdListener
!=
null
)
{
...
@@ -157,9 +165,9 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -157,9 +165,9 @@ class TzVideoAdManager private constructor(activity: Activity) :
override
fun
onVideoClosed
(
@Nullable
coralAD
:
CoralAD
?,
@Nullable
s
:
String
?):
Boolean
{
override
fun
onVideoClosed
(
@Nullable
coralAD
:
CoralAD
?,
@Nullable
s
:
String
?):
Boolean
{
LogUtil
.
d
(
TAG
,
"onVideoClosed"
)
LogUtil
.
d
(
TAG
,
"onVideoClosed"
)
tzVideoAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_
TZ
,
extraId
,
curCoin
))
tzVideoAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_
SH
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
TZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_
SH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
if
(
tzVideoAdListener
!=
null
)
{
if
(
tzVideoAdListener
!=
null
)
{
tzVideoAdListener
?.
tzVideoAdSuccess
()
tzVideoAdListener
?.
tzVideoAdSuccess
()
...
@@ -171,7 +179,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -171,7 +179,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
}
}
fun
setTzV
edi
oAdListener
(
tzVideoAdListener
:
TzVideoAdListener
?)
{
fun
setTzV
ide
oAdListener
(
tzVideoAdListener
:
TzVideoAdListener
?)
{
this
.
tzVideoAdListener
=
tzVideoAdListener
this
.
tzVideoAdListener
=
tzVideoAdListener
}
}
...
@@ -181,7 +189,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
...
@@ -181,7 +189,7 @@ class TzVideoAdManager private constructor(activity: Activity) :
fun
tzVideoAdDownload
()
fun
tzVideoAdDownload
()
}
}
override
fun
onDest
or
y
()
{
override
fun
onDest
ro
y
()
{
tzVideoAdPresenter
?.
let
{
tzVideoAdPresenter
?.
let
{
it
.
dispose
()
it
.
dispose
()
it
.
detachView
()
it
.
detachView
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edio/Vedi
oAdingManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ideo/Vide
oAdingManager.java
View file @
175d5a63
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edio/WnVedi
oAdManager.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ideo/WnVide
oAdManager.kt
View file @
175d5a63
package
com.mints.goodmoney.ad.v
edi
o
package
com.mints.goodmoney.ad.v
ide
o
import
android.app.Activity
import
android.app.Activity
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.TrackManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.manager.WnManager
import
com.mints.goodmoney.manager.WnManager
import
com.mints.goodmoney.mvp.presenters.WnV
edi
oAdPresenter
import
com.mints.goodmoney.mvp.presenters.WnV
ide
oAdPresenter
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.wannuosili.sdk.*
import
com.wannuosili.sdk.*
private
val
TAG
=
WnV
edi
oAdManager
::
class
.
java
.
simpleName
private
val
TAG
=
WnV
ide
oAdManager
::
class
.
java
.
simpleName
/**
/**
* 闪电盒子视频
* 闪电盒子视频
*/
*/
class
WnV
edi
oAdManager
private
constructor
(
activity
:
Activity
)
:
class
WnV
ide
oAdManager
private
constructor
(
activity
:
Activity
)
:
BaseV
edioAd
(
activity
),
Vedi
oAdManagerView
{
BaseV
ideoAd
(
activity
),
Vide
oAdManagerView
{
private
var
wnV
edioAdPresenter
:
WnVedi
oAdPresenter
?
=
null
private
var
wnV
ideoAdPresenter
:
WnVide
oAdPresenter
?
=
null
private
var
wnV
edioAdListener
:
WnVedi
oAdListener
?
=
null
private
var
wnV
ideoAdListener
:
WnVide
oAdListener
?
=
null
private
var
mRewardVideoAd
:
WNRewardVideoAd
?
=
null
private
var
mRewardVideoAd
:
WNRewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
override
var
activity
:
Activity
?
=
null
override
var
activity
:
Activity
?
=
null
companion
object
{
companion
object
{
private
var
_inst
:
WnV
edi
oAdManager
?
=
null
private
var
_inst
:
WnV
ide
oAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
WnV
edi
oAdManager
?
{
fun
getInstance
(
activity
:
Activity
):
WnV
ide
oAdManager
?
{
return
if
(
_inst
!=
null
)
{
return
if
(
_inst
!=
null
)
{
_inst
_inst
}
else
{
}
else
{
_inst
=
WnV
edi
oAdManager
(
activity
)
_inst
=
WnV
ide
oAdManager
(
activity
)
_inst
_inst
}
}
}
}
...
@@ -43,8 +43,8 @@ class WnVedioAdManager private constructor(activity: Activity) :
...
@@ -43,8 +43,8 @@ class WnVedioAdManager private constructor(activity: Activity) :
private
fun
init
(
activity
:
Activity
)
{
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
this
.
activity
=
activity
wnV
edioAdPresenter
=
WnVedi
oAdPresenter
()
wnV
ideoAdPresenter
=
WnVide
oAdPresenter
()
wnV
edi
oAdPresenter
?.
attachView
(
this
)
wnV
ide
oAdPresenter
?.
attachView
(
this
)
}
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
...
@@ -69,8 +69,8 @@ class WnVedioAdManager private constructor(activity: Activity) :
...
@@ -69,8 +69,8 @@ class WnVedioAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_ONE
,
(
code
).
toString
(),
message
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_ONE
,
(
code
).
toString
(),
message
)
if
(
wnV
edi
oAdListener
!=
null
)
{
if
(
wnV
ide
oAdListener
!=
null
)
{
wnV
edioAdListener
?.
wnVedi
oAdFail
()
wnV
ideoAdListener
?.
wnVide
oAdFail
()
}
}
}
}
...
@@ -92,18 +92,18 @@ class WnVedioAdManager private constructor(activity: Activity) :
...
@@ -92,18 +92,18 @@ class WnVedioAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
isClickScreen
=
false
}
}
if
(
wnV
edi
oAdListener
!=
null
)
{
if
(
wnV
ide
oAdListener
!=
null
)
{
wnV
edioAdListener
?.
wnVedi
oAdDownload
()
wnV
ideoAdListener
?.
wnVide
oAdDownload
()
}
}
}
}
override
fun
onAdClose
()
{
override
fun
onAdClose
()
{
wnV
edi
oAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_SDHZ
,
extraId
,
curCoin
))
wnV
ide
oAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_SDHZ
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
if
(
wnV
edi
oAdListener
!=
null
)
{
if
(
wnV
ide
oAdListener
!=
null
)
{
wnV
edioAdListener
?.
wnVedi
oAdSuccess
()
wnV
ideoAdListener
?.
wnVide
oAdSuccess
()
}
}
}
}
...
@@ -130,18 +130,18 @@ class WnVedioAdManager private constructor(activity: Activity) :
...
@@ -130,18 +130,18 @@ class WnVedioAdManager private constructor(activity: Activity) :
})
})
}
}
fun
setWnV
edioAdListener
(
wnVedioAdListener
:
WnVedi
oAdListener
?)
{
fun
setWnV
ideoAdListener
(
wnVideoAdListener
:
WnVide
oAdListener
?)
{
this
.
wnV
edioAdListener
=
wnVedi
oAdListener
this
.
wnV
ideoAdListener
=
wnVide
oAdListener
}
}
interface
WnV
edi
oAdListener
{
interface
WnV
ide
oAdListener
{
fun
wnV
edi
oAdSuccess
()
fun
wnV
ide
oAdSuccess
()
fun
wnV
edi
oAdFail
()
fun
wnV
ide
oAdFail
()
fun
wnV
edi
oAdDownload
()
fun
wnV
ide
oAdDownload
()
}
}
override
fun
onDest
or
y
()
{
override
fun
onDest
ro
y
()
{
wnV
edi
oAdPresenter
?.
let
{
wnV
ide
oAdPresenter
?.
let
{
it
.
dispose
()
it
.
dispose
()
it
.
detachView
()
it
.
detachView
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
edio/YlhVedi
oAdManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/v
ideo/YlhVide
oAdManager.java
View file @
175d5a63
package
com
.
mints
.
goodmoney
.
ad
.
v
edi
o
;
package
com
.
mints
.
goodmoney
.
ad
.
v
ide
o
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.os.SystemClock
;
import
android.os.SystemClock
;
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.manager.TrackManager
;
import
com.mints.goodmoney.manager.TrackManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.mvp.presenters.YlhV
edi
oAdPresenter
;
import
com.mints.goodmoney.mvp.presenters.YlhV
ide
oAdPresenter
;
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
;
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.comm.util.AdError
;
import
com.qq.e.comm.util.AdError
;
...
@@ -19,30 +17,30 @@ import com.qq.e.comm.util.AdError;
...
@@ -19,30 +17,30 @@ import com.qq.e.comm.util.AdError;
/**
/**
* 优量汇视频
* 优量汇视频
*/
*/
public
class
YlhV
edioAdManager
extends
BaseVedioAd
implements
Vedi
oAdManagerView
{
public
class
YlhV
ideoAdManager
extends
BaseVideoAd
implements
Vide
oAdManagerView
{
private
static
YlhV
edi
oAdManager
_inst
;
private
static
YlhV
ide
oAdManager
_inst
;
// 优量汇激励视频
// 优量汇激励视频
private
RewardVideoAD
rewardVideoAD
;
private
RewardVideoAD
rewardVideoAD
;
private
YlhV
edioAdPresenter
ylhVedi
oAdPresenter
;
private
YlhV
ideoAdPresenter
ylhVide
oAdPresenter
;
private
YlhV
edioAdListener
ylhVedi
oAdListener
;
private
YlhV
ideoAdListener
ylhVide
oAdListener
;
Activity
activity
;
Activity
activity
;
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
public
static
YlhV
edi
oAdManager
getInstance
(
Activity
activity
)
{
public
static
YlhV
ide
oAdManager
getInstance
(
Activity
activity
)
{
if
(
_inst
!=
null
)
{
if
(
_inst
!=
null
)
{
return
_inst
;
return
_inst
;
}
else
{
}
else
{
_inst
=
new
YlhV
edi
oAdManager
(
activity
);
_inst
=
new
YlhV
ide
oAdManager
(
activity
);
return
_inst
;
return
_inst
;
}
}
}
}
private
YlhV
edi
oAdManager
(
Activity
activity
)
{
private
YlhV
ide
oAdManager
(
Activity
activity
)
{
super
(
activity
);
super
(
activity
);
init
(
activity
);
init
(
activity
);
}
}
...
@@ -50,15 +48,15 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -50,15 +48,15 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
private
void
init
(
Activity
activity
)
{
private
void
init
(
Activity
activity
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
ylhV
edioAdPresenter
=
new
YlhVedi
oAdPresenter
();
ylhV
ideoAdPresenter
=
new
YlhVide
oAdPresenter
();
ylhV
edi
oAdPresenter
.
attachView
(
this
);
ylhV
ide
oAdPresenter
.
attachView
(
this
);
}
}
@Override
@Override
public
void
onDest
or
y
()
{
public
void
onDest
ro
y
()
{
if
(
ylhV
edi
oAdPresenter
!=
null
)
{
if
(
ylhV
ide
oAdPresenter
!=
null
)
{
ylhV
edi
oAdPresenter
.
dispose
();
ylhV
ide
oAdPresenter
.
dispose
();
ylhV
edi
oAdPresenter
.
detachView
();
ylhV
ide
oAdPresenter
.
detachView
();
}
}
activity
=
null
;
activity
=
null
;
...
@@ -157,8 +155,8 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -157,8 +155,8 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
e
.
printStackTrace
();
e
.
printStackTrace
();
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Load Fail"
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Load Fail"
);
if
(
ylhV
edi
oAdListener
!=
null
)
{
if
(
ylhV
ide
oAdListener
!=
null
)
{
ylhV
edioAdListener
.
ylhVedi
oAdFail
();
ylhV
ideoAdListener
.
ylhVide
oAdFail
();
}
}
}
}
}
}
...
@@ -182,7 +180,7 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -182,7 +180,7 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
@Override
@Override
public
void
onReward
()
{
//激励视频广告激励发放
public
void
onReward
()
{
//激励视频广告激励发放
// if (activity != null) {
// if (activity != null) {
// ylhV
edi
oAdPresenter.reportAddCoinMsg(activity, getAdMapVO(carrierType));
// ylhV
ide
oAdPresenter.reportAddCoinMsg(activity, getAdMapVO(carrierType));
// }
// }
}
}
...
@@ -199,8 +197,8 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -199,8 +197,8 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
);
isClickScreen
=
false
;
isClickScreen
=
false
;
}
}
if
(
ylhV
edi
oAdListener
!=
null
)
{
if
(
ylhV
ide
oAdListener
!=
null
)
{
ylhV
edioAdListener
.
ylhVedi
oAdDownload
();
ylhV
ideoAdListener
.
ylhVide
oAdDownload
();
}
}
}
}
...
@@ -213,10 +211,10 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -213,10 +211,10 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
public
void
onADClose
()
{
//激励视频广告被关闭
public
void
onADClose
()
{
//激励视频广告被关闭
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
ylhV
edi
oAdPresenter
.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_YLH
,
extraId
,
curCoin
));
ylhV
ide
oAdPresenter
.
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_YLH
,
extraId
,
curCoin
));
if
(
ylhV
edi
oAdListener
!=
null
)
{
if
(
ylhV
ide
oAdListener
!=
null
)
{
ylhV
edioAdListener
.
ylhVedi
oAdSuccess
();
ylhV
ideoAdListener
.
ylhVide
oAdSuccess
();
}
}
}
}
...
@@ -224,13 +222,13 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -224,13 +222,13 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
public
void
onError
(
AdError
adError
)
{
//广告流程出错,AdError中包含错误码和错误描述
public
void
onError
(
AdError
adError
)
{
//广告流程出错,AdError中包含错误码和错误描述
if
(
adError
!=
null
)
{
if
(
adError
!=
null
)
{
LogUtil
.
d
(
"YlhV
edi
oAdManager"
,
"onError "
+
adError
.
getErrorCode
()
+
adError
.
getErrorMsg
());
LogUtil
.
d
(
"YlhV
ide
oAdManager"
,
"onError "
+
adError
.
getErrorCode
()
+
adError
.
getErrorMsg
());
// 0 成功 1失败 2点击 3-有效展示
// 0 成功 1失败 2点击 3-有效展示
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
adError
.
getErrorCode
()),
adError
.
getErrorMsg
());
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
adError
.
getErrorCode
()),
adError
.
getErrorMsg
());
}
}
if
(
ylhV
edi
oAdListener
!=
null
)
{
if
(
ylhV
ide
oAdListener
!=
null
)
{
ylhV
edioAdListener
.
ylhVedi
oAdFail
();
ylhV
ideoAdListener
.
ylhVide
oAdFail
();
}
}
}
}
});
});
...
@@ -238,15 +236,15 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
...
@@ -238,15 +236,15 @@ public class YlhVedioAdManager extends BaseVedioAd implements VedioAdManagerView
rewardVideoAD
.
loadAD
();
rewardVideoAD
.
loadAD
();
}
}
public
void
setYlhV
edioAdListener
(
YlhVedioAdListener
ylhVedi
oAdListener
)
{
public
void
setYlhV
ideoAdListener
(
YlhVideoAdListener
ylhVide
oAdListener
)
{
this
.
ylhV
edioAdListener
=
ylhVedi
oAdListener
;
this
.
ylhV
ideoAdListener
=
ylhVide
oAdListener
;
}
}
public
interface
YlhV
edi
oAdListener
{
public
interface
YlhV
ide
oAdListener
{
void
ylhV
edi
oAdFail
();
void
ylhV
ide
oAdFail
();
void
ylhV
edi
oAdSuccess
();
void
ylhV
ide
oAdSuccess
();
void
ylhV
edi
oAdDownload
();
void
ylhV
ide
oAdDownload
();
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
175d5a63
...
@@ -64,17 +64,21 @@ public class AppConfig {
...
@@ -64,17 +64,21 @@ public class AppConfig {
*/
*/
public
static
int
ylhAdCount
=
5
;
public
static
int
ylhAdCount
=
5
;
/**
/**
* csjV
edi
o 剩余广告播放数
* csjV
ide
o 剩余广告播放数
*/
*/
public
static
int
csjV
edi
oAdCount
=
5
;
public
static
int
csjV
ide
oAdCount
=
5
;
/**
/**
* wnV
edi
o 剩余广告播放数
* wnV
ide
o 剩余广告播放数
*/
*/
public
static
int
wnV
edi
oAdCount
=
5
;
public
static
int
wnV
ide
oAdCount
=
5
;
/**
/**
* flV
edi
o 剩余广告播放数
* flV
ide
o 剩余广告播放数
*/
*/
public
static
int
flVedioAdCount
=
5
;
public
static
int
flVideoAdCount
=
5
;
/**
* shVideo 剩余广告播放数
*/
public
static
int
shVideoAdCount
=
5
;
/**
/**
* 高额试玩任务标识
* 高额试玩任务标识
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
175d5a63
...
@@ -138,7 +138,7 @@ object Constant {
...
@@ -138,7 +138,7 @@ object Constant {
const
val
AD_SOURCE_YLH
=
"YLH"
const
val
AD_SOURCE_YLH
=
"YLH"
const
val
AD_SOURCE_SDHZ
=
"SDHZ"
//闪电盒子
const
val
AD_SOURCE_SDHZ
=
"SDHZ"
//闪电盒子
const
val
AD_SOURCE_FL
=
"FL"
//枫岚
const
val
AD_SOURCE_FL
=
"FL"
//枫岚
const
val
AD_SOURCE_
TZ
=
"TZ
"
//天卓
const
val
AD_SOURCE_
SH
=
"SH
"
//天卓
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const
val
EVENT_TYPE_ZERO
=
"0"
const
val
EVENT_TYPE_ZERO
=
"0"
...
@@ -158,6 +158,7 @@ object Constant {
...
@@ -158,6 +158,7 @@ object Constant {
const
val
YLH_VEDIO_AD
=
"YLH_VEDIO_AD"
const
val
YLH_VEDIO_AD
=
"YLH_VEDIO_AD"
const
val
SDHZ_VEDIO_AD
=
"SDHZ_VEDIO_AD"
const
val
SDHZ_VEDIO_AD
=
"SDHZ_VEDIO_AD"
const
val
FL_VEDIO_AD
=
"Fl_VEDIO_AD"
const
val
FL_VEDIO_AD
=
"Fl_VEDIO_AD"
const
val
SH_VEDIO_AD
=
"SH_VEDIO_AD"
// 游戏类型
// 游戏类型
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TzManager.kt
View file @
175d5a63
...
@@ -9,7 +9,7 @@ import com.tz.sdk.core.engine.ADEngineConfig
...
@@ -9,7 +9,7 @@ import com.tz.sdk.core.engine.ADEngineConfig
import
com.tz.sdk.core.engine.IADEngineState
import
com.tz.sdk.core.engine.IADEngineState
/**
/**
* 描述:天卓激励视频
* 描述:天卓
珊瑚
激励视频
*/
*/
object
TzManager
{
object
TzManager
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
175d5a63
...
@@ -84,7 +84,11 @@ public class DrawcashBean implements Serializable {
...
@@ -84,7 +84,11 @@ public class DrawcashBean implements Serializable {
private
int
CSJ_VEDIO
;
private
int
CSJ_VEDIO
;
private
int
YLH_VEDIO
;
private
int
YLH_VEDIO
;
private
int
FL_VEDIO
;
private
int
FL_VEDIO
;
private
int
CORAL_VEDIO
;
public
int
getCORAL_VEDIO
()
{
return
CORAL_VEDIO
;
}
public
int
getSDHZ_VEDIO
()
{
public
int
getSDHZ_VEDIO
()
{
return
SDHZ_VEDIO
;
return
SDHZ_VEDIO
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/MainV
edi
oMsgBean.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/MainV
ide
oMsgBean.java
View file @
175d5a63
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.mvp.model;
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.mvp.model;
import
java.io.Serializable
;
import
java.io.Serializable
;
public
class
MainV
edi
oMsgBean
implements
Serializable
{
public
class
MainV
ide
oMsgBean
implements
Serializable
{
private
boolean
toCreateReward
;
private
boolean
toCreateReward
;
private
int
rewardDoubleCoin
;
private
int
rewardDoubleCoin
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
View file @
175d5a63
...
@@ -8,6 +8,7 @@ public class VedioRulesBean implements Serializable {
...
@@ -8,6 +8,7 @@ public class VedioRulesBean implements Serializable {
private
YlhVedioBean
YLH_VEDIO
;
private
YlhVedioBean
YLH_VEDIO
;
private
SdhzVedioBean
SDHZ_VEDIO
;
private
SdhzVedioBean
SDHZ_VEDIO
;
private
FLVedioBean
FL_VEDIO
;
private
FLVedioBean
FL_VEDIO
;
private
CORALVedioBean
CORAL_VEDIO
;
private
boolean
flVideoFlag
;
private
boolean
flVideoFlag
;
public
class
CsjVedioBean
implements
Serializable
{
public
class
CsjVedioBean
implements
Serializable
{
...
@@ -62,6 +63,19 @@ public class VedioRulesBean implements Serializable {
...
@@ -62,6 +63,19 @@ public class VedioRulesBean implements Serializable {
}
}
}
}
public
class
CORALVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
public
int
getSurplus
()
{
return
surplus
;
}
public
int
getRate
()
{
return
rate
;
}
}
public
FLVedioBean
getFL_VEDIO
()
{
public
FLVedioBean
getFL_VEDIO
()
{
return
FL_VEDIO
;
return
FL_VEDIO
;
}
}
...
@@ -78,6 +92,8 @@ public class VedioRulesBean implements Serializable {
...
@@ -78,6 +92,8 @@ public class VedioRulesBean implements Serializable {
return
SDHZ_VEDIO
;
return
SDHZ_VEDIO
;
}
}
public
CORALVedioBean
getCORAl_VIDEO
()
{
return
CORAL_VEDIO
;
}
public
boolean
isFlVideoFlag
()
{
public
boolean
isFlVideoFlag
()
{
return
flVideoFlag
;
return
flVideoFlag
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/V
edi
oAdingBean.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/V
ide
oAdingBean.java
View file @
175d5a63
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.mvp.model;
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.mvp.model;
import
java.io.Serializable
;
import
java.io.Serializable
;
public
class
V
edi
oAdingBean
implements
Serializable
{
public
class
V
ide
oAdingBean
implements
Serializable
{
private
int
downloadCoin
;
private
int
downloadCoin
;
private
int
curCoin
;
private
int
curCoin
;
private
String
carrierType
;
private
String
carrierType
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/HomePresenter.kt
View file @
175d5a63
...
@@ -2,11 +2,10 @@ package com.mints.goodmoney.mvp.presenters
...
@@ -2,11 +2,10 @@ package com.mints.goodmoney.mvp.presenters
import
android.text.TextUtils
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.DeviceInfo
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.MainV
edi
oMsgBean
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.model.UserBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.views.HomeView
import
com.mints.goodmoney.mvp.views.HomeView
...
@@ -92,7 +91,7 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -92,7 +91,7 @@ class HomePresenter : BasePresenter<HomeView>() {
fun
getHomeVedioMsg
()
{
fun
getHomeVedioMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getHomeVedioMsg
(),
.
call
(
loanService
.
getHomeVedioMsg
(),
object
:
BaseSubscriber
<
BaseResponse
<
MainV
edi
oMsgBean
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
MainV
ide
oMsgBean
>>()
{
override
fun
onCompleted
()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
}
}
...
@@ -101,7 +100,7 @@ class HomePresenter : BasePresenter<HomeView>() {
...
@@ -101,7 +100,7 @@ class HomePresenter : BasePresenter<HomeView>() {
if
(
isLinkView
)
return
if
(
isLinkView
)
return
}
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MainV
edi
oMsgBean
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MainV
ide
oMsgBean
>)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
code
=
baseResponse
.
getStatus
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/HorizChannelPresenter.kt
View file @
175d5a63
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.mvp.presenters
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.mvp.presenters
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.MainV
edi
oMsgBean
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
import
com.mints.goodmoney.mvp.views.HorizChannelView
import
com.mints.goodmoney.mvp.views.HorizChannelView
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
...
@@ -13,7 +13,7 @@ class HorizChannelPresenter : BasePresenter<HorizChannelView>() {
...
@@ -13,7 +13,7 @@ class HorizChannelPresenter : BasePresenter<HorizChannelView>() {
fun
getSmallHomeVedioBaseMsg
()
{
fun
getSmallHomeVedioBaseMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
smallHomeVedioBaseMsg
,
.
call
(
loanService
.
smallHomeVedioBaseMsg
,
object
:
BaseSubscriber
<
BaseResponse
<
MainV
edi
oMsgBean
>>()
{
object
:
BaseSubscriber
<
BaseResponse
<
MainV
ide
oMsgBean
>>()
{
override
fun
onCompleted
()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
}
}
...
@@ -22,7 +22,7 @@ class HorizChannelPresenter : BasePresenter<HorizChannelView>() {
...
@@ -22,7 +22,7 @@ class HorizChannelPresenter : BasePresenter<HorizChannelView>() {
if
(
isLinkView
)
return
if
(
isLinkView
)
return
}
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MainV
edi
oMsgBean
>)
{
override
fun
onNext
(
baseResponse
:
BaseResponse
<
MainV
ide
oMsgBean
>)
{
if
(
isLinkView
)
return
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
val
code
=
baseResponse
.
getStatus
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/KylV
edi
oPresenter.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/KylV
ide
oPresenter.kt
View file @
175d5a63
...
@@ -3,13 +3,12 @@ package com.mints.goodmoney.mvp.presenters
...
@@ -3,13 +3,12 @@ package com.mints.goodmoney.mvp.presenters
import
com.google.gson.JsonObject
import
com.google.gson.JsonObject
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.manager.AppHttpManager
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.views.BookView
import
com.mints.goodmoney.mvp.views.KylVideoView
import
com.mints.goodmoney.mvp.views.KylVedioView
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
import
java.util.*
import
java.util.*
class
KylV
edioPresenter
:
BasePresenter
<
KylVedi
oView
>()
{
class
KylV
ideoPresenter
:
BasePresenter
<
KylVide
oView
>()
{
fun
addReadSeconds
(
seconds
:
Int
)
{
fun
addReadSeconds
(
seconds
:
Int
)
{
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MhVedioAdPresenter.kt
View file @
175d5a63
...
@@ -3,14 +3,13 @@ package com.mints.goodmoney.mvp.presenters
...
@@ -3,14 +3,13 @@ package com.mints.goodmoney.mvp.presenters
import
android.app.Activity
import
android.app.Activity
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
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
import
rx.Subscription
import
rx.android.schedulers.AndroidSchedulers
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
import
java.util.*
class
MhV
edioAdPresenter
:
BasePresenter
<
Vedi
oAdManagerView
>()
{
class
MhV
ideoAdPresenter
:
BasePresenter
<
Vide
oAdManagerView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
if
(
activity
==
null
)
return
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/TzVideoAdPresenter.kt
View file @
175d5a63
...
@@ -3,14 +3,14 @@ package com.mints.goodmoney.mvp.presenters
...
@@ -3,14 +3,14 @@ package com.mints.goodmoney.mvp.presenters
import
android.app.Activity
import
android.app.Activity
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
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
import
rx.Subscription
import
rx.Subscription
import
rx.android.schedulers.AndroidSchedulers
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
import
java.util.*
class
TzVideoAdPresenter
:
BasePresenter
<
V
edi
oAdManagerView
>()
{
class
TzVideoAdPresenter
:
BasePresenter
<
V
ide
oAdManagerView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
if
(
activity
==
null
)
return
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/WnV
edi
oAdPresenter.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/WnV
ide
oAdPresenter.kt
View file @
175d5a63
...
@@ -3,14 +3,13 @@ package com.mints.goodmoney.mvp.presenters
...
@@ -3,14 +3,13 @@ package com.mints.goodmoney.mvp.presenters
import
android.app.Activity
import
android.app.Activity
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.model.BaseResponse
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
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
import
rx.Subscription
import
rx.android.schedulers.AndroidSchedulers
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
import
java.util.*
class
WnV
edioAdPresenter
:
BasePresenter
<
Vedi
oAdManagerView
>()
{
class
WnV
ideoAdPresenter
:
BasePresenter
<
Vide
oAdManagerView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
if
(
activity
==
null
)
return
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/YlhV
edi
oAdPresenter.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/YlhV
ide
oAdPresenter.java
View file @
175d5a63
...
@@ -4,7 +4,7 @@ import android.app.Activity;
...
@@ -4,7 +4,7 @@ import android.app.Activity;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.model.BaseResponse
;
import
com.mints.goodmoney.mvp.views.V
edi
oAdManagerView
;
import
com.mints.goodmoney.mvp.views.V
ide
oAdManagerView
;
import
com.mints.goodmoney.net.LoanService
;
import
com.mints.goodmoney.net.LoanService
;
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
;
...
@@ -14,7 +14,7 @@ import java.util.HashMap;
...
@@ -14,7 +14,7 @@ import java.util.HashMap;
import
rx.Subscription
;
import
rx.Subscription
;
import
rx.android.schedulers.AndroidSchedulers
;
import
rx.android.schedulers.AndroidSchedulers
;
public
class
YlhV
edioAdPresenter
extends
BasePresenter
<
Vedi
oAdManagerView
>
{
public
class
YlhV
ideoAdPresenter
extends
BasePresenter
<
Vide
oAdManagerView
>
{
private
MintsApplication
loanApplication
;
private
MintsApplication
loanApplication
;
private
LoanService
loanService
;
private
LoanService
loanService
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/HomeView.kt
View file @
175d5a63
package
com.mints.goodmoney.mvp.views
package
com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.MainV
edi
oMsgBean
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
interface
HomeView
:
BaseView
{
interface
HomeView
:
BaseView
{
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
fun
getHomeVedioMsgSuc
(
data
:
MainV
edi
oMsgBean
)
fun
getHomeVedioMsgSuc
(
data
:
MainV
ide
oMsgBean
)
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/HorizChannelView.kt
View file @
175d5a63
package
com.mints.goodmoney.mvp.views
package
com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.MainV
edi
oMsgBean
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
interface
HorizChannelView
:
BaseView
{
interface
HorizChannelView
:
BaseView
{
fun
getHomeVedioMsgSuc
(
data
:
MainV
edi
oMsgBean
)
fun
getHomeVedioMsgSuc
(
data
:
MainV
ide
oMsgBean
)
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/KylV
edi
oView.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/KylV
ide
oView.kt
View file @
175d5a63
package
com.mints.goodmoney.mvp.views
package
com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.AccountMsgBean
interface
KylV
edi
oView
:
BaseView
{
interface
KylV
ide
oView
:
BaseView
{
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/V
edi
oAdManagerView.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/V
ide
oAdManagerView.java
View file @
175d5a63
package
com
.
mints
.
goodmoney
.
mvp
.
views
;
package
com
.
mints
.
goodmoney
.
mvp
.
views
;
public
interface
V
edi
oAdManagerView
extends
BaseView
{
public
interface
V
ide
oAdManagerView
extends
BaseView
{
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/net/LoanService.java
View file @
175d5a63
...
@@ -13,7 +13,7 @@ import com.mints.goodmoney.mvp.model.FriendHallMsgBean;
...
@@ -13,7 +13,7 @@ import com.mints.goodmoney.mvp.model.FriendHallMsgBean;
import
com.mints.goodmoney.mvp.model.GoldRecordBean
;
import
com.mints.goodmoney.mvp.model.GoldRecordBean
;
import
com.mints.goodmoney.mvp.model.KylTabBean
;
import
com.mints.goodmoney.mvp.model.KylTabBean
;
import
com.mints.goodmoney.mvp.model.KylVedioBean
;
import
com.mints.goodmoney.mvp.model.KylVedioBean
;
import
com.mints.goodmoney.mvp.model.MainV
edi
oMsgBean
;
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
;
import
com.mints.goodmoney.mvp.model.MealBean
;
import
com.mints.goodmoney.mvp.model.MealBean
;
import
com.mints.goodmoney.mvp.model.MorningClockBean
;
import
com.mints.goodmoney.mvp.model.MorningClockBean
;
import
com.mints.goodmoney.mvp.model.MyInfo
;
import
com.mints.goodmoney.mvp.model.MyInfo
;
...
@@ -292,7 +292,7 @@ public interface LoanService {
...
@@ -292,7 +292,7 @@ public interface LoanService {
* @return
* @return
*/
*/
@POST
(
"api/getHomeVedioBaseMsg"
)
@POST
(
"api/getHomeVedioBaseMsg"
)
Observable
<
BaseResponse
<
MainV
edi
oMsgBean
>>
getHomeVedioMsg
();
Observable
<
BaseResponse
<
MainV
ide
oMsgBean
>>
getHomeVedioMsg
();
/**
/**
* 横版视频信息
* 横版视频信息
...
@@ -300,7 +300,7 @@ public interface LoanService {
...
@@ -300,7 +300,7 @@ public interface LoanService {
* @return
* @return
*/
*/
@POST
(
"api/getSmallHomeVedioBaseMsg"
)
@POST
(
"api/getSmallHomeVedioBaseMsg"
)
Observable
<
BaseResponse
<
MainV
edi
oMsgBean
>>
getSmallHomeVedioBaseMsg
();
Observable
<
BaseResponse
<
MainV
ide
oMsgBean
>>
getSmallHomeVedioBaseMsg
();
/**
/**
* 小说阅读时长
* 小说阅读时长
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
175d5a63
...
@@ -6,12 +6,12 @@ import android.view.KeyEvent
...
@@ -6,12 +6,12 @@ import android.view.KeyEvent
import
android.view.View
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.Companion.instance
import
com.mints.goodmoney.common.DeviceInfo.Companion.instance
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.V
edi
oAdingBean
import
com.mints.goodmoney.mvp.model.V
ide
oAdingBean
import
com.mints.goodmoney.mvp.presenters.AwardPresenter
import
com.mints.goodmoney.mvp.presenters.AwardPresenter
import
com.mints.goodmoney.mvp.views.AwardView
import
com.mints.goodmoney.mvp.views.AwardView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
...
@@ -34,13 +34,13 @@ import java.util.*
...
@@ -34,13 +34,13 @@ import java.util.*
*/
*/
class
AwardActivity
:
BaseActivity
(),
AwardView
,
View
.
OnClickListener
{
class
AwardActivity
:
BaseActivity
(),
AwardView
,
View
.
OnClickListener
{
private
lateinit
var
v
edioAdingManager
:
Vedi
oAdingManager
private
lateinit
var
v
ideoAdingManager
:
Vide
oAdingManager
private
val
awardPresenter
by
lazy
{
AwardPresenter
()
}
private
val
awardPresenter
by
lazy
{
AwardPresenter
()
}
private
var
mTimer
:
CountDownTimerSupport
?
=
null
private
var
mTimer
:
CountDownTimerSupport
?
=
null
private
var
curCoin
=
0
//传入金币
private
var
curCoin
=
0
//传入金币
private
var
extraId
=
""
//传入key
private
var
extraId
=
""
//传入key
private
var
carrierType
=
""
//传入载体
private
var
carrierType
=
""
//传入载体
private
var
loadV
edi
oFailCount
=
0
// 视频失败次数
private
var
loadV
ide
oFailCount
=
0
// 视频失败次数
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_award
...
@@ -53,7 +53,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -53,7 +53,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
awardPresenter
.
attachView
(
this
)
awardPresenter
.
attachView
(
this
)
v
edioAdingManager
=
Vedi
oAdingManager
.
getInstance
(
this
)
v
ideoAdingManager
=
Vide
oAdingManager
.
getInstance
(
this
)
if
(!
AppConfig
.
app_black_flag
)
{
if
(!
AppConfig
.
app_black_flag
)
{
// 首次进行黑名单校验
// 首次进行黑名单校验
...
@@ -347,8 +347,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -347,8 +347,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
PreLoadExpressManager
.
onDestroy
()
PreLoadExpressManager
.
onDestroy
()
flAwardAd
?.
removeAllViews
()
flAwardAd
?.
removeAllViews
()
v
edioAdingManager
.
setVedi
oAdingListener
(
null
)
v
ideoAdingManager
.
setVide
oAdingListener
(
null
)
v
edi
oAdingManager
.
onDestory
()
v
ide
oAdingManager
.
onDestory
()
awardPresenter
.
detachView
()
awardPresenter
.
detachView
()
}
}
...
@@ -371,12 +371,12 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -371,12 +371,12 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_EATMEAL_SUBSIDY
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_EATMEAL_SUBSIDY
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
awardV
edi
o
()
awardV
ide
o
()
}
}
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
,
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
,
Constant
.
CARRIER_BLESSINGBAG_DOUBLE
,
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
,
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
,
Constant
.
CARRIER_SMALLHOMEVEDIO_DOUBLE
,
Constant
.
CARRIER_RUISHINEWS_DOUBLE
->
{
Constant
.
CARRIER_HOMEVEDIO_DOUBLE
,
Constant
.
CARRIER_SMALLHOMEVEDIO_DOUBLE
,
Constant
.
CARRIER_RUISHINEWS_DOUBLE
->
{
pushUmengEvent
()
pushUmengEvent
()
awardV
edi
o
()
awardV
ide
o
()
}
}
Constant
.
CARRIER_NEW_VISITOR
->
{
Constant
.
CARRIER_NEW_VISITOR
->
{
readyGoThenKill
(
WxLoginActivity
::
class
.
java
)
readyGoThenKill
(
WxLoginActivity
::
class
.
java
)
...
@@ -392,53 +392,53 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -392,53 +392,53 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
/**
/**
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardV
edi
o
()
{
private
fun
awardV
ide
o
()
{
if
(
v
edioAdingManager
.
getVedi
oFinishFlag
())
{
if
(
v
ideoAdingManager
.
getVide
oFinishFlag
())
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
showLoading
(
"加载中..."
)
showLoading
(
"加载中..."
)
val
bean
=
V
edi
oAdingBean
()
val
bean
=
V
ide
oAdingBean
()
bean
.
setCarrierType
(
carrierType
)
bean
.
setCarrierType
(
carrierType
)
bean
.
setCurCoin
(
curCoin
)
bean
.
setCurCoin
(
curCoin
)
bean
.
setExtraId
(
extraId
)
bean
.
setExtraId
(
extraId
)
loadV
edio
(
vedi
oAdingManager
,
bean
,
true
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
true
)
}
}
/**
/**
* 加载激励视频
* 加载激励视频
*/
*/
private
fun
loadV
edio
(
vedioAdingManager
:
VedioAdingManager
,
bean
:
Vedi
oAdingBean
,
isFirstLoad
:
Boolean
)
{
private
fun
loadV
ideo
(
videoAdingManager
:
VideoAdingManager
,
bean
:
Vide
oAdingBean
,
isFirstLoad
:
Boolean
)
{
v
edioAdingManager
.
setVedioAdingListener
(
object
:
VedioAdingManager
.
Vedi
oAdingListener
{
v
ideoAdingManager
.
setVideoAdingListener
(
object
:
VideoAdingManager
.
Vide
oAdingListener
{
override
fun
v
edi
oAdingListenerError
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerError
(
adType
:
String
)
{
showToast
(
"加载超时,请休息一下"
)
showToast
(
"加载超时,请休息一下"
)
hideLoading
()
hideLoading
()
}
}
override
fun
v
edi
oAdingListenerFail
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerFail
(
adType
:
String
)
{
loadV
edi
oFailCount
++
loadV
ide
oFailCount
++
if
(
loadV
edi
oFailCount
>=
2
)
{
if
(
loadV
ide
oFailCount
>=
2
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
loadV
edio
(
vedi
oAdingManager
,
bean
,
false
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
false
)
}
}
}
}
override
fun
v
edi
oAdingListenerSuccess
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerSuccess
(
adType
:
String
)
{
hideLoading
()
hideLoading
()
v
edi
oAdingSuccess
(
adType
)
v
ide
oAdingSuccess
(
adType
)
}
}
})
})
if
(
isFirstLoad
)
{
if
(
isFirstLoad
)
{
// 首页按权重加载
// 首页按权重加载
v
edi
oAdingManager
.
loadAding
(
this
,
bean
)
v
ide
oAdingManager
.
loadAding
(
this
,
bean
)
}
else
{
}
else
{
// 失败按优先级加载
// 失败按优先级加载
v
edi
oAdingManager
.
loadFailAding
(
this
,
bean
)
v
ide
oAdingManager
.
loadFailAding
(
this
,
bean
)
}
}
}
}
...
@@ -507,7 +507,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -507,7 +507,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
/**
/**
* 广告返回结果
* 广告返回结果
*/
*/
private
fun
v
edi
oAdingSuccess
(
adType
:
String
)
{
private
fun
v
ide
oAdingSuccess
(
adType
:
String
)
{
setAdFinshLayout
()
setAdFinshLayout
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
175d5a63
...
@@ -8,7 +8,7 @@ import androidx.recyclerview.widget.GridLayoutManager
...
@@ -8,7 +8,7 @@ import androidx.recyclerview.widget.GridLayoutManager
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.login.LoginApi
import
com.mints.goodmoney.login.LoginApi
...
@@ -21,7 +21,6 @@ import com.mints.goodmoney.mvp.views.DrawcashView
...
@@ -21,7 +21,6 @@ import com.mints.goodmoney.mvp.views.DrawcashView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.adapter.DrawcashAdapter
import
com.mints.goodmoney.ui.adapter.DrawcashAdapter
import
com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import
com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
import
com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.DrawcashVideoDialog
import
com.mints.goodmoney.ui.widgets.DrawcashVideoDialog
import
com.mints.goodmoney.ui.widgets.JDTintDialog
import
com.mints.goodmoney.ui.widgets.JDTintDialog
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
...
@@ -45,7 +44,7 @@ class DrawcashActivity : BaseActivity(),
...
@@ -45,7 +44,7 @@ class DrawcashActivity : BaseActivity(),
private
var
drawcashVideoDialog
:
DrawcashVideoDialog
?
=
null
private
var
drawcashVideoDialog
:
DrawcashVideoDialog
?
=
null
private
lateinit
var
vedioAdingManager
:
V
edi
oAdingManager
private
lateinit
var
vedioAdingManager
:
V
ide
oAdingManager
private
val
drawcashPresenter
by
lazy
{
DrawcashPresenter
()
}
private
val
drawcashPresenter
by
lazy
{
DrawcashPresenter
()
}
private
lateinit
var
drawcashAdapter
:
DrawcashAdapter
private
lateinit
var
drawcashAdapter
:
DrawcashAdapter
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
...
@@ -74,7 +73,7 @@ class DrawcashActivity : BaseActivity(),
...
@@ -74,7 +73,7 @@ class DrawcashActivity : BaseActivity(),
tvDrawJd
.
setOnCheckedChangeListener
(
this
)
tvDrawJd
.
setOnCheckedChangeListener
(
this
)
view_title
.
text
=
"提现规则"
view_title
.
text
=
"提现规则"
vedioAdingManager
=
V
edi
oAdingManager
.
getInstance
(
this
)
vedioAdingManager
=
V
ide
oAdingManager
.
getInstance
(
this
)
drawcashPresenter
.
attachView
(
this
)
drawcashPresenter
.
attachView
(
this
)
initListener
()
initListener
()
}
}
...
@@ -299,14 +298,18 @@ class DrawcashActivity : BaseActivity(),
...
@@ -299,14 +298,18 @@ class DrawcashActivity : BaseActivity(),
* 设置视频权重
* 设置视频权重
*/
*/
private
fun
initAdWeight
(
data
:
DrawcashBean
.
VedioRules
)
{
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
,
data
.
fL_VEDIO
,
data
.
coraL_VEDIO
)
// vedioAdingManager?.initAdWeight(data.csJ_VEDIO, data.ylH_VEDIO, data.sdhZ_VEDIO)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} "
+
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} ylhWeight:${data.ylH_VEDIO} sdhzWeight:${data.sdhZ_VEDIO} flWeight:${data.fL_VEDIO}"
)
"ylhWeight:${data.ylH_VEDIO} "
+
"sdhzWeight:${data.sdhZ_VEDIO} "
+
"shWeight:${data.coraL_VEDIO} "
+
"flWeight:${data.fL_VEDIO}"
)
// 广告视频数
// 广告视频数
AppConfig
.
csjV
edi
oAdCount
=
10
AppConfig
.
csjV
ide
oAdCount
=
10
AppConfig
.
ylhAdCount
=
10
AppConfig
.
ylhAdCount
=
10
AppConfig
.
wnVedioAdCount
=
10
AppConfig
.
wnVideoAdCount
=
10
AppConfig
.
flVedioAdCount
=
10
AppConfig
.
flVideoAdCount
=
10
AppConfig
.
shVideoAdCount
=
10
}
}
/**
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylV
edi
oActivity.kt
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylV
ide
oActivity.kt
View file @
175d5a63
...
@@ -9,72 +9,71 @@ import com.downloader.Error
...
@@ -9,72 +9,71 @@ import com.downloader.Error
import
com.downloader.OnDownloadListener
import
com.downloader.OnDownloadListener
import
com.downloader.PRDownloader
import
com.downloader.PRDownloader
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.VedioAdingBean
import
com.mints.goodmoney.mvp.model.VideoAdingBean
import
com.mints.goodmoney.mvp.presenters.GamePresenter
import
com.mints.goodmoney.mvp.presenters.KylVideoPresenter
import
com.mints.goodmoney.mvp.presenters.KylVedioPresenter
import
com.mints.goodmoney.mvp.views.KylVideoView
import
com.mints.goodmoney.mvp.views.KylVedioView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.CacheUtil
import
com.mints.goodmoney.utils.CacheUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.MD5
import
com.mints.goodmoney.utils.MD5
import
kotlinx.android.synthetic.main.activity_kyl_v
edi
o.*
import
kotlinx.android.synthetic.main.activity_kyl_v
ide
o.*
/**
/**
* 描述:酷音乐视频
* 描述:酷音乐视频
* 作者:孟崔广
* 作者:孟崔广
* 时间:2021/1/4 15:09
* 时间:2021/1/4 15:09
*/
*/
class
KylV
edioActivity
:
BaseActivity
(),
View
.
OnClickListener
,
KylVedi
oView
{
class
KylV
ideoActivity
:
BaseActivity
(),
View
.
OnClickListener
,
KylVide
oView
{
companion
object
{
companion
object
{
const
val
V
EDIO_URL
=
"vedi
o_url"
const
val
V
IDEO_URL
=
"vide
o_url"
}
}
private
lateinit
var
v
edi
oUrl
:
String
private
lateinit
var
v
ide
oUrl
:
String
private
val
kylV
edioPresenter
by
lazy
{
KylVedi
oPresenter
()
}
private
val
kylV
ideoPresenter
by
lazy
{
KylVide
oPresenter
()
}
private
lateinit
var
v
edioAdingManager
:
Vedi
oAdingManager
private
lateinit
var
v
ideoAdingManager
:
Vide
oAdingManager
private
var
loadV
edi
oFailCount
=
0
private
var
loadV
ide
oFailCount
=
0
private
val
videoWallpaper
by
lazy
{
VideoWallpaper
()
}
private
val
videoWallpaper
by
lazy
{
VideoWallpaper
()
}
private
var
downloadId
:
Int
=
-
1
//v
edi
o下载id
private
var
downloadId
:
Int
=
-
1
//v
ide
o下载id
private
var
downloadV
edi
oSucFlag
=
false
// 下载视频成功
private
var
downloadV
ide
oSucFlag
=
false
// 下载视频成功
private
var
cachePath
=
""
// cache路径
private
var
cachePath
=
""
// cache路径
private
var
v
edi
oName
=
""
// 视频名称
private
var
v
ide
oName
=
""
// 视频名称
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_kyl_v
edi
o
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_kyl_v
ide
o
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
override
fun
getBundleExtras
(
extras
:
Bundle
?)
{
super
.
getBundleExtras
(
extras
)
super
.
getBundleExtras
(
extras
)
extras
?.
let
{
extras
?.
let
{
v
edioUrl
=
it
.
getString
(
VEDI
O_URL
,
""
)
v
ideoUrl
=
it
.
getString
(
VIDE
O_URL
,
""
)
}
}
}
}
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
if
(
TextUtils
.
isEmpty
(
v
edi
oUrl
))
{
if
(
TextUtils
.
isEmpty
(
v
ide
oUrl
))
{
showToast
(
"加载失败,请稍后重试."
)
showToast
(
"加载失败,请稍后重试."
)
finish
()
finish
()
return
return
}
}
cachePath
=
cacheDir
.
path
+
"/"
cachePath
=
cacheDir
.
path
+
"/"
v
edioAdingManager
=
Vedi
oAdingManager
.
getInstance
(
this
)
v
ideoAdingManager
=
Vide
oAdingManager
.
getInstance
(
this
)
initListener
()
initListener
()
loadV
edio
(
vedi
oUrl
)
loadV
ideo
(
vide
oUrl
)
}
}
private
fun
loadV
edio
(
vedi
oUrl
:
String
)
{
private
fun
loadV
ideo
(
vide
oUrl
:
String
)
{
jzvdStd
?.
setUp
(
v
edi
oUrl
,
""
)
jzvdStd
?.
setUp
(
v
ide
oUrl
,
""
)
jzvdStd
?.
startVideo
()
jzvdStd
?.
startVideo
()
// jzvdStd.setV
edi
oRestart(false)
// jzvdStd.setV
ide
oRestart(false)
// jzvdStd.setJzV
edioStatusListener(object : JZVideoPlayerStandardLoopVideo.JZVedi
oStatusListener {
// jzvdStd.setJzV
ideoStatusListener(object : JZVideoPlayerStandardLoopVideo.JZVide
oStatusListener {
// override fun jzV
edi
oPlaying() {
// override fun jzV
ide
oPlaying() {
// }
// }
// })
// })
}
}
...
@@ -112,22 +111,22 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
...
@@ -112,22 +111,22 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
//删除缓存文件
//删除缓存文件
CacheUtil
.
clearAllCache
(
context
)
CacheUtil
.
clearAllCache
(
context
)
kylV
edi
oPresenter
.
detachView
()
kylV
ide
oPresenter
.
detachView
()
}
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
R
.
id
.
ivBack
->
finish
()
R
.
id
.
ivBack
->
finish
()
R
.
id
.
ivSetting
->
{
R
.
id
.
ivSetting
->
{
awardV
edi
o
()
awardV
ide
o
()
downloadV
edi
oToCacheFile
()
downloadV
ide
oToCacheFile
()
}
}
}
}
}
}
private
fun
downloadV
edi
oToCacheFile
()
{
private
fun
downloadV
ide
oToCacheFile
()
{
v
edi
oName
=
MD5
.
GetMD5Code
(
System
.
currentTimeMillis
().
toString
()
+
UserManager
.
getInstance
().
userID
)
+
".mp4"
v
ide
oName
=
MD5
.
GetMD5Code
(
System
.
currentTimeMillis
().
toString
()
+
UserManager
.
getInstance
().
userID
)
+
".mp4"
downloadId
=
PRDownloader
.
download
(
v
edioUrl
,
cachePath
,
vedi
oName
)
downloadId
=
PRDownloader
.
download
(
v
ideoUrl
,
cachePath
,
vide
oName
)
.
build
()
.
build
()
// .setOnStartOrResumeListener { }
// .setOnStartOrResumeListener { }
// .setOnPauseListener {
// .setOnPauseListener {
...
@@ -138,7 +137,7 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
...
@@ -138,7 +137,7 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
// }
// }
.
start
(
object
:
OnDownloadListener
{
.
start
(
object
:
OnDownloadListener
{
override
fun
onDownloadComplete
()
{
override
fun
onDownloadComplete
()
{
downloadV
edi
oSucFlag
=
true
downloadV
ide
oSucFlag
=
true
}
}
override
fun
onError
(
error
:
Error
)
{
override
fun
onError
(
error
:
Error
)
{
...
@@ -155,59 +154,59 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
...
@@ -155,59 +154,59 @@ class KylVedioActivity : BaseActivity(), View.OnClickListener, KylVedioView {
/**
/**
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardV
edi
o
()
{
private
fun
awardV
ide
o
()
{
if
(
v
edioAdingManager
.
vedi
oFinishFlag
)
{
if
(
v
ideoAdingManager
.
vide
oFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
loadV
edi
oFailCount
=
0
loadV
ide
oFailCount
=
0
showLoading
(
"加载中..."
)
showLoading
(
"加载中..."
)
val
bean
=
V
edi
oAdingBean
()
val
bean
=
V
ide
oAdingBean
()
bean
.
carrierType
=
Constant
.
CARRIER_KUYINYUE_VEDIO
bean
.
carrierType
=
Constant
.
CARRIER_KUYINYUE_VEDIO
loadV
edio
(
vedi
oAdingManager
,
bean
,
true
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
true
)
}
}
/**
/**
* 加载激励视频
* 加载激励视频
*/
*/
private
fun
loadV
edio
(
vedioAdingManager
:
VedioAdingManager
,
bean
:
Vedi
oAdingBean
,
isFirstLoad
:
Boolean
)
{
private
fun
loadV
ideo
(
videoAdingManager
:
VideoAdingManager
,
bean
:
Vide
oAdingBean
,
isFirstLoad
:
Boolean
)
{
v
edioAdingManager
.
setVedioAdingListener
(
object
:
VedioAdingManager
.
Vedi
oAdingListener
{
v
ideoAdingManager
.
setVideoAdingListener
(
object
:
VideoAdingManager
.
Vide
oAdingListener
{
override
fun
v
edi
oAdingListenerError
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerError
(
adType
:
String
)
{
showToast
(
"加载超时,请休息一下"
)
showToast
(
"加载超时,请休息一下"
)
hideLoading
()
hideLoading
()
}
}
override
fun
v
edi
oAdingListenerFail
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerFail
(
adType
:
String
)
{
loadV
edi
oFailCount
++
loadV
ide
oFailCount
++
if
(
loadV
edi
oFailCount
>=
2
)
{
if
(
loadV
ide
oFailCount
>=
2
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
loadV
edio
(
vedi
oAdingManager
,
bean
,
false
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
false
)
}
}
}
}
override
fun
v
edi
oAdingListenerSuccess
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerSuccess
(
adType
:
String
)
{
hideLoading
()
hideLoading
()
v
edi
oAdingSuccess
(
adType
)
v
ide
oAdingSuccess
(
adType
)
}
}
})
})
if
(
isFirstLoad
)
{
if
(
isFirstLoad
)
{
// 首页按权重加载
// 首页按权重加载
v
edi
oAdingManager
.
loadAding
(
this
,
bean
)
v
ide
oAdingManager
.
loadAding
(
this
,
bean
)
}
else
{
}
else
{
// 失败按优先级加载
// 失败按优先级加载
v
edi
oAdingManager
.
loadFailAding
(
this
,
bean
)
v
ide
oAdingManager
.
loadFailAding
(
this
,
bean
)
}
}
}
}
private
fun
v
edi
oAdingSuccess
(
adType
:
String
)
{
private
fun
v
ide
oAdingSuccess
(
adType
:
String
)
{
if
(
downloadV
edi
oSucFlag
)
{
if
(
downloadV
ide
oSucFlag
)
{
LogUtil
.
d
(
"KylV
edioActivity"
,
"name:-->"
+
cachePath
+
vedi
oName
)
LogUtil
.
d
(
"KylV
ideoActivity"
,
"name:-->"
+
cachePath
+
vide
oName
)
try
{
try
{
showToast
(
"设置壁纸成功"
)
showToast
(
"设置壁纸成功"
)
videoWallpaper
.
setToWallPaper
(
this
,
cachePath
+
v
edi
oName
)
videoWallpaper
.
setToWallPaper
(
this
,
cachePath
+
v
ide
oName
)
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
e
.
printStackTrace
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
175d5a63
...
@@ -10,7 +10,7 @@ import androidx.fragment.app.FragmentManager
...
@@ -10,7 +10,7 @@ import androidx.fragment.app.FragmentManager
import
androidx.fragment.app.FragmentTransaction
import
androidx.fragment.app.FragmentTransaction
import
com.ireader.ireadersdk.IreaderApi
import
com.ireader.ireadersdk.IreaderApi
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
...
@@ -72,8 +72,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -72,8 +72,8 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
super
.
onDestroy
()
super
.
onDestroy
()
TTPreLoadCarrierExpressManager
.
getInstance
().
onDestroy
()
TTPreLoadCarrierExpressManager
.
getInstance
().
onDestroy
()
V
edioAdingManager
.
getInstance
(
this
).
setVedi
oAdingListener
(
null
)
V
ideoAdingManager
.
getInstance
(
this
).
setVide
oAdingListener
(
null
)
V
edi
oAdingManager
.
getInstance
(
this
).
onDestory
()
V
ide
oAdingManager
.
getInstance
(
this
).
onDestory
()
}
}
public
override
fun
onSaveInstanceState
(
outState
:
Bundle
)
{
public
override
fun
onSaveInstanceState
(
outState
:
Bundle
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MorningClockActivity.kt
View file @
175d5a63
...
@@ -4,12 +4,12 @@ import android.os.Bundle
...
@@ -4,12 +4,12 @@ import android.os.Bundle
import
android.view.View
import
android.view.View
import
androidx.recyclerview.widget.GridLayoutManager
import
androidx.recyclerview.widget.GridLayoutManager
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.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.V
edi
oAdingBean
import
com.mints.goodmoney.mvp.model.V
ide
oAdingBean
import
com.mints.goodmoney.mvp.presenters.MorningClockPresenter
import
com.mints.goodmoney.mvp.presenters.MorningClockPresenter
import
com.mints.goodmoney.mvp.views.MorningClockView
import
com.mints.goodmoney.mvp.views.MorningClockView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
...
@@ -29,8 +29,8 @@ class MorningClockActivity : BaseActivity()
...
@@ -29,8 +29,8 @@ class MorningClockActivity : BaseActivity()
private
lateinit
var
morningClockAdapter
:
MorningClockAdapter
private
lateinit
var
morningClockAdapter
:
MorningClockAdapter
private
var
morningClockList
:
MutableList
<
MorningClockBean
.
MorningClockTargetBean
>?
=
null
private
var
morningClockList
:
MutableList
<
MorningClockBean
.
MorningClockTargetBean
>?
=
null
private
lateinit
var
v
edioAdingManager
:
Vedi
oAdingManager
private
lateinit
var
v
ideoAdingManager
:
Vide
oAdingManager
private
var
loadV
edi
oFailCount
=
0
private
var
loadV
ide
oFailCount
=
0
private
var
morningClockBean
:
MorningClockBean
?
=
null
private
var
morningClockBean
:
MorningClockBean
?
=
null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_morning_clock
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_morning_clock
...
@@ -38,7 +38,7 @@ class MorningClockActivity : BaseActivity()
...
@@ -38,7 +38,7 @@ class MorningClockActivity : BaseActivity()
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
isApplyKitKatTranslucency
()
=
false
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
v
edioAdingManager
=
Vedi
oAdingManager
.
getInstance
(
this
)
v
ideoAdingManager
=
Vide
oAdingManager
.
getInstance
(
this
)
initListener
()
initListener
()
morningClockPresenter
.
attachView
(
this
)
morningClockPresenter
.
attachView
(
this
)
...
@@ -60,7 +60,7 @@ class MorningClockActivity : BaseActivity()
...
@@ -60,7 +60,7 @@ class MorningClockActivity : BaseActivity()
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
R
.
id
.
ivMorningClockBack
->
finish
()
R
.
id
.
ivMorningClockBack
->
finish
()
R
.
id
.
tvMorningClockClick
->
{
R
.
id
.
tvMorningClockClick
->
{
awardV
edi
o
()
awardV
ide
o
()
// 预加载信息流
// 预加载信息流
TTPreLoadCarrierExpressManager
.
getInstance
().
loadTtFrameLayout
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
)
TTPreLoadCarrierExpressManager
.
getInstance
().
loadTtFrameLayout
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_MORNINGCLOCK
)
...
@@ -106,54 +106,54 @@ class MorningClockActivity : BaseActivity()
...
@@ -106,54 +106,54 @@ class MorningClockActivity : BaseActivity()
/**
/**
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardV
edi
o
()
{
private
fun
awardV
ide
o
()
{
if
(
v
edioAdingManager
.
vedi
oFinishFlag
)
{
if
(
v
ideoAdingManager
.
vide
oFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
showLoading
(
"加载中..."
)
showLoading
(
"加载中..."
)
val
bean
=
V
edi
oAdingBean
()
val
bean
=
V
ide
oAdingBean
()
bean
.
carrierType
=
Constant
.
CARRIER_MORNING_CLOCK
bean
.
carrierType
=
Constant
.
CARRIER_MORNING_CLOCK
loadV
edio
(
vedi
oAdingManager
,
bean
,
true
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
true
)
}
}
/**
/**
* 加载激励视频
* 加载激励视频
*/
*/
private
fun
loadV
edio
(
vedioAdingManager
:
VedioAdingManager
,
bean
:
Vedi
oAdingBean
,
isFirstLoad
:
Boolean
)
{
private
fun
loadV
ideo
(
videoAdingManager
:
VideoAdingManager
,
bean
:
Vide
oAdingBean
,
isFirstLoad
:
Boolean
)
{
v
edioAdingManager
.
setVedioAdingListener
(
object
:
VedioAdingManager
.
Vedi
oAdingListener
{
v
ideoAdingManager
.
setVideoAdingListener
(
object
:
VideoAdingManager
.
Vide
oAdingListener
{
override
fun
v
edi
oAdingListenerError
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerError
(
adType
:
String
)
{
showToast
(
"加载超时,请休息一下"
)
showToast
(
"加载超时,请休息一下"
)
hideLoading
()
hideLoading
()
}
}
override
fun
v
edi
oAdingListenerFail
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerFail
(
adType
:
String
)
{
loadV
edi
oFailCount
++
loadV
ide
oFailCount
++
if
(
loadV
edi
oFailCount
>=
2
)
{
if
(
loadV
ide
oFailCount
>=
2
)
{
hideLoading
()
hideLoading
()
showToast
(
"加载失败,请稍后重试!"
)
showToast
(
"加载失败,请稍后重试!"
)
}
else
{
}
else
{
loadV
edio
(
vedi
oAdingManager
,
bean
,
false
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
false
)
}
}
}
}
override
fun
v
edi
oAdingListenerSuccess
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerSuccess
(
adType
:
String
)
{
hideLoading
()
hideLoading
()
v
edi
oAdingSuccess
(
adType
)
v
ide
oAdingSuccess
(
adType
)
}
}
})
})
if
(
isFirstLoad
)
{
if
(
isFirstLoad
)
{
// 首页按权重加载
// 首页按权重加载
v
edi
oAdingManager
.
loadAding
(
this
,
bean
)
v
ide
oAdingManager
.
loadAding
(
this
,
bean
)
}
else
{
}
else
{
// 失败按优先级加载
// 失败按优先级加载
v
edi
oAdingManager
.
loadFailAding
(
this
,
bean
)
v
ide
oAdingManager
.
loadFailAding
(
this
,
bean
)
}
}
}
}
private
fun
v
edi
oAdingSuccess
(
adType
:
String
)
{
private
fun
v
ide
oAdingSuccess
(
adType
:
String
)
{
try
{
try
{
if
(
morningClockList
!=
null
&&
morningClockList
!!
.
size
>
0
)
{
if
(
morningClockList
!=
null
&&
morningClockList
!!
.
size
>
0
)
{
for
(
morningBean
in
morningClockList
!!
)
{
for
(
morningBean
in
morningClockList
!!
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SettingsActivity.kt
View file @
175d5a63
...
@@ -13,7 +13,7 @@ import androidx.core.content.ContextCompat
...
@@ -13,7 +13,7 @@ import androidx.core.content.ContextCompat
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
edi
o.TzVideoAdManager
import
com.mints.goodmoney.ad.v
ide
o.TzVideoAdManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.login.LoginApi
import
com.mints.goodmoney.login.LoginApi
import
com.mints.goodmoney.login.OnLoginListener
import
com.mints.goodmoney.login.OnLoginListener
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
175d5a63
...
@@ -78,7 +78,7 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
...
@@ -78,7 +78,7 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
visibility
=
View
.
VISIBLE
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
iv_left_icon
.
setImageResource
(
R
.
mipmap
.
ic_arrow_back
)
mCoralDownload
=
CoralDownload
(
CoralDownload
.
RELEASE_TASK_TYPE
).
setOnAdLoadListener
(
this
)
mCoralDownload
=
CoralDownload
().
setOnAdLoadListener
(
this
)
CacheUtil
.
clearAllCache
(
context
)
CacheUtil
.
clearAllCache
(
context
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/HorizonChannelFragment.kt
View file @
175d5a63
...
@@ -14,7 +14,7 @@ import com.daimajia.androidanimations.library.YoYo
...
@@ -14,7 +14,7 @@ import com.daimajia.androidanimations.library.YoYo
import
com.mints.goodmoney.R
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.mvp.model.MainV
edi
oMsgBean
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
import
com.mints.goodmoney.mvp.presenters.HorizChannelPresenter
import
com.mints.goodmoney.mvp.presenters.HorizChannelPresenter
import
com.mints.goodmoney.mvp.views.HorizChannelView
import
com.mints.goodmoney.mvp.views.HorizChannelView
import
com.mints.goodmoney.ui.activitys.AwardActivity
import
com.mints.goodmoney.ui.activitys.AwardActivity
...
@@ -131,8 +131,8 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
...
@@ -131,8 +131,8 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
rope
=
null
rope
=
null
}
}
cdvvYilanTime
?.
setCountDownV
edi
oListener
(
null
)
cdvvYilanTime
?.
setCountDownV
ide
oListener
(
null
)
cdvvYilanTime
?.
onDest
or
y
()
cdvvYilanTime
?.
onDest
ro
y
()
super
.
onDestroyView
()
super
.
onDestroyView
()
}
}
...
@@ -165,7 +165,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
...
@@ -165,7 +165,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
}
}
}
}
override
fun
getHomeVedioMsgSuc
(
data
:
MainV
edi
oMsgBean
)
{
override
fun
getHomeVedioMsgSuc
(
data
:
MainV
ide
oMsgBean
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
return
}
}
...
@@ -208,7 +208,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
...
@@ -208,7 +208,7 @@ class HorizonChannelFragment : BaseFragment(), HorizChannelView, View.OnClickLis
* 红包倒计时初始化
* 红包倒计时初始化
*/
*/
private
fun
initTimeView
()
{
private
fun
initTimeView
()
{
cdvvYilanTime
.
setCountDownV
edi
oListener
{
cdvvYilanTime
.
setCountDownV
ide
oListener
{
if
(
isFirstWatchVideo
)
{
if
(
isFirstWatchVideo
)
{
// 第一次观看完视频提醒用户
// 第一次观看完视频提醒用户
vs_tips
.
visibility
=
View
.
VISIBLE
vs_tips
.
visibility
=
View
.
VISIBLE
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/KuYinYuePageFragment.kt
View file @
175d5a63
...
@@ -7,14 +7,12 @@ import com.mints.goodmoney.mvp.model.Data
...
@@ -7,14 +7,12 @@ import com.mints.goodmoney.mvp.model.Data
import
com.mints.goodmoney.mvp.model.KylVedioBean
import
com.mints.goodmoney.mvp.model.KylVedioBean
import
com.mints.goodmoney.mvp.presenters.KuYinYuePagePresenter
import
com.mints.goodmoney.mvp.presenters.KuYinYuePagePresenter
import
com.mints.goodmoney.mvp.views.KuYinYuePageView
import
com.mints.goodmoney.mvp.views.KuYinYuePageView
import
com.mints.goodmoney.ui.activitys.KylVedioActivity
import
com.mints.goodmoney.ui.activitys.KylVideoActivity
import
com.mints.goodmoney.ui.activitys.XmlyPlayActivity
import
com.mints.goodmoney.ui.adapter.KylPageAdapter
import
com.mints.goodmoney.ui.adapter.KylPageAdapter
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import
com.scwang.smartrefresh.layout.listener.OnLoadMoreListener
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.ximalaya.ting.android.opensdk.model.album.Album
import
kotlinx.android.synthetic.main.fragment_main_kyl_page.*
import
kotlinx.android.synthetic.main.fragment_main_kyl_page.*
/**
/**
...
@@ -58,8 +56,8 @@ class KuYinYuePageFragment(private val targetid: String) : LazyLoadBaseFragment(
...
@@ -58,8 +56,8 @@ class KuYinYuePageFragment(private val targetid: String) : LazyLoadBaseFragment(
override
fun
onItemClick
(
position
:
Int
)
{
override
fun
onItemClick
(
position
:
Int
)
{
if
(
kylData
!=
null
&&
kylData
.
size
>
0
)
{
if
(
kylData
!=
null
&&
kylData
.
size
>
0
)
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putString
(
KylV
edioActivity
.
VEDI
O_URL
,
kylData
[
position
].
url
)
bundle
.
putString
(
KylV
ideoActivity
.
VIDE
O_URL
,
kylData
[
position
].
url
)
readyGo
(
KylV
edi
oActivity
::
class
.
java
,
bundle
)
readyGo
(
KylV
ide
oActivity
::
class
.
java
,
bundle
)
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
175d5a63
...
@@ -16,11 +16,11 @@ import com.mints.goodmoney.MintsApplication
...
@@ -16,11 +16,11 @@ import com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.*
import
com.mints.goodmoney.manager.*
import
com.mints.goodmoney.mvp.model.MainV
edi
oMsgBean
import
com.mints.goodmoney.mvp.model.MainV
ide
oMsgBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.presenters.HomePresenter
import
com.mints.goodmoney.mvp.presenters.HomePresenter
import
com.mints.goodmoney.mvp.views.HomeView
import
com.mints.goodmoney.mvp.views.HomeView
...
@@ -67,15 +67,15 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -67,15 +67,15 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
private
var
rewardCoin
=
0
// 小金币
private
var
rewardCoin
=
0
// 小金币
private
var
littleVideoFragment
:
YLLittleVideoFragment
?
=
null
private
var
littleVideoFragment
:
YLLittleVideoFragment
?
=
null
private
val
videoMaxCount
=
12
// 当前缓存视频id最大数
private
val
videoMaxCount
=
12
// 当前缓存视频id最大数
private
val
v
edi
oIdList
by
lazy
{
ArrayList
<
String
>()
}
//记录播放的视频id
private
val
v
ide
oIdList
by
lazy
{
ArrayList
<
String
>()
}
//记录播放的视频id
private
var
isToCreateReward
=
true
// 是否还有剩余红包 服务器返回
private
var
isToCreateReward
=
true
// 是否还有剩余红包 服务器返回
private
var
isFirstLoadV
edi
o
=
true
// 首次加载视频初始化 本地判断
private
var
isFirstLoadV
ide
o
=
true
// 首次加载视频初始化 本地判断
private
var
isAward
=
false
// 是否可以领金币 本地判断
private
var
isAward
=
false
// 是否可以领金币 本地判断
private
var
isFirstWatchVideo
=
true
// 是否是第一次观看完视频
private
var
isFirstWatchVideo
=
true
// 是否是第一次观看完视频
// 广告权重相关
// 广告权重相关
private
var
v
edioAdingManager
:
Vedi
oAdingManager
?
=
null
private
var
v
ideoAdingManager
:
Vide
oAdingManager
?
=
null
// 福袋相关
// 福袋相关
private
var
rope
:
YoYoString
?
=
null
private
var
rope
:
YoYoString
?
=
null
...
@@ -88,7 +88,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -88,7 +88,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
homePresenter
.
attachView
(
this
)
homePresenter
.
attachView
(
this
)
v
edioAdingManager
=
Vedi
oAdingManager
.
getInstance
(
activity
)
v
ideoAdingManager
=
Vide
oAdingManager
.
getInstance
(
activity
)
// 奖励页预加载 信息流广告
// 奖励页预加载 信息流广告
PreLoadExpressManager
.
loadADFrameLayout
()
PreLoadExpressManager
.
loadADFrameLayout
()
...
@@ -139,7 +139,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -139,7 +139,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if
(
isToCreateReward
)
{
if
(
isToCreateReward
)
{
// 防止界面切换 重置红包动画
// 防止界面切换 重置红包动画
// 好兔视频已加载 且 红包已转满
// 好兔视频已加载 且 红包已转满
if
(!
isFirstLoadV
edi
o
&&
!
cdvvYilanTime
.
isPlaying
)
{
if
(!
isFirstLoadV
ide
o
&&
!
cdvvYilanTime
.
isPlaying
)
{
cdvvYilanTime
.
startAnim
()
cdvvYilanTime
.
startAnim
()
}
}
}
}
...
@@ -174,7 +174,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -174,7 +174,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if
(
isToCreateReward
)
{
if
(
isToCreateReward
)
{
// 防止界面切换 重置红包动画
// 防止界面切换 重置红包动画
// 好兔视频已加载 且 红包已转满
// 好兔视频已加载 且 红包已转满
if
(!
isFirstLoadV
edi
o
&&
!
cdvvYilanTime
.
isPlaying
)
{
if
(!
isFirstLoadV
ide
o
&&
!
cdvvYilanTime
.
isPlaying
)
{
cdvvYilanTime
.
stopAnim
()
cdvvYilanTime
.
stopAnim
()
}
}
}
}
...
@@ -191,8 +191,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -191,8 +191,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
rope
=
null
rope
=
null
}
}
cdvvYilanTime
?.
onDest
or
y
()
cdvvYilanTime
?.
onDest
ro
y
()
cdvvYilanTime
?.
setCountDownV
edi
oListener
(
null
)
cdvvYilanTime
?.
setCountDownV
ide
oListener
(
null
)
super
.
onDestroyView
()
super
.
onDestroyView
()
}
}
...
@@ -252,7 +252,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -252,7 +252,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
}
}
}
override
fun
getHomeVedioMsgSuc
(
data
:
MainV
edi
oMsgBean
)
{
override
fun
getHomeVedioMsgSuc
(
data
:
MainV
ide
oMsgBean
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
return
}
}
...
@@ -266,7 +266,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -266,7 +266,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
if
(
isToCreateReward
)
{
if
(
isToCreateReward
)
{
// 防止界面切换 重置倒计时
// 防止界面切换 重置倒计时
// 好兔视频已加载 且 红包已转满 且 奖励已领过
// 好兔视频已加载 且 红包已转满 且 奖励已领过
if
(!
isFirstLoadV
edi
o
&&
!
cdvvYilanTime
.
isPlaying
&&
!
isAward
)
{
if
(!
isFirstLoadV
ide
o
&&
!
cdvvYilanTime
.
isPlaying
&&
!
isAward
)
{
cdvvYilanTime
?.
stopRedbox
()
cdvvYilanTime
?.
stopRedbox
()
cdvvYilanTime
?.
reset
()
cdvvYilanTime
?.
reset
()
cdvvYilanTime
?.
start
()
cdvvYilanTime
?.
start
()
...
@@ -333,8 +333,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -333,8 +333,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
YLPlayerConfig
.
config
().
registerPlayerCallBack
(
object
:
OnPlayerCallBack
{
YLPlayerConfig
.
config
().
registerPlayerCallBack
(
object
:
OnPlayerCallBack
{
override
fun
onStart
(
pager
:
String
,
videoid
:
String
,
p2
:
String
?)
{
override
fun
onStart
(
pager
:
String
,
videoid
:
String
,
p2
:
String
?)
{
// 防止网络异常时, 第一次加载倒计时红包
// 防止网络异常时, 第一次加载倒计时红包
if
(
isFirstLoadV
edi
o
)
{
if
(
isFirstLoadV
ide
o
)
{
isFirstLoadV
edi
o
=
false
isFirstLoadV
ide
o
=
false
initTimeview
()
initTimeview
()
}
else
{
}
else
{
resumeDownloadTime
(
videoid
)
resumeDownloadTime
(
videoid
)
...
@@ -355,7 +355,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -355,7 +355,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
override
fun
onLoopComplete
(
pager
:
String
?,
videoID
:
String
,
taskID
:
String
?,
num
:
Int
)
{
override
fun
onLoopComplete
(
pager
:
String
?,
videoID
:
String
,
taskID
:
String
?,
num
:
Int
)
{
// LogUtil.d(TAG, "registerPlayerCallBack onLoopComplete")
// LogUtil.d(TAG, "registerPlayerCallBack onLoopComplete")
addV
edi
oIdList
(
videoID
)
addV
ide
oIdList
(
videoID
)
pauseDownloadTime
()
pauseDownloadTime
()
}
}
...
@@ -445,12 +445,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -445,12 +445,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
/**
/**
* 将播放的id记录到list中
* 将播放的id记录到list中
*/
*/
private
fun
addV
edi
oIdList
(
id
:
String
)
{
private
fun
addV
ide
oIdList
(
id
:
String
)
{
// 达到12个视频时 删除前10个记录
// 达到12个视频时 删除前10个记录
if
(
v
edi
oIdList
.
size
>=
videoMaxCount
)
{
if
(
v
ide
oIdList
.
size
>=
videoMaxCount
)
{
v
edi
oIdList
.
subList
(
0
,
10
).
clear
()
v
ide
oIdList
.
subList
(
0
,
10
).
clear
()
}
}
if
(!
v
edioIdList
.
contains
(
id
))
vedi
oIdList
.
add
(
id
)
if
(!
v
ideoIdList
.
contains
(
id
))
vide
oIdList
.
add
(
id
)
}
}
/**
/**
...
@@ -465,7 +465,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -465,7 +465,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
*/
*/
private
fun
resumeDownloadTime
(
id
:
String
)
{
private
fun
resumeDownloadTime
(
id
:
String
)
{
if
(!
TextUtils
.
isEmpty
(
id
))
{
if
(!
TextUtils
.
isEmpty
(
id
))
{
if
(
v
edi
oIdList
.
contains
(
id
))
{
if
(
v
ide
oIdList
.
contains
(
id
))
{
cdvvYilanTime
?.
pause
()
cdvvYilanTime
?.
pause
()
return
return
}
}
...
@@ -488,7 +488,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -488,7 +488,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 红包倒计时初始化
* 红包倒计时初始化
*/
*/
private
fun
initTimeview
()
{
private
fun
initTimeview
()
{
cdvvYilanTime
?.
setCountDownV
edi
oListener
{
cdvvYilanTime
?.
setCountDownV
ide
oListener
{
if
(
isFirstWatchVideo
)
{
if
(
isFirstWatchVideo
)
{
// 第一次观看完视频提醒用户
// 第一次观看完视频提醒用户
vs_tips
?.
visibility
=
View
.
VISIBLE
vs_tips
?.
visibility
=
View
.
VISIBLE
...
@@ -503,8 +503,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -503,8 +503,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
cdvvYilanTime
?.
showRedbox
()
cdvvYilanTime
?.
showRedbox
()
stopDownloadTime
()
stopDownloadTime
()
}
}
val
v
edi
oTime
=
ps
.
getInt
(
Constant
.
MAIN_VEDIO_TIME
,
30
)
val
v
ide
oTime
=
ps
.
getInt
(
Constant
.
MAIN_VEDIO_TIME
,
30
)
cdvvYilanTime
?.
setTime
(
v
edi
oTime
)
cdvvYilanTime
?.
setTime
(
v
ide
oTime
)
cdvvYilanTime
?.
start
()
cdvvYilanTime
?.
start
()
}
}
...
@@ -565,16 +565,23 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -565,16 +565,23 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 设置视频权重
* 设置视频权重
*/
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
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
)
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
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
+
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
" sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
// 广告视频数
// 广告视频数
AppConfig
.
csjV
edi
oAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
csjV
ide
oAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
+
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
" sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount}"
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
175d5a63
...
@@ -13,12 +13,11 @@ import androidx.recyclerview.widget.DividerItemDecoration
...
@@ -13,12 +13,11 @@ import androidx.recyclerview.widget.DividerItemDecoration
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.fly.scenemodule.SceneUtil
import
com.fly.scenemodule.SceneUtil
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.banner.BannerManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.express.TTPreLoadExpressXmlyManager
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
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.*
import
com.mints.goodmoney.manager.*
...
@@ -57,6 +56,8 @@ import net.grandcentrix.tray.AppPreferences
...
@@ -57,6 +56,8 @@ import net.grandcentrix.tray.AppPreferences
import
java.math.BigDecimal
import
java.math.BigDecimal
import
java.util.*
import
java.util.*
private
val
TAG
=
MyFragment
::
class
.
java
.
simpleName
/**
/**
* 描述:我
* 描述:我
* 作者:孟崔广
* 作者:孟崔广
...
@@ -70,12 +71,10 @@ class MyFragment : BaseFragment(),
...
@@ -70,12 +71,10 @@ class MyFragment : BaseFragment(),
View
.
OnClickListener
,
View
.
OnClickListener
,
AdapterView
.
OnItemClickListener
{
AdapterView
.
OnItemClickListener
{
private
val
TAG
=
MyFragment
::
class
.
java
.
simpleName
private
val
ps
by
lazy
{
AppPreferences
(
context
)
}
private
val
ps
by
lazy
{
AppPreferences
(
context
)
}
private
val
myPresenter
by
lazy
{
MyPresenter
()
}
private
val
myPresenter
by
lazy
{
MyPresenter
()
}
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
private
val
userManager
by
lazy
{
UserManager
.
getInstance
()
}
private
lateinit
var
vedioAdingManager
:
V
edi
oAdingManager
private
lateinit
var
vedioAdingManager
:
V
ide
oAdingManager
private
var
loadVedioFailCount
=
0
private
var
loadVedioFailCount
=
0
private
var
userConfig
:
MyInfo
?
=
null
private
var
userConfig
:
MyInfo
?
=
null
...
@@ -910,7 +909,7 @@ class MyFragment : BaseFragment(),
...
@@ -910,7 +909,7 @@ class MyFragment : BaseFragment(),
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardVedio
(
coin
:
Int
,
carrierType
:
String
)
{
private
fun
awardVedio
(
coin
:
Int
,
carrierType
:
String
)
{
if
(
vedioAdingManager
.
v
edi
oFinishFlag
)
{
if
(
vedioAdingManager
.
v
ide
oFinishFlag
)
{
showToast
(
"今日视频已看完,请明天再来吧"
)
showToast
(
"今日视频已看完,请明天再来吧"
)
return
return
}
}
...
@@ -918,7 +917,7 @@ class MyFragment : BaseFragment(),
...
@@ -918,7 +917,7 @@ class MyFragment : BaseFragment(),
loadVedioFailCount
=
0
loadVedioFailCount
=
0
showLoading
(
"加载中..."
)
showLoading
(
"加载中..."
)
val
bean
=
V
edi
oAdingBean
()
val
bean
=
V
ide
oAdingBean
()
bean
.
carrierType
=
carrierType
bean
.
carrierType
=
carrierType
bean
.
curCoin
=
coin
bean
.
curCoin
=
coin
...
@@ -928,14 +927,14 @@ class MyFragment : BaseFragment(),
...
@@ -928,14 +927,14 @@ class MyFragment : BaseFragment(),
/**
/**
* 加载激励视频
* 加载激励视频
*/
*/
private
fun
loadVideo
(
videoAdingManager
:
V
edioAdingManager
,
bean
:
Vedi
oAdingBean
,
isFirstLoad
:
Boolean
)
{
private
fun
loadVideo
(
videoAdingManager
:
V
ideoAdingManager
,
bean
:
Vide
oAdingBean
,
isFirstLoad
:
Boolean
)
{
videoAdingManager
.
setV
edioAdingListener
(
object
:
VedioAdingManager
.
Vedi
oAdingListener
{
videoAdingManager
.
setV
ideoAdingListener
(
object
:
VideoAdingManager
.
Vide
oAdingListener
{
override
fun
v
edi
oAdingListenerError
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerError
(
adType
:
String
)
{
showToast
(
"加载超时,请休息一下"
)
showToast
(
"加载超时,请休息一下"
)
hideLoading
()
hideLoading
()
}
}
override
fun
v
edi
oAdingListenerFail
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerFail
(
adType
:
String
)
{
loadVedioFailCount
++
loadVedioFailCount
++
if
(
loadVedioFailCount
>=
2
)
{
if
(
loadVedioFailCount
>=
2
)
{
hideLoading
()
hideLoading
()
...
@@ -945,7 +944,7 @@ class MyFragment : BaseFragment(),
...
@@ -945,7 +944,7 @@ class MyFragment : BaseFragment(),
}
}
}
}
override
fun
v
edi
oAdingListenerSuccess
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerSuccess
(
adType
:
String
)
{
hideLoading
()
hideLoading
()
videoAdingSuccess
(
adType
)
videoAdingSuccess
(
adType
)
}
}
...
@@ -996,7 +995,7 @@ class MyFragment : BaseFragment(),
...
@@ -996,7 +995,7 @@ class MyFragment : BaseFragment(),
private
fun
initManager
()
{
private
fun
initManager
()
{
BannerManager
.
init
()
BannerManager
.
init
()
vedioAdingManager
=
V
edi
oAdingManager
.
getInstance
(
activity
)
vedioAdingManager
=
V
ide
oAdingManager
.
getInstance
(
activity
)
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
// 登录成功的用户初始化鱼丸盒子
// 登录成功的用户初始化鱼丸盒子
...
@@ -1046,14 +1045,23 @@ class MyFragment : BaseFragment(),
...
@@ -1046,14 +1045,23 @@ class MyFragment : BaseFragment(),
* 设置视频权重
* 设置视频权重
*/
*/
private
fun
initAdWeight
(
data
:
UserTaskMsgBean
)
{
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
.
corAl_VIDEO
.
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}"
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"sdhzWeight:${data.vedioRules.sdhZ_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate}"
)
// 广告视频数
// 广告视频数
AppConfig
.
csjV
edi
oAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
csjV
ide
oAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
wnVedioAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
wnVideoAdCount
=
data
.
vedioRules
.
sdhZ_VEDIO
.
surplus
AppConfig
.
flVedioAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
AppConfig
.
flVideoAdCount
=
data
.
vedioRules
.
fL_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount}"
)
}
}
/**
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/CountDownV
edi
oView.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/CountDownV
ide
oView.java
View file @
175d5a63
...
@@ -13,9 +13,9 @@ import com.daimajia.androidanimations.library.YoYo;
...
@@ -13,9 +13,9 @@ import com.daimajia.androidanimations.library.YoYo;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.R
;
public
class
CountDownV
edi
oView
extends
LinearLayout
{
public
class
CountDownV
ide
oView
extends
LinearLayout
{
private
CountDownV
edioListener
countDownVedi
oListener
;
private
CountDownV
ideoListener
countDownVide
oListener
;
private
CountDownView
cdCountVedioView
;
private
CountDownView
cdCountVedioView
;
private
ImageView
ivCountVedioRedbox
;
private
ImageView
ivCountVedioRedbox
;
...
@@ -23,15 +23,15 @@ public class CountDownVedioView extends LinearLayout {
...
@@ -23,15 +23,15 @@ public class CountDownVedioView extends LinearLayout {
private
boolean
isPlaying
=
false
;
private
boolean
isPlaying
=
false
;
private
YoYo
.
YoYoString
rope
;
private
YoYo
.
YoYoString
rope
;
public
CountDownV
edi
oView
(
Context
context
)
{
public
CountDownV
ide
oView
(
Context
context
)
{
this
(
context
,
null
);
this
(
context
,
null
);
}
}
public
CountDownV
edi
oView
(
Context
context
,
@Nullable
AttributeSet
attrs
)
{
public
CountDownV
ide
oView
(
Context
context
,
@Nullable
AttributeSet
attrs
)
{
this
(
context
,
attrs
,
0
);
this
(
context
,
attrs
,
0
);
}
}
public
CountDownV
edi
oView
(
Context
context
,
@Nullable
AttributeSet
attrs
,
int
defStyleAttr
)
{
public
CountDownV
ide
oView
(
Context
context
,
@Nullable
AttributeSet
attrs
,
int
defStyleAttr
)
{
super
(
context
,
attrs
,
defStyleAttr
);
super
(
context
,
attrs
,
defStyleAttr
);
initView
(
context
);
initView
(
context
);
...
@@ -47,8 +47,8 @@ public class CountDownVedioView extends LinearLayout {
...
@@ -47,8 +47,8 @@ public class CountDownVedioView extends LinearLayout {
private
void
initListener
()
{
private
void
initListener
()
{
cdCountVedioView
.
setOnLoadingFinishListener
(()
->
{
cdCountVedioView
.
setOnLoadingFinishListener
(()
->
{
if
(
countDownV
edi
oListener
!=
null
)
{
if
(
countDownV
ide
oListener
!=
null
)
{
countDownV
edi
oListener
.
finish
();
countDownV
ide
oListener
.
finish
();
}
}
});
});
}
}
...
@@ -93,11 +93,11 @@ public class CountDownVedioView extends LinearLayout {
...
@@ -93,11 +93,11 @@ public class CountDownVedioView extends LinearLayout {
ivCountVedioRedbox
.
setImageResource
(
img
);
ivCountVedioRedbox
.
setImageResource
(
img
);
}
}
public
void
setCountDownV
edioListener
(
CountDownVedioListener
countDownVedi
oListener
)
{
public
void
setCountDownV
ideoListener
(
CountDownVideoListener
countDownVide
oListener
)
{
this
.
countDownV
edioListener
=
countDownVedi
oListener
;
this
.
countDownV
ideoListener
=
countDownVide
oListener
;
}
}
public
interface
CountDownV
edi
oListener
{
public
interface
CountDownV
ide
oListener
{
void
finish
();
void
finish
();
}
}
...
@@ -135,7 +135,7 @@ public class CountDownVedioView extends LinearLayout {
...
@@ -135,7 +135,7 @@ public class CountDownVedioView extends LinearLayout {
}
}
}
}
public
void
onDest
or
y
()
{
public
void
onDest
ro
y
()
{
if
(
cdCountVedioView
.
callOnClick
())
if
(
cdCountVedioView
.
callOnClick
())
if
(
rope
!=
null
)
{
if
(
rope
!=
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/DrawcashVideoDialog.kt
View file @
175d5a63
...
@@ -8,10 +8,10 @@ import android.view.View
...
@@ -8,10 +8,10 @@ import android.view.View
import
android.view.WindowManager
import
android.view.WindowManager
import
android.widget.TextView
import
android.widget.TextView
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.v
edio.Vedi
oAdingManager
import
com.mints.goodmoney.ad.v
ideo.Vide
oAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.mvp.model.V
edi
oAdingBean
import
com.mints.goodmoney.mvp.model.V
ide
oAdingBean
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
...
@@ -23,8 +23,8 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -23,8 +23,8 @@ class DrawcashVideoDialog(activity: Activity) :
private
var
onClickListener
:
OnClickListener
?
=
null
private
var
onClickListener
:
OnClickListener
?
=
null
private
var
v
edioAdingManager
:
Vedi
oAdingManager
?
=
null
private
var
v
ideoAdingManager
:
Vide
oAdingManager
?
=
null
private
var
loadV
edi
oFailCount
=
0
private
var
loadV
ide
oFailCount
=
0
private
var
tvContent
:
TextView
private
var
tvContent
:
TextView
private
var
tvNext
:
TextView
private
var
tvNext
:
TextView
...
@@ -39,7 +39,7 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -39,7 +39,7 @@ class DrawcashVideoDialog(activity: Activity) :
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
lp
.
windowAnimations
=
R
.
style
.
DialogAnimBottom
window
!!
.
attributes
=
lp
window
!!
.
attributes
=
lp
v
edioAdingManager
=
Vedi
oAdingManager
.
getInstance
(
activity
)
v
ideoAdingManager
=
Vide
oAdingManager
.
getInstance
(
activity
)
findViewById
<
View
>(
R
.
id
.
btn_dialog_drawcash_back
).
setOnClickListener
(
this
)
findViewById
<
View
>(
R
.
id
.
btn_dialog_drawcash_back
).
setOnClickListener
(
this
)
tvContent
=
findViewById
<
View
>(
R
.
id
.
btn_dialog_drawcash_content
)
as
TextView
tvContent
=
findViewById
<
View
>(
R
.
id
.
btn_dialog_drawcash_content
)
as
TextView
...
@@ -49,8 +49,8 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -49,8 +49,8 @@ class DrawcashVideoDialog(activity: Activity) :
}
}
fun
onDestory
(){
fun
onDestory
(){
v
edioAdingManager
?.
setVedi
oAdingListener
(
null
)
v
ideoAdingManager
?.
setVide
oAdingListener
(
null
)
v
edi
oAdingManager
?.
onDestory
()
v
ide
oAdingManager
?.
onDestory
()
activity
=
null
activity
=
null
}
}
...
@@ -63,7 +63,7 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -63,7 +63,7 @@ class DrawcashVideoDialog(activity: Activity) :
onClickListener
?.
onClick
()
onClickListener
?.
onClick
()
dismiss
()
dismiss
()
}
else
{
}
else
{
awardV
edi
o
()
awardV
ide
o
()
}
}
}
}
R
.
id
.
btn_dialog_drawcash_back
->
{
R
.
id
.
btn_dialog_drawcash_back
->
{
...
@@ -83,40 +83,40 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -83,40 +83,40 @@ class DrawcashVideoDialog(activity: Activity) :
/**
/**
* 获取激励视频
* 获取激励视频
*/
*/
private
fun
awardV
edi
o
()
{
private
fun
awardV
ide
o
()
{
if
(
activity
==
null
)
return
if
(
activity
==
null
)
return
loadV
edi
oFailCount
=
0
loadV
ide
oFailCount
=
0
ToastUtil
.
show
(
activity
,
"加载中..."
)
ToastUtil
.
show
(
activity
,
"加载中..."
)
val
bean
=
V
edi
oAdingBean
()
val
bean
=
V
ide
oAdingBean
()
bean
.
carrierType
=
Constant
.
CARRIER_DRAWCASH
bean
.
carrierType
=
Constant
.
CARRIER_DRAWCASH
v
edioAdingManager
?.
let
{
loadVedi
o
(
it
,
bean
,
true
)
}
v
ideoAdingManager
?.
let
{
loadVide
o
(
it
,
bean
,
true
)
}
}
}
/**
/**
* 加载激励视频
* 加载激励视频
*/
*/
private
fun
loadV
edio
(
vedioAdingManager
:
VedioAdingManager
?,
bean
:
Vedi
oAdingBean
,
isFirstLoad
:
Boolean
)
{
private
fun
loadV
ideo
(
videoAdingManager
:
VideoAdingManager
?,
bean
:
Vide
oAdingBean
,
isFirstLoad
:
Boolean
)
{
if
(
activity
==
null
)
return
if
(
activity
==
null
)
return
v
edi
oAdingManager
?.
let
{
v
ide
oAdingManager
?.
let
{
it
.
setV
edioAdingListener
(
object
:
VedioAdingManager
.
Vedi
oAdingListener
{
it
.
setV
ideoAdingListener
(
object
:
VideoAdingManager
.
Vide
oAdingListener
{
override
fun
v
edi
oAdingListenerError
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerError
(
adType
:
String
)
{
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
}
}
override
fun
v
edi
oAdingListenerFail
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerFail
(
adType
:
String
)
{
loadV
edi
oFailCount
++
loadV
ide
oFailCount
++
if
(
loadV
edi
oFailCount
>=
2
)
{
if
(
loadV
ide
oFailCount
>=
2
)
{
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
ToastUtil
.
show
(
activity
,
"加载超时,请休息一下"
)
}
else
{
}
else
{
loadV
edio
(
vedi
oAdingManager
,
bean
,
false
)
loadV
ideo
(
vide
oAdingManager
,
bean
,
false
)
}
}
}
}
override
fun
v
edi
oAdingListenerSuccess
(
adType
:
String
)
{
override
fun
v
ide
oAdingListenerSuccess
(
adType
:
String
)
{
if
(
it
.
isV
edi
oAdDownload
)
{
if
(
it
.
isV
ide
oAdDownload
)
{
TrackManager
.
getInstance
().
drawcashVideo
()
TrackManager
.
getInstance
().
drawcashVideo
()
}
}
}
}
...
...
GoodMoney/app/src/main/res/layout/activity_kyl_v
edi
o.xml
→
GoodMoney/app/src/main/res/layout/activity_kyl_v
ide
o.xml
View file @
175d5a63
File moved
GoodMoney/app/src/main/res/layout/layout_red_box.xml
View file @
175d5a63
...
@@ -37,7 +37,7 @@
...
@@ -37,7 +37,7 @@
android:src=
"@mipmap/ic_main_box"
android:src=
"@mipmap/ic_main_box"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<com.mints.goodmoney.ui.widgets.CountDownV
edi
oView
<com.mints.goodmoney.ui.widgets.CountDownV
ide
oView
android:id=
"@+id/cdvvYilanTime"
android:id=
"@+id/cdvvYilanTime"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
/>
android:layout_height=
"wrap_content"
/>
...
...
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