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
7ccdbd65
Commit
7ccdbd65
authored
Mar 04, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
RTA激励视频集成,热门活动样式改变
parent
1e4580a5
Changes
42
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
42 changed files
with
611 additions
and
240 deletions
+611
-240
build.gradle
GoodMoney/app/build.gradle
+4
-0
taskwake1.0.aar
GoodMoney/app/libs/taskwake1.0.aar
+0
-0
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+2
-1
CsjDrawAdManager.kt
...main/java/com/mints/goodmoney/ad/draw/CsjDrawAdManager.kt
+3
-0
CsjFullVideoAdManager.java
...a/com/mints/goodmoney/ad/video/CsjFullVideoAdManager.java
+12
-12
CsjVideoAdManager.java
.../java/com/mints/goodmoney/ad/video/CsjVideoAdManager.java
+14
-14
KsVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/KsVideoAdManager.kt
+8
-8
MhVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/MhVideoAdManager.kt
+7
-7
RTAVideoAdManager.kt
...in/java/com/mints/goodmoney/ad/video/RTAVideoAdManager.kt
+136
-0
ShVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/ShVideoAdManager.kt
+7
-7
VideoAdingManager.java
.../java/com/mints/goodmoney/ad/video/VideoAdingManager.java
+73
-24
WnVideoAdManager.kt
...ain/java/com/mints/goodmoney/ad/video/WnVideoAdManager.kt
+7
-7
YlhVideoAdManager.java
.../java/com/mints/goodmoney/ad/video/YlhVideoAdManager.java
+14
-28
VedioAdStatusListener.kt
...om/mints/goodmoney/ad/video/base/VedioAdStatusListener.kt
+1
-1
AppConfig.java
...p/src/main/java/com/mints/goodmoney/common/AppConfig.java
+4
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+2
-0
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+9
-0
VedioRulesBean.java
...in/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
+22
-0
VersionUpdatePresenter.java
...ints/goodmoney/mvp/presenters/VersionUpdatePresenter.java
+24
-3
UpdateService.java
.../main/java/com/mints/goodmoney/service/UpdateService.java
+17
-1
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-1
DrawNativeVideoActivity.kt
...m/mints/goodmoney/ui/activitys/DrawNativeVideoActivity.kt
+1
-5
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+6
-4
GuideActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
+1
-1
KylVideoActivity.kt
...java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
+1
-1
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+1
-1
WrapperActivity.kt
.../java/com/mints/goodmoney/ui/activitys/WrapperActivity.kt
+1
-1
GvMyAdapter.java
...main/java/com/mints/goodmoney/ui/adapter/GvMyAdapter.java
+22
-11
TaskAdapter.kt
...c/main/java/com/mints/goodmoney/ui/adapter/TaskAdapter.kt
+3
-2
ViewPagerAdapter.java
...java/com/mints/goodmoney/ui/adapter/ViewPagerAdapter.java
+7
-6
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+7
-4
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+86
-31
TaskCpdFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
+14
-18
WrapViewPager.java
...in/java/com/mints/goodmoney/ui/widgets/WrapViewPager.java
+33
-0
DrawcashVideoDialog.kt
.../mints/goodmoney/ui/widgets/dialog/DrawcashVideoDialog.kt
+1
-1
ForegroundOrBackground.java
...ava/com/mints/goodmoney/utils/ForegroundOrBackground.java
+3
-2
fragment_main_dh.xml
GoodMoney/app/src/main/res/layout/fragment_main_dh.xml
+0
-1
fragment_main_my.xml
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
+15
-20
item_fragment_main_my_clock.xml
...y/app/src/main/res/layout/item_fragment_main_my_clock.xml
+2
-2
item_fragment_main_my_promotions.xml
.../src/main/res/layout/item_fragment_main_my_promotions.xml
+24
-14
item_fragment_main_my_promotions_gv.xml
...c/main/res/layout/item_fragment_main_my_promotions_gv.xml
+15
-0
item_fragment_main_my_task.xml
...ey/app/src/main/res/layout/item_fragment_main_my_task.xml
+1
-1
No files found.
GoodMoney/app/build.gradle
View file @
7ccdbd65
...
@@ -272,6 +272,10 @@ dependencies {
...
@@ -272,6 +272,10 @@ dependencies {
// 抖音滑动LayoutManager
// 抖音滑动LayoutManager
implementation
(
name:
'LayoutManagerGroup'
,
ext:
'aar'
)
implementation
(
name:
'LayoutManagerGroup'
,
ext:
'aar'
)
// 激励视频RTA
implementation
(
name:
'taskwake1.0'
,
ext:
'aar'
)
implementation
'com.squareup.retrofit2:converter-gson:2.6.2'
// 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'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
// androidTestImplementation 'androidx.test.espresso:espresso-core:3.3.0'
...
...
GoodMoney/app/libs/taskwake1.0.aar
0 → 100644
View file @
7ccdbd65
File added
GoodMoney/app/src/main/AndroidManifest.xml
View file @
7ccdbd65
...
@@ -60,7 +60,8 @@
...
@@ -60,7 +60,8 @@
android:supportsRtl=
"true"
android:supportsRtl=
"true"
android:theme=
"@style/CustomAppTheme"
android:theme=
"@style/CustomAppTheme"
android:usesCleartextTraffic=
"true"
android:usesCleartextTraffic=
"true"
tools:ignore=
"GoogleAppIndexingWarning"
>
tools:ignore=
"GoogleAppIndexingWarning"
tools:replace=
"android:theme"
>
<uses-library
<uses-library
android:name=
"org.apache.http.legacy"
android:name=
"org.apache.http.legacy"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/draw/CsjDrawAdManager.kt
View file @
7ccdbd65
...
@@ -14,6 +14,9 @@ import com.mints.goodmoney.utils.LogUtil
...
@@ -14,6 +14,9 @@ import com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.goodmoney.utils.ToastUtil
import
com.mints.goodmoney.utils.UIUtils
import
com.mints.goodmoney.utils.UIUtils
/**
* 描述:穿山甲Draw 信息流广告
*/
class
CsjDrawAdManager
private
constructor
(
activity
:
Activity
)
{
class
CsjDrawAdManager
private
constructor
(
activity
:
Activity
)
{
companion
object
{
companion
object
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/CsjFullVideoAdManager.java
View file @
7ccdbd65
...
@@ -8,7 +8,7 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
...
@@ -8,7 +8,7 @@ import com.bytedance.sdk.openadsdk.TTAdNative;
import
com.bytedance.sdk.openadsdk.TTAdSdk
;
import
com.bytedance.sdk.openadsdk.TTAdSdk
;
import
com.bytedance.sdk.openadsdk.TTFullScreenVideoAd
;
import
com.bytedance.sdk.openadsdk.TTFullScreenVideoAd
;
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
;
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
;
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
;
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
;
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.TtCsjAdManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
...
@@ -20,7 +20,7 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
...
@@ -20,7 +20,7 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
private
static
CsjFullVideoAdManager
_inst
;
private
static
CsjFullVideoAdManager
_inst
;
private
V
edioAdStatusListener
vedi
oAdStatusListener
;
private
V
ideoAdStatusListener
vide
oAdStatusListener
;
Activity
activity
;
Activity
activity
;
private
TTAdNative
ttAdNative
;
private
TTAdNative
ttAdNative
;
...
@@ -68,8 +68,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
...
@@ -68,8 +68,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
public
void
onError
(
int
code
,
String
message
)
{
public
void
onError
(
int
code
,
String
message
)
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
if
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
...
@@ -92,16 +92,16 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
...
@@ -92,16 +92,16 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
}
}
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
);
if
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adDownload
();
v
ide
oAdStatusListener
.
adDownload
();
}
}
}
}
@Override
@Override
public
void
onAdClose
()
{
public
void
onAdClose
()
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
);
if
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adSuccess
();
v
ide
oAdStatusListener
.
adSuccess
();
}
}
if
(
activity
!=
null
)
{
if
(
activity
!=
null
)
{
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_CSJFULL
,
extraId
,
curCoin
));
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_CSJFULL
,
extraId
,
curCoin
));
...
@@ -129,8 +129,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
...
@@ -129,8 +129,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
}
else
{
}
else
{
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Cached Fail"
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJFULL
,
Constant
.
EVENT_TYPE_ONE
,
"999999"
,
"Cached Fail"
);
if
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
}
}
...
@@ -146,8 +146,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
...
@@ -146,8 +146,8 @@ public class CsjFullVideoAdManager extends BaseVideoAd {
activity
=
null
;
activity
=
null
;
}
}
public
void
setV
edioAdStatusListener
(
VedioAdStatusListener
vedi
oAdStatusListener
)
{
public
void
setV
ideoAdStatusListener
(
VideoAdStatusListener
vide
oAdStatusListener
)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
;
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
;
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/CsjVideoAdManager.java
View file @
7ccdbd65
...
@@ -9,7 +9,7 @@ import com.bytedance.sdk.openadsdk.TTAppDownloadListener;
...
@@ -9,7 +9,7 @@ import com.bytedance.sdk.openadsdk.TTAppDownloadListener;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.bytedance.sdk.openadsdk.TTRewardVideoAd
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.BuildConfig
;
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
;
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
;
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
;
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
;
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.TTNativeExpressManager
;
import
com.mints.goodmoney.manager.TTNativeExpressManager
;
...
@@ -33,7 +33,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -33,7 +33,7 @@ public class CsjVideoAdManager extends BaseVideoAd {
private
AppPreferences
ps
;
private
AppPreferences
ps
;
private
int
curCoin
;
private
int
curCoin
;
private
String
extraId
;
private
String
extraId
;
private
V
edioAdStatusListener
vedi
oAdStatusListener
;
private
V
ideoAdStatusListener
vide
oAdStatusListener
;
Activity
activity
;
Activity
activity
;
private
TTAdNative
ttAdNative
;
private
TTAdNative
ttAdNative
;
...
@@ -151,8 +151,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -151,8 +151,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
LogUtil
.
d
(
"vedioAdStatusListener"
,
"onError "
+
code
+
message
);
LogUtil
.
d
(
"vedioAdStatusListener"
,
"onError "
+
code
+
message
);
if
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
...
@@ -165,8 +165,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -165,8 +165,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
}
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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
}
}
...
@@ -197,8 +197,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -197,8 +197,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adDownload
();
v
ide
oAdStatusListener
.
adDownload
();
}
}
}
}
...
@@ -206,8 +206,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -206,8 +206,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adSuccess
();
v
ide
oAdStatusListener
.
adSuccess
();
}
}
}
}
...
@@ -219,8 +219,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -219,8 +219,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
...
@@ -300,8 +300,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
...
@@ -300,8 +300,8 @@ public class CsjVideoAdManager extends BaseVideoAd {
return
vo
;
return
vo
;
}
}
public
void
setV
edioAdStatusListener
(
VedioAdStatusListener
vedi
oAdStatusListener
)
{
public
void
setV
ideoAdStatusListener
(
VideoAdStatusListener
vide
oAdStatusListener
)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
;
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
;
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/KsVideoAdManager.kt
View file @
7ccdbd65
...
@@ -6,7 +6,7 @@ import com.kwad.sdk.api.KsLoadManager
...
@@ -6,7 +6,7 @@ import com.kwad.sdk.api.KsLoadManager
import
com.kwad.sdk.api.KsRewardVideoAd
import
com.kwad.sdk.api.KsRewardVideoAd
import
com.kwad.sdk.api.KsScene
import
com.kwad.sdk.api.KsScene
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
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.KsManager
import
com.mints.goodmoney.manager.KsManager
...
@@ -22,7 +22,7 @@ private val TAG = KsVideoAdManager::class.java.simpleName
...
@@ -22,7 +22,7 @@ private val TAG = KsVideoAdManager::class.java.simpleName
class
KsVideoAdManager
private
constructor
(
activity
:
Activity
)
:
class
KsVideoAdManager
private
constructor
(
activity
:
Activity
)
:
BaseVideoAd
()
{
BaseVideoAd
()
{
private
var
v
edioAdStatusListener
:
Vedi
oAdStatusListener
?
=
null
private
var
v
ideoAdStatusListener
:
Vide
oAdStatusListener
?
=
null
private
var
mRewardVideoAd
:
KsRewardVideoAd
?
=
null
private
var
mRewardVideoAd
:
KsRewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
...
@@ -55,7 +55,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
...
@@ -55,7 +55,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
val
scene
=
KsScene
.
Builder
(
KsManager
.
KS_AD_VEDIO_POSTID
).
build
()
val
scene
=
KsScene
.
Builder
(
KsManager
.
KS_AD_VEDIO_POSTID
).
build
()
KsAdSDK
.
getLoadManager
().
loadRewardVideoAd
(
scene
,
object
:
KsLoadManager
.
RewardVideoAdListener
{
KsAdSDK
.
getLoadManager
().
loadRewardVideoAd
(
scene
,
object
:
KsLoadManager
.
RewardVideoAdListener
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
override
fun
onError
(
p0
:
Int
,
p1
:
String
?)
{
v
edi
oAdStatusListener
?.
adFail
()
v
ide
oAdStatusListener
?.
adFail
()
}
}
override
fun
onRewardVideoAdLoad
(
p0
:
MutableList
<
KsRewardVideoAd
>?)
{
override
fun
onRewardVideoAdLoad
(
p0
:
MutableList
<
KsRewardVideoAd
>?)
{
...
@@ -77,7 +77,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
...
@@ -77,7 +77,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
isClickScreen
=
false
}
}
v
edi
oAdStatusListener
?.
adDownload
()
v
ide
oAdStatusListener
?.
adDownload
()
}
}
override
fun
onPageDismiss
()
{
override
fun
onPageDismiss
()
{
...
@@ -87,7 +87,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
...
@@ -87,7 +87,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
v
edi
oAdStatusListener
?.
adSuccess
()
v
ide
oAdStatusListener
?.
adSuccess
()
}
}
override
fun
onVideoPlayError
(
p0
:
Int
,
p1
:
Int
)
{
override
fun
onVideoPlayError
(
p0
:
Int
,
p1
:
Int
)
{
...
@@ -95,7 +95,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
...
@@ -95,7 +95,7 @@ class KsVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_KS
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
""
)
v
edi
oAdStatusListener
?.
adFail
()
v
ide
oAdStatusListener
?.
adFail
()
}
}
override
fun
onVideoPlayEnd
()
{
override
fun
onVideoPlayEnd
()
{
...
@@ -123,8 +123,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
...
@@ -123,8 +123,8 @@ class KsVideoAdManager private constructor(activity: Activity) :
}
}
fun
setV
edioAdStatusListener
(
vedioAdStatusListener
:
Vedi
oAdStatusListener
?)
{
fun
setV
ideoAdStatusListener
(
videoAdStatusListener
:
Vide
oAdStatusListener
?)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/MhVideoAdManager.kt
View file @
7ccdbd65
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ad.video
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ad.video
import
android.app.Activity
import
android.app.Activity
import
com.maplehaze.adsdk.video.RewardVideoAd
import
com.maplehaze.adsdk.video.RewardVideoAd
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
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.MhManager
import
com.mints.goodmoney.manager.MhManager
...
@@ -18,7 +18,7 @@ private val TAG = MhVideoAdManager::class.java.simpleName
...
@@ -18,7 +18,7 @@ private val TAG = MhVideoAdManager::class.java.simpleName
class
MhVideoAdManager
private
constructor
(
activity
:
Activity
)
:
class
MhVideoAdManager
private
constructor
(
activity
:
Activity
)
:
BaseVideoAd
()
{
BaseVideoAd
()
{
private
var
v
edioAdStatusListener
:
Vedi
oAdStatusListener
?
=
null
private
var
v
ideoAdStatusListener
:
Vide
oAdStatusListener
?
=
null
private
var
mRewardVideoAd
:
RewardVideoAd
?
=
null
private
var
mRewardVideoAd
:
RewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
...
@@ -85,7 +85,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
...
@@ -85,7 +85,7 @@ class MhVideoAdManager 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
}
}
v
edi
oAdStatusListener
?.
adDownload
()
v
ide
oAdStatusListener
?.
adDownload
()
}
}
override
fun
onVideoComplete
()
{
override
fun
onVideoComplete
()
{
...
@@ -99,7 +99,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
...
@@ -99,7 +99,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_FL
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
v
edi
oAdStatusListener
?.
adSuccess
()
v
ide
oAdStatusListener
?.
adSuccess
()
}
}
override
fun
onADError
(
p0
:
Int
)
{
override
fun
onADError
(
p0
:
Int
)
{
...
@@ -107,7 +107,7 @@ class MhVideoAdManager private constructor(activity: Activity) :
...
@@ -107,7 +107,7 @@ class MhVideoAdManager 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
(),
""
)
v
edi
oAdStatusListener
?.
adFail
()
v
ide
oAdStatusListener
?.
adFail
()
}
}
})
})
...
@@ -115,8 +115,8 @@ class MhVideoAdManager private constructor(activity: Activity) :
...
@@ -115,8 +115,8 @@ class MhVideoAdManager private constructor(activity: Activity) :
mRewardVideoAd
?.
loadAd
()
mRewardVideoAd
?.
loadAd
()
}
}
fun
setV
edioAdStatusListener
(
vedioAdStatusListener
:
Vedi
oAdStatusListener
?)
{
fun
setV
ideoAdStatusListener
(
videoAdStatusListener
:
Vide
oAdStatusListener
?)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/RTAVideoAdManager.kt
0 → 100644
View file @
7ccdbd65
package
com.mints.goodmoney.ad.video
import
android.app.Activity
import
com.fly.videowake.ad.ManageVideoAd
import
com.fly.videowake.ad.VideoRewardListener
import
com.mints.goodmoney.MintsApplication
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.VideoAdStatusListener
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TrackManager
import
com.mints.goodmoney.utils.LogUtil
private
val
TAG
=
RTAVideoAdManager
::
class
.
java
.
simpleName
/**
* ACT激励视频
*/
class
RTAVideoAdManager
private
constructor
(
activity
:
Activity
)
:
BaseVideoAd
()
{
private
var
videoAdStatusListener
:
VideoAdStatusListener
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
activity
:
Activity
?
=
null
private
var
manageVideoAd
:
ManageVideoAd
?
=
null
companion
object
{
const
val
RTA_ID
=
38
private
var
_inst
:
RTAVideoAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
RTAVideoAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
RTAVideoAdManager
(
activity
)
_inst
}
}
}
init
{
init
(
activity
)
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
}
override
fun
loadAd
(
activity
:
Activity
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
this
.
activity
=
activity
isClickScreen
=
true
manageVideoAd
=
ManageVideoAd
(
activity
,
RTA_ID
,
MintsApplication
.
OAID
)
manageVideoAd
?.
setVideoRewardListener
(
object
:
VideoRewardListener
{
override
fun
onVideoPlayStart
()
{
LogUtil
.
d
(
TAG
,
"onVideoPlayStart -> "
)
}
override
fun
onLoadSuccess
()
{
LogUtil
.
d
(
TAG
,
"onLoadSuccess -> "
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
// 展示广告
manageVideoAd
?.
showAD
()
}
override
fun
onAdShow
()
{
LogUtil
.
d
(
TAG
,
"onAdShow -> "
)
}
override
fun
onVideoPlaySkip
()
{
LogUtil
.
d
(
TAG
,
"onVideoPlaySkip -> "
)
}
override
fun
onLoadFail
(
p0
:
String
?)
{
LogUtil
.
d
(
TAG
,
"onLoadFail -> "
+
p0
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_ONE
,
(
p0
).
toString
(),
""
)
videoAdStatusListener
?.
adFail
()
}
override
fun
onAdClick
()
{
LogUtil
.
d
(
TAG
,
"onAdClick -> "
)
if
(
AppConfig
.
needReportClickAdEvent
)
{
TrackManager
.
getInstance
().
reportClickAdEvent
()
}
LogUtil
.
d
(
TAG
,
"onADClick"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
videoAdStatusListener
?.
adDownload
()
}
override
fun
onVideoPlayComplete
()
{
LogUtil
.
d
(
TAG
,
"onVideoPlayComplete -> "
)
}
override
fun
onAdClosed
()
{
LogUtil
.
d
(
TAG
,
"onAdClosed -> "
)
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_RTA
,
extraId
,
curCoin
))
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_RTA
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
videoAdStatusListener
?.
adSuccess
()
}
})
manageVideoAd
?.
loadAD
()
}
fun
setVideoAdStatusListener
(
videoAdStatusListener
:
VideoAdStatusListener
?)
{
this
.
videoAdStatusListener
=
videoAdStatusListener
}
override
fun
onDestroy
()
{
manageVideoAd
?.
setVideoRewardListener
(
null
)
manageVideoAd
=
null
activity
=
null
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/ShVideoAdManager.kt
View file @
7ccdbd65
...
@@ -5,7 +5,7 @@ import android.text.TextUtils
...
@@ -5,7 +5,7 @@ import android.text.TextUtils
import
androidx.annotation.Nullable
import
androidx.annotation.Nullable
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
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
...
@@ -32,7 +32,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
...
@@ -32,7 +32,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
private
var
activity
:
Activity
?
=
null
private
var
activity
:
Activity
?
=
null
private
var
v
edioAdStatusListener
:
Vedi
oAdStatusListener
?
=
null
private
var
v
ideoAdStatusListener
:
Vide
oAdStatusListener
?
=
null
private
lateinit
var
ps
:
AppPreferences
private
lateinit
var
ps
:
AppPreferences
companion
object
{
companion
object
{
...
@@ -106,7 +106,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
...
@@ -106,7 +106,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_ONE
,
(
adError
.
code
).
toString
(),
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_ONE
,
(
adError
.
code
).
toString
(),
""
)
v
edi
oAdStatusListener
?.
adFail
()
v
ide
oAdStatusListener
?.
adFail
()
}
}
override
fun
onAdShow
(
@Nullable
ad
:
CoralAD
?):
Boolean
{
override
fun
onAdShow
(
@Nullable
ad
:
CoralAD
?):
Boolean
{
...
@@ -128,7 +128,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
...
@@ -128,7 +128,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
isClickScreen
=
false
}
}
v
edi
oAdStatusListener
?.
adDownload
()
v
ide
oAdStatusListener
?.
adDownload
()
return
super
.
onAdClicked
(
ad
)
return
super
.
onAdClicked
(
ad
)
}
}
...
@@ -167,7 +167,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
...
@@ -167,7 +167,7 @@ class ShVideoAdManager private constructor(activity: Activity) :
LogUtil
.
d
(
TAG
,
"onVideoClosed"
)
LogUtil
.
d
(
TAG
,
"onVideoClosed"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SH
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
v
edi
oAdStatusListener
?.
adSuccess
()
v
ide
oAdStatusListener
?.
adSuccess
()
return
super
.
onVideoClosed
(
coralAD
,
s
)
return
super
.
onVideoClosed
(
coralAD
,
s
)
}
}
...
@@ -175,8 +175,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
...
@@ -175,8 +175,8 @@ class ShVideoAdManager private constructor(activity: Activity) :
}
}
fun
setV
edioAdStatusListener
(
vedioAdStatusListener
:
Vedi
oAdStatusListener
?)
{
fun
setV
ideoAdStatusListener
(
videoAdStatusListener
:
Vide
oAdStatusListener
?)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
}
}
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/VideoAdingManager.java
View file @
7ccdbd65
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/WnVideoAdManager.kt
View file @
7ccdbd65
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.ad.video
...
@@ -2,7 +2,7 @@ package com.mints.goodmoney.ad.video
import
android.app.Activity
import
android.app.Activity
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
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
...
@@ -18,7 +18,7 @@ private val TAG = WnVideoAdManager::class.java.simpleName
...
@@ -18,7 +18,7 @@ private val TAG = WnVideoAdManager::class.java.simpleName
class
WnVideoAdManager
private
constructor
(
activity
:
Activity
)
:
class
WnVideoAdManager
private
constructor
(
activity
:
Activity
)
:
BaseVideoAd
()
{
BaseVideoAd
()
{
private
var
v
edioAdStatusListener
:
Vedi
oAdStatusListener
?
=
null
private
var
v
ideoAdStatusListener
:
Vide
oAdStatusListener
?
=
null
private
var
mRewardVideoAd
:
WNRewardVideoAd
?
=
null
private
var
mRewardVideoAd
:
WNRewardVideoAd
?
=
null
private
var
isClickScreen
:
Boolean
=
true
private
var
isClickScreen
:
Boolean
=
true
...
@@ -66,7 +66,7 @@ class WnVideoAdManager private constructor(activity: Activity) :
...
@@ -66,7 +66,7 @@ class WnVideoAdManager 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
)
v
edi
oAdStatusListener
?.
adFail
()
v
ide
oAdStatusListener
?.
adFail
()
}
}
override
fun
onLoad
(
ad
:
WNRewardVideoAd
)
{
override
fun
onLoad
(
ad
:
WNRewardVideoAd
)
{
...
@@ -87,7 +87,7 @@ class WnVideoAdManager private constructor(activity: Activity) :
...
@@ -87,7 +87,7 @@ class WnVideoAdManager 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
}
}
v
edi
oAdStatusListener
?.
adDownload
()
v
ide
oAdStatusListener
?.
adDownload
()
}
}
override
fun
onAdClose
()
{
override
fun
onAdClose
()
{
...
@@ -95,7 +95,7 @@ class WnVideoAdManager private constructor(activity: Activity) :
...
@@ -95,7 +95,7 @@ class WnVideoAdManager private constructor(activity: Activity) :
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
v
edi
oAdStatusListener
?.
adSuccess
()
v
ide
oAdStatusListener
?.
adSuccess
()
}
}
override
fun
onVideoComplete
()
{
override
fun
onVideoComplete
()
{
...
@@ -120,8 +120,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
...
@@ -120,8 +120,8 @@ class WnVideoAdManager private constructor(activity: Activity) :
})
})
}
}
fun
setV
edioAdStatusListener
(
vedioAdStatusListener
:
Vedi
oAdStatusListener
?)
{
fun
setV
ideoAdStatusListener
(
videoAdStatusListener
:
Vide
oAdStatusListener
?)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
}
}
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/YlhVideoAdManager.java
View file @
7ccdbd65
...
@@ -4,7 +4,7 @@ import android.app.Activity;
...
@@ -4,7 +4,7 @@ import android.app.Activity;
import
android.os.SystemClock
;
import
android.os.SystemClock
;
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
;
import
com.mints.goodmoney.ad.video.base.BaseVideoAd
;
import
com.mints.goodmoney.ad.video.base.V
edi
oAdStatusListener
;
import
com.mints.goodmoney.ad.video.base.V
ide
oAdStatusListener
;
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
;
...
@@ -14,8 +14,6 @@ import com.qq.e.ads.rewardvideo.RewardVideoAD;
...
@@ -14,8 +14,6 @@ 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
;
import
java.lang.ref.WeakReference
;
/**
/**
* 优量汇视频
* 优量汇视频
*/
*/
...
@@ -26,32 +24,21 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -26,32 +24,21 @@ public class YlhVideoAdManager extends BaseVideoAd {
// 优量汇激励视频
// 优量汇激励视频
private
RewardVideoAD
rewardVideoAD
;
private
RewardVideoAD
rewardVideoAD
;
private
VedioAdStatusListener
vedioAdStatusListener
;
private
VideoAdStatusListener
videoAdStatusListener
;
private
Activity
activity
;
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
private
boolean
isClickScreen
=
true
;
// 是否点击屏幕跳转广告
public
static
YlhVideoAdManager
getInstance
(
Activity
activity
)
{
public
static
YlhVideoAdManager
getInstance
()
{
if
(
_inst
!=
null
)
{
if
(
_inst
!=
null
)
{
return
_inst
;
return
_inst
;
}
else
{
}
else
{
_inst
=
new
YlhVideoAdManager
(
activity
);
_inst
=
new
YlhVideoAdManager
();
return
_inst
;
return
_inst
;
}
}
}
}
private
YlhVideoAdManager
(
Activity
activity
)
{
init
(
activity
);
}
private
void
init
(
Activity
activity
)
{
this
.
activity
=
activity
;
}
@Override
@Override
public
void
onDestroy
()
{
public
void
onDestroy
()
{
activity
=
null
;
rewardVideoAD
=
null
;
rewardVideoAD
=
null
;
}
}
...
@@ -60,7 +47,6 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -60,7 +47,6 @@ public class YlhVideoAdManager extends BaseVideoAd {
*/
*/
@Override
@Override
public
void
loadAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
public
void
loadAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
this
.
activity
=
activity
;
isClickScreen
=
true
;
isClickScreen
=
true
;
String
ylhPostId
;
String
ylhPostId
;
...
@@ -151,8 +137,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -151,8 +137,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
}
}
...
@@ -193,8 +179,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -193,8 +179,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adDownload
();
v
ide
oAdStatusListener
.
adDownload
();
}
}
}
}
...
@@ -209,8 +195,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -209,8 +195,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_YLH
,
extraId
,
curCoin
));
TrackManager
.
getInstance
().
reportAddCoinMsg
(
activity
,
getAdMapVO
(
carrierType
,
Constant
.
AD_SOURCE_YLH
,
extraId
,
curCoin
));
if
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adSuccess
();
v
ide
oAdStatusListener
.
adSuccess
();
}
}
}
}
...
@@ -223,8 +209,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -223,8 +209,8 @@ public class YlhVideoAdManager extends BaseVideoAd {
// 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
(
v
edi
oAdStatusListener
!=
null
)
{
if
(
v
ide
oAdStatusListener
!=
null
)
{
v
edi
oAdStatusListener
.
adFail
();
v
ide
oAdStatusListener
.
adFail
();
}
}
}
}
});
});
...
@@ -232,7 +218,7 @@ public class YlhVideoAdManager extends BaseVideoAd {
...
@@ -232,7 +218,7 @@ public class YlhVideoAdManager extends BaseVideoAd {
rewardVideoAD
.
loadAD
();
rewardVideoAD
.
loadAD
();
}
}
public
void
setV
edioAdStatusListener
(
VedioAdStatusListener
vedi
oAdStatusListener
)
{
public
void
setV
ideoAdStatusListener
(
VideoAdStatusListener
vide
oAdStatusListener
)
{
this
.
v
edioAdStatusListener
=
vedi
oAdStatusListener
;
this
.
v
ideoAdStatusListener
=
vide
oAdStatusListener
;
}
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/video/base/VedioAdStatusListener.kt
View file @
7ccdbd65
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ad.video.base
...
@@ -3,7 +3,7 @@ package com.mints.goodmoney.ad.video.base
/**
/**
* 广告状态触发事件
* 广告状态触发事件
*/
*/
interface
V
edi
oAdStatusListener
{
interface
V
ide
oAdStatusListener
{
/**
/**
* 广告加载失败
* 广告加载失败
*/
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/AppConfig.java
View file @
7ccdbd65
...
@@ -97,6 +97,10 @@ public class AppConfig {
...
@@ -97,6 +97,10 @@ public class AppConfig {
* ksVideo 剩余广告播放数
* ksVideo 剩余广告播放数
*/
*/
public
static
int
ksVideoAdCount
=
5
;
public
static
int
ksVideoAdCount
=
5
;
/**
* rtaVideo 剩余广告播放数
*/
public
static
int
rtaVideoAdCount
=
5
;
/**
/**
* 高额试玩任务标识
* 高额试玩任务标识
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
7ccdbd65
...
@@ -148,6 +148,7 @@ object Constant {
...
@@ -148,6 +148,7 @@ object Constant {
const
val
AD_SOURCE_CSJFULL
=
"CSJFULL"
const
val
AD_SOURCE_CSJFULL
=
"CSJFULL"
const
val
AD_SOURCE_SH
=
"CORAL"
//珊瑚天卓
const
val
AD_SOURCE_SH
=
"CORAL"
//珊瑚天卓
const
val
AD_SOURCE_KS
=
"KS"
//快手
const
val
AD_SOURCE_KS
=
"KS"
//快手
const
val
AD_SOURCE_RTA
=
"RTA"
//RTA
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const
val
EVENT_TYPE_ZERO
=
"0"
const
val
EVENT_TYPE_ZERO
=
"0"
...
@@ -169,6 +170,7 @@ object Constant {
...
@@ -169,6 +170,7 @@ object Constant {
const
val
CSJ_FULL_AD
=
"CSJFULL_VEDIO_AD"
const
val
CSJ_FULL_AD
=
"CSJFULL_VEDIO_AD"
const
val
SH_VEDIO_AD
=
"SH_VEDIO_AD"
const
val
SH_VEDIO_AD
=
"SH_VEDIO_AD"
const
val
KS_VEDIO_AD
=
"KS_VEDIO_AD"
const
val
KS_VEDIO_AD
=
"KS_VEDIO_AD"
const
val
RTA_VEDIO_AD
=
"RTA_VEDIO_AD"
// 信息流广告类型
// 信息流广告类型
const
val
CSJ_EXPRESS_AD
=
"CSJ_EXPRESS_AD"
const
val
CSJ_EXPRESS_AD
=
"CSJ_EXPRESS_AD"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
7ccdbd65
...
@@ -87,6 +87,15 @@ public class DrawcashBean implements Serializable {
...
@@ -87,6 +87,15 @@ public class DrawcashBean implements Serializable {
private
int
FL_VEDIO
;
private
int
FL_VEDIO
;
private
int
CORAL_VEDIO
;
private
int
CORAL_VEDIO
;
private
int
KS_VEDIO
;
private
int
KS_VEDIO
;
private
int
RTA_VEDIO
;
public
int
getRTA_VEDIO
()
{
return
RTA_VEDIO
;
}
public
void
setRTA_VEDIO
(
int
RTA_VEDIO
)
{
this
.
RTA_VEDIO
=
RTA_VEDIO
;
}
public
int
getCORAL_VEDIO
()
{
public
int
getCORAL_VEDIO
()
{
return
CORAL_VEDIO
;
return
CORAL_VEDIO
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/VedioRulesBean.java
View file @
7ccdbd65
...
@@ -11,6 +11,7 @@ public class VedioRulesBean implements Serializable {
...
@@ -11,6 +11,7 @@ public class VedioRulesBean implements Serializable {
private
CsjfullVedioBean
CSJFULL_VEDIO
;
private
CsjfullVedioBean
CSJFULL_VEDIO
;
private
CORALVedioBean
CORAL_VEDIO
;
private
CORALVedioBean
CORAL_VEDIO
;
private
KSVedioBean
KS_VEDIO
;
private
KSVedioBean
KS_VEDIO
;
private
RTAVedioBean
RTA_VEDIO
;
private
boolean
flVideoFlag
;
private
boolean
flVideoFlag
;
public
class
CsjVedioBean
implements
Serializable
{
public
class
CsjVedioBean
implements
Serializable
{
...
@@ -91,6 +92,19 @@ public class VedioRulesBean implements Serializable {
...
@@ -91,6 +92,19 @@ public class VedioRulesBean implements Serializable {
}
}
}
}
public
class
RTAVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
rate
;
public
int
getSurplus
()
{
return
surplus
;
}
public
int
getRate
()
{
return
rate
;
}
}
public
class
CsjfullVedioBean
implements
Serializable
{
public
class
CsjfullVedioBean
implements
Serializable
{
private
int
surplus
;
private
int
surplus
;
private
int
rate
;
private
int
rate
;
...
@@ -125,6 +139,14 @@ public class VedioRulesBean implements Serializable {
...
@@ -125,6 +139,14 @@ public class VedioRulesBean implements Serializable {
return
CORAL_VEDIO
;
return
CORAL_VEDIO
;
}
}
public
RTAVedioBean
getRTA_VEDIO
()
{
return
RTA_VEDIO
;
}
public
void
setRTA_VEDIO
(
RTAVedioBean
RTA_VEDIO
)
{
this
.
RTA_VEDIO
=
RTA_VEDIO
;
}
public
KSVedioBean
getKS_VEDIO
()
{
public
KSVedioBean
getKS_VEDIO
()
{
return
KS_VEDIO
;
return
KS_VEDIO
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/VersionUpdatePresenter.java
View file @
7ccdbd65
...
@@ -8,7 +8,9 @@ import android.content.Intent;
...
@@ -8,7 +8,9 @@ import android.content.Intent;
import
android.content.ServiceConnection
;
import
android.content.ServiceConnection
;
import
android.net.Uri
;
import
android.net.Uri
;
import
android.os.IBinder
;
import
android.os.IBinder
;
import
androidx.appcompat.app.AlertDialog
;
import
androidx.appcompat.app.AlertDialog
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.text.method.ScrollingMovementMethod
;
import
android.text.method.ScrollingMovementMethod
;
import
android.view.KeyEvent
;
import
android.view.KeyEvent
;
...
@@ -56,6 +58,7 @@ public class VersionUpdatePresenter {
...
@@ -56,6 +58,7 @@ public class VersionUpdatePresenter {
Button
btnDuUpdate
;
Button
btnDuUpdate
;
private
Subscription
subscription
;
private
Subscription
subscription
;
private
UpdateService
mUpdateService
;
public
void
updateVersion
(
Activity
activity
)
{
public
void
updateVersion
(
Activity
activity
)
{
if
(
activity
==
null
)
if
(
activity
==
null
)
...
@@ -210,6 +213,16 @@ public class VersionUpdatePresenter {
...
@@ -210,6 +213,16 @@ public class VersionUpdatePresenter {
btnDuUpdate
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
btnDuUpdate
.
setOnClickListener
(
new
View
.
OnClickListener
()
{
@Override
@Override
public
void
onClick
(
View
v
)
{
public
void
onClick
(
View
v
)
{
if
(
TextUtils
.
equals
(
btnDuUpdate
.
getText
(),
"立即安装"
))
{
if
(
mUpdateService
!=
null
)
{
mUpdateService
.
autoInstallApk
();
}
else
{
ToastUtil
.
show
(
loanApplication
.
getApplicationContext
(),
"安装失败!"
);
System
.
exit
(
0
);
}
return
;
}
boolean
url
=
CommonUtils
.
isUrl
(
appFileUrl
);
boolean
url
=
CommonUtils
.
isUrl
(
appFileUrl
);
if
(
url
)
{
if
(
url
)
{
updateApp
(
appFileUrl
,
granted
);
updateApp
(
appFileUrl
,
granted
);
...
@@ -254,12 +267,13 @@ public class VersionUpdatePresenter {
...
@@ -254,12 +267,13 @@ public class VersionUpdatePresenter {
public
void
onServiceConnected
(
ComponentName
name
,
IBinder
service
)
{
public
void
onServiceConnected
(
ComponentName
name
,
IBinder
service
)
{
// //返回一个MsgService对象
// //返回一个MsgService对象
UpdateService
u
pdateService
=
((
UpdateService
.
UpdateBinder
)
service
).
getService
();
mU
pdateService
=
((
UpdateService
.
UpdateBinder
)
service
).
getService
();
//
//
// //注册回调接口来接收下载进度的变化
// //注册回调接口来接收下载进度的变化
u
pdateService
.
setUpdateNotification
(
new
UpdateService
.
UpdateNotification
()
{
mU
pdateService
.
setUpdateNotification
(
new
UpdateService
.
UpdateNotification
()
{
@Override
@Override
public
void
updateProgress
(
int
progress
)
{
public
void
updateProgress
(
int
progress
)
{
if
(
pbDuUpdating
!=
null
)
{
if
(
pbDuUpdating
!=
null
)
{
pbDuUpdating
.
setProgress
(
progress
);
pbDuUpdating
.
setProgress
(
progress
);
if
(
btnDuUpdate
!=
null
&&
progress
==
100
)
{
if
(
btnDuUpdate
!=
null
&&
progress
==
100
)
{
...
@@ -270,7 +284,13 @@ public class VersionUpdatePresenter {
...
@@ -270,7 +284,13 @@ public class VersionUpdatePresenter {
@Override
@Override
public
void
finishProgress
()
{
public
void
finishProgress
()
{
if
(
pbDuUpdating
!=
null
)
{
pbDuUpdating
.
setProgress
(
100
);
}
if
(
btnDuUpdate
!=
null
)
{
btnDuUpdate
.
setEnabled
(
true
);
btnDuUpdate
.
setText
(
"立即安装"
);
}
}
}
});
});
...
@@ -311,6 +331,7 @@ public class VersionUpdatePresenter {
...
@@ -311,6 +331,7 @@ public class VersionUpdatePresenter {
}
}
public
void
dispose
()
{
public
void
dispose
()
{
mUpdateService
=
null
;
loanService
=
null
;
loanService
=
null
;
activity
=
null
;
activity
=
null
;
loanApplication
=
null
;
loanApplication
=
null
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/service/UpdateService.java
View file @
7ccdbd65
...
@@ -12,13 +12,17 @@ import android.os.Build;
...
@@ -12,13 +12,17 @@ import android.os.Build;
import
android.os.Handler
;
import
android.os.Handler
;
import
android.os.IBinder
;
import
android.os.IBinder
;
import
android.os.Message
;
import
android.os.Message
;
import
androidx.core.app.NotificationCompat
;
import
androidx.core.app.NotificationCompat
;
import
androidx.core.content.FileProvider
;
import
androidx.core.content.FileProvider
;
import
android.widget.RemoteViews
;
import
android.widget.RemoteViews
;
import
com.mints.goodmoney.MintsApplication
;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.R
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.ui.activitys.MainActivity
;
import
com.mints.goodmoney.ui.activitys.MainActivity
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
java.io.File
;
import
java.io.File
;
import
java.io.FileOutputStream
;
import
java.io.FileOutputStream
;
...
@@ -202,6 +206,18 @@ public class UpdateService extends Service {
...
@@ -202,6 +206,18 @@ public class UpdateService extends Service {
}).
start
();
}).
start
();
}
}
/**
* 安装 apk 文件
*/
public
void
autoInstallApk
()
{
if
(
updateFile
!=
null
)
{
autoInstallApk
(
updateFile
);
}
else
{
ToastUtil
.
show
(
MintsApplication
.
getContext
(),
"安装失败!"
);
System
.
exit
(
0
);
}
}
/**
/**
* 安装 apk 文件
* 安装 apk 文件
*/
*/
...
@@ -210,7 +226,7 @@ public class UpdateService extends Service {
...
@@ -210,7 +226,7 @@ public class UpdateService extends Service {
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
N
)
{
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
N
)
{
intent
.
setDataAndType
(
Uri
.
fromFile
(
file
),
"application/vnd.android.package-archive"
);
intent
.
setDataAndType
(
Uri
.
fromFile
(
file
),
"application/vnd.android.package-archive"
);
}
else
{
//Android7.0之后获取uri要用contentProvider
}
else
{
//Android7.0之后获取uri要用contentProvider
Uri
contentUri
=
FileProvider
.
getUriForFile
(
getApplicationContext
(),
Constant
.
MINTS_PKG_NAME
+
".fileprovider"
,
file
);
Uri
contentUri
=
FileProvider
.
getUriForFile
(
getApplicationContext
(),
Constant
.
MINTS_PKG_NAME
+
".fileprovider"
,
file
);
intent
.
setDataAndType
(
contentUri
,
"application/vnd.android.package-archive"
);
intent
.
setDataAndType
(
contentUri
,
"application/vnd.android.package-archive"
);
intent
.
addFlags
(
Intent
.
FLAG_GRANT_READ_URI_PERMISSION
);
intent
.
addFlags
(
Intent
.
FLAG_GRANT_READ_URI_PERMISSION
);
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
7ccdbd65
...
@@ -400,7 +400,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -400,7 +400,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
flAwardAd
?.
removeAllViews
()
flAwardAd
?.
removeAllViews
()
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
onDest
or
y
()
videoAdingManager
.
onDest
ro
y
()
awardPresenter
.
detachView
()
awardPresenter
.
detachView
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawNativeVideoActivity.kt
View file @
7ccdbd65
...
@@ -35,7 +35,6 @@ import com.mints.goodmoney.mvp.views.KylVideoView
...
@@ -35,7 +35,6 @@ import com.mints.goodmoney.mvp.views.KylVideoView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.adapter.DrawVideoAdapter
import
com.mints.goodmoney.ui.adapter.DrawVideoAdapter
import
com.mints.goodmoney.utils.MD5
import
com.mints.goodmoney.utils.MD5
import
com.mints.goodmoney.utils.ToastUtil
import
com.tbruyelle.rxpermissions.RxPermissions
import
com.tbruyelle.rxpermissions.RxPermissions
import
kotlinx.android.synthetic.main.activity_draw_native_video.*
import
kotlinx.android.synthetic.main.activity_draw_native_video.*
...
@@ -74,9 +73,6 @@ class DrawNativeVideoActivity : BaseActivity(),
...
@@ -74,9 +73,6 @@ class DrawNativeVideoActivity : BaseActivity(),
const
val
WEB_VIDEO_URL
=
"https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId="
const
val
WEB_VIDEO_URL
=
"https://vring.kuyin123.com/friend/94aa83142f7f5c98?videoId="
}
}
// Video 视频播放生命周期控制
private
var
isVideoPlayPause
=
false
// 列表页面播放page
// 列表页面播放page
private
var
mCurrentPage
=
0
private
var
mCurrentPage
=
0
...
@@ -309,7 +305,7 @@ class DrawNativeVideoActivity : BaseActivity(),
...
@@ -309,7 +305,7 @@ class DrawNativeVideoActivity : BaseActivity(),
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
mCsjDrawAdManager
?.
onDestroy
()
mCsjDrawAdManager
?.
onDestroy
()
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
onDest
or
y
()
videoAdingManager
.
onDest
ro
y
()
super
.
onDestroy
()
super
.
onDestroy
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
7ccdbd65
...
@@ -27,7 +27,6 @@ import com.mints.library.utils.CommonUtils
...
@@ -27,7 +27,6 @@ import com.mints.library.utils.CommonUtils
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.nodoubleclick.AntiShake
import
com.mints.library.utils.nodoubleclick.AntiShake
import
kotlinx.android.synthetic.main.activity_drawcash.*
import
kotlinx.android.synthetic.main.activity_drawcash.*
import
kotlinx.android.synthetic.main.fragment_main_my.*
import
kotlinx.android.synthetic.main.header_layout.*
import
kotlinx.android.synthetic.main.header_layout.*
import
kotlinx.android.synthetic.main.view_title.*
import
kotlinx.android.synthetic.main.view_title.*
import
java.math.BigDecimal
import
java.math.BigDecimal
...
@@ -57,8 +56,8 @@ class DrawcashActivity : BaseActivity(),
...
@@ -57,8 +56,8 @@ class DrawcashActivity : BaseActivity(),
private
var
isLoadRvItem
:
Boolean
=
true
//是否首次加载rv item
private
var
isLoadRvItem
:
Boolean
=
true
//是否首次加载rv item
// private var isJDNewUser = false
// private var isJDNewUser = false
// private var jumpJdUrl: String? = null
// private var jumpJdUrl: String? = null
// private var jdTintDialog: JDTintDialog? = null
// private var jdTintDialog: JDTintDialog? = null
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_drawcash
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_drawcash
...
@@ -306,7 +305,8 @@ class DrawcashActivity : BaseActivity(),
...
@@ -306,7 +305,8 @@ class DrawcashActivity : BaseActivity(),
data
.
fL_VEDIO
,
data
.
fL_VEDIO
,
data
.
coraL_VEDIO
,
data
.
coraL_VEDIO
,
data
.
csjfulL_VEDIO
,
data
.
csjfulL_VEDIO
,
data
.
kS_VEDIO
data
.
kS_VEDIO
,
data
.
rtA_VEDIO
)
)
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} "
+
LogUtil
.
d
(
TAG
,
"提现权重值:csjWeight:${data.csJ_VEDIO} "
+
"ylhWeight:${data.ylH_VEDIO} "
+
"ylhWeight:${data.ylH_VEDIO} "
+
...
@@ -314,6 +314,7 @@ class DrawcashActivity : BaseActivity(),
...
@@ -314,6 +314,7 @@ class DrawcashActivity : BaseActivity(),
"csjFullWeight:${data.csjfulL_VEDIO} "
+
"csjFullWeight:${data.csjfulL_VEDIO} "
+
"shWeight:${data.coraL_VEDIO} "
+
"shWeight:${data.coraL_VEDIO} "
+
"flWeight:${data.fL_VEDIO} "
+
"flWeight:${data.fL_VEDIO} "
+
"rtaWeight:${data.rtA_VEDIO} "
+
"ksWeight:${data.kS_VEDIO}"
"ksWeight:${data.kS_VEDIO}"
)
)
// 广告视频数
// 广告视频数
...
@@ -324,6 +325,7 @@ class DrawcashActivity : BaseActivity(),
...
@@ -324,6 +325,7 @@ class DrawcashActivity : BaseActivity(),
AppConfig
.
shVideoAdCount
=
10
AppConfig
.
shVideoAdCount
=
10
AppConfig
.
csjFullVideoAdCount
=
10
AppConfig
.
csjFullVideoAdCount
=
10
AppConfig
.
ksVideoAdCount
=
10
AppConfig
.
ksVideoAdCount
=
10
AppConfig
.
rtaVideoAdCount
=
10
}
}
/**
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
View file @
7ccdbd65
...
@@ -20,7 +20,7 @@ import java.util.*
...
@@ -20,7 +20,7 @@ import java.util.*
class
GuideActivity
:
BaseActivity
()
{
class
GuideActivity
:
BaseActivity
()
{
private
val
animatorSet
by
lazy
{
AnimatorSet
()
}
private
val
animatorSet
by
lazy
{
AnimatorSet
()
}
private
var
mImageViews
=
ArrayList
<
Image
View
>()
private
var
mImageViews
=
ArrayList
<
View
>()
private
val
guideImgs
=
intArrayOf
(
R
.
mipmap
.
bg_guide1
,
R
.
mipmap
.
bg_guide2
,
R
.
mipmap
.
bg_guide3
,
R
.
mipmap
.
bg_guide4
)
private
val
guideImgs
=
intArrayOf
(
R
.
mipmap
.
bg_guide1
,
R
.
mipmap
.
bg_guide2
,
R
.
mipmap
.
bg_guide3
,
R
.
mipmap
.
bg_guide4
)
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_guide
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
activity_guide
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/KylVideoActivity.kt
View file @
7ccdbd65
...
@@ -100,7 +100,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
...
@@ -100,7 +100,7 @@ class KylVideoActivity : BaseActivity(), View.OnClickListener, KylVideoView {
PRDownloader
.
cancel
(
downloadId
)
PRDownloader
.
cancel
(
downloadId
)
}
}
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
setVideoAdingListener
(
null
)
videoAdingManager
.
onDest
or
y
()
videoAdingManager
.
onDest
ro
y
()
kylVideoPresenter
.
detachView
()
kylVideoPresenter
.
detachView
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
7ccdbd65
...
@@ -96,7 +96,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
...
@@ -96,7 +96,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
TTPreLoadCarrierExpressManager
.
getInstance
().
onDestroy
()
TTPreLoadCarrierExpressManager
.
getInstance
().
onDestroy
()
VideoAdingManager
.
getInstance
(
this
).
setVideoAdingListener
(
null
)
VideoAdingManager
.
getInstance
(
this
).
setVideoAdingListener
(
null
)
VideoAdingManager
.
getInstance
(
this
).
onDest
or
y
()
VideoAdingManager
.
getInstance
(
this
).
onDest
ro
y
()
}
}
public
override
fun
onSaveInstanceState
(
outState
:
Bundle
)
{
public
override
fun
onSaveInstanceState
(
outState
:
Bundle
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WrapperActivity.kt
View file @
7ccdbd65
...
@@ -74,7 +74,7 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
...
@@ -74,7 +74,7 @@ class WrapperActivity : BaseActivity(), View.OnClickListener {
}
}
}
}
if
(!
currentFragment
!!
.
isAdded
)
{
if
(!
currentFragment
.
isAdded
)
{
// 提交事务
// 提交事务
supportFragmentManager
.
beginTransaction
()
supportFragmentManager
.
beginTransaction
()
.
add
(
R
.
id
.
flWrapper
,
currentFragment
).
commitAllowingStateLoss
()
.
add
(
R
.
id
.
flWrapper
,
currentFragment
).
commitAllowingStateLoss
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/GvMyAdapter.java
View file @
7ccdbd65
...
@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.adapter;
...
@@ -3,7 +3,6 @@ package com.mints.goodmoney.ui.adapter;
import
android.annotation.SuppressLint
;
import
android.annotation.SuppressLint
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.Context
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.view.LayoutInflater
;
import
android.view.LayoutInflater
;
import
android.view.View
;
import
android.view.View
;
...
@@ -18,7 +17,6 @@ import com.mints.goodmoney.common.Constant;
...
@@ -18,7 +17,6 @@ import com.mints.goodmoney.common.Constant;
import
com.mints.goodmoney.manager.BxmManager
;
import
com.mints.goodmoney.manager.BxmManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.mvp.model.BannerBean
;
import
com.mints.goodmoney.mvp.model.BannerBean
;
import
com.mints.goodmoney.utils.ForegroundOrBackground
;
import
com.mints.library.utils.GlideUtils
;
import
com.mints.library.utils.GlideUtils
;
import
java.util.List
;
import
java.util.List
;
...
@@ -32,28 +30,35 @@ import java.util.List;
...
@@ -32,28 +30,35 @@ import java.util.List;
public
class
GvMyAdapter
extends
BaseAdapter
{
public
class
GvMyAdapter
extends
BaseAdapter
{
private
List
<
BannerBean
.
ListBean
>
orders
;
private
List
<
BannerBean
.
ListBean
>
orders
;
private
Context
context
;
private
Activity
activity
;
private
Activity
activity
;
public
GvMyAdapter
(
Context
context
,
Activity
activity
,
List
<
BannerBean
.
ListBean
>
orders
)
{
private
int
mCurrentIndex
;
private
int
mPageSize
;
public
GvMyAdapter
(
Activity
activity
,
List
<
BannerBean
.
ListBean
>
orders
,
int
currentIndex
,
int
pageSize
)
{
this
.
orders
=
orders
;
this
.
orders
=
orders
;
this
.
context
=
context
;
this
.
activity
=
activity
;
this
.
activity
=
activity
;
this
.
mCurrentIndex
=
currentIndex
;
this
.
mPageSize
=
pageSize
;
}
}
@Override
@Override
public
int
getCount
()
{
public
int
getCount
()
{
return
orders
==
null
?
0
:
orders
.
size
();
// return orders == null ? 0 : orders.size();
return
orders
.
size
()
>
(
mCurrentIndex
+
1
)
*
mPageSize
?
mPageSize
:
(
orders
.
size
()
-
mCurrentIndex
*
mPageSize
);
}
}
@Override
@Override
public
Object
getItem
(
int
position
)
{
public
Object
getItem
(
int
position
)
{
return
orders
.
get
(
position
);
// return orders.get(position);
return
orders
.
get
(
position
+
mCurrentIndex
*
mPageSize
);
}
}
@Override
@Override
public
long
getItemId
(
int
position
)
{
public
long
getItemId
(
int
position
)
{
return
position
;
// return position;
return
position
+
mCurrentIndex
*
mPageSize
;
}
}
@SuppressLint
(
"WrongViewCast"
)
@SuppressLint
(
"WrongViewCast"
)
...
@@ -63,7 +68,7 @@ public class GvMyAdapter extends BaseAdapter {
...
@@ -63,7 +68,7 @@ public class GvMyAdapter extends BaseAdapter {
ViewHolder
viewHolder
;
ViewHolder
viewHolder
;
if
(
convertView
==
null
)
{
if
(
convertView
==
null
)
{
LayoutInflater
inflater
=
LayoutInflater
.
from
(
context
);
LayoutInflater
inflater
=
LayoutInflater
.
from
(
activity
);
convertView
=
inflater
.
inflate
(
R
.
layout
.
item_list_my
,
null
);
convertView
=
inflater
.
inflate
(
R
.
layout
.
item_list_my
,
null
);
viewHolder
=
new
ViewHolder
();
viewHolder
=
new
ViewHolder
();
...
@@ -75,9 +80,15 @@ public class GvMyAdapter extends BaseAdapter {
...
@@ -75,9 +80,15 @@ public class GvMyAdapter extends BaseAdapter {
}
else
{
}
else
{
viewHolder
=
(
ViewHolder
)
convertView
.
getTag
();
viewHolder
=
(
ViewHolder
)
convertView
.
getTag
();
}
}
BannerBean
.
ListBean
data
=
orders
.
get
(
position
);
/**
* 在给View绑定显示的数据时,计算正确的position = position + curIndex * pageSize
*/
int
pos
=
position
+
mCurrentIndex
*
mPageSize
;
BannerBean
.
ListBean
data
=
orders
.
get
(
pos
);
if
(
data
!=
null
)
{
if
(
data
!=
null
)
{
GlideUtils
.
loadImageView
(
context
,
data
.
getImgUrl
(),
viewHolder
.
ic_my_icon
);
GlideUtils
.
loadImageView
(
activity
,
data
.
getImgUrl
(),
viewHolder
.
ic_my_icon
);
viewHolder
.
tv_my_title
.
setText
(
data
.
getTitle
());
viewHolder
.
tv_my_title
.
setText
(
data
.
getTitle
());
if
(
TextUtils
.
equals
(
data
.
getToUrl
(),
Constant
.
HOT_ACTIVITY_BXM
)
&&
UserManager
.
getInstance
().
userIsLogin
())
{
if
(
TextUtils
.
equals
(
data
.
getToUrl
(),
Constant
.
HOT_ACTIVITY_BXM
)
&&
UserManager
.
getInstance
().
userIsLogin
())
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/TaskAdapter.kt
View file @
7ccdbd65
...
@@ -9,6 +9,7 @@ import android.widget.ImageView
...
@@ -9,6 +9,7 @@ import android.widget.ImageView
import
android.widget.TextView
import
android.widget.TextView
import
androidx.recyclerview.widget.RecyclerView
import
androidx.recyclerview.widget.RecyclerView
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.mvp.model.TzTaskBean
import
com.mints.goodmoney.mvp.model.TzTaskBean
import
com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
import
com.mints.goodmoney.ui.adapter.listener.OnItemChildClickListener
...
@@ -39,8 +40,8 @@ class TaskAdapter(val dataList: List<TzTaskBean>, val context: Context) : Recycl
...
@@ -39,8 +40,8 @@ class TaskAdapter(val dataList: List<TzTaskBean>, val context: Context) : Recycl
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
override
fun
onCreateViewHolder
(
parent
:
ViewGroup
,
viewType
:
Int
):
RecyclerView
.
ViewHolder
{
if
(
viewType
==
HOLDER_TYPE_SH_CPD
)
{
if
(
viewType
==
HOLDER_TYPE_SH_CPD
)
{
// AdContainer 可能引起内存泄漏
// AdContainer 可能引起内存泄漏
val
weakReference
=
WeakReference
<
Context
>(
context
)
//
val weakReference = WeakReference<Context>(context)
val
view
=
LayoutInflater
.
from
(
weakReference
.
ge
t
()).
inflate
(
R
.
layout
.
item_task_recy
,
parent
,
false
)
val
view
=
LayoutInflater
.
from
(
MintsApplication
.
getContex
t
()).
inflate
(
R
.
layout
.
item_task_recy
,
parent
,
false
)
return
SHViewHolder
(
view
)
return
SHViewHolder
(
view
)
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/ViewPagerAdapter.java
View file @
7ccdbd65
package
com
.
mints
.
goodmoney
.
ui
.
adapter
;
package
com
.
mints
.
goodmoney
.
ui
.
adapter
;
import
androidx.viewpager.widget.PagerAdapter
;
import
androidx.viewpager.widget.PagerAdapter
;
import
android.view.View
;
import
android.view.View
;
import
android.view.ViewGroup
;
import
android.view.ViewGroup
;
import
android.widget.ImageView
;
import
android.widget.ImageView
;
...
@@ -15,16 +16,16 @@ import java.util.List;
...
@@ -15,16 +16,16 @@ import java.util.List;
*/
*/
public
class
ViewPagerAdapter
extends
PagerAdapter
{
public
class
ViewPagerAdapter
extends
PagerAdapter
{
private
List
<
ImageView
>
mImage
Views
;
private
List
<
View
>
m
Views
;
public
ViewPagerAdapter
(
List
<
ImageView
>
mImageV
iews
)
{
public
ViewPagerAdapter
(
List
<
View
>
v
iews
)
{
this
.
m
ImageViews
=
mImageV
iews
;
this
.
m
Views
=
v
iews
;
}
}
//设置viewpager条目的个数
//设置viewpager条目的个数
@Override
@Override
public
int
getCount
()
{
public
int
getCount
()
{
return
m
Image
Views
.
size
();
return
mViews
.
size
();
}
}
//判断Viewpager的页面的view对象是否和instantiateItem返回的object一致
//判断Viewpager的页面的view对象是否和instantiateItem返回的object一致
...
@@ -36,8 +37,8 @@ public class ViewPagerAdapter extends PagerAdapter {
...
@@ -36,8 +37,8 @@ public class ViewPagerAdapter extends PagerAdapter {
//添加viewpager条目的方法
//添加viewpager条目的方法
@Override
@Override
public
Object
instantiateItem
(
ViewGroup
container
,
int
position
)
{
public
Object
instantiateItem
(
ViewGroup
container
,
int
position
)
{
ImageView
imageView
=
mImage
Views
.
get
(
position
);
View
imageView
=
m
Views
.
get
(
position
);
//将
image
view添加给viewpager
//将view添加给viewpager
container
.
addView
(
imageView
);
container
.
addView
(
imageView
);
return
imageView
;
return
imageView
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
7ccdbd65
...
@@ -261,7 +261,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -261,7 +261,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
}
override
fun
getHomeVedioMsgSuc
(
data
:
MainVideoMsgBean
)
{
override
fun
getHomeVedioMsgSuc
(
data
:
MainVideoMsgBean
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
if
(
activity
==
null
||
requireActivity
().
isFinishing
)
{
return
return
...
@@ -577,7 +576,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -577,7 +576,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
fL_VEDIO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
corAl_VIDEO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
csjfulL_VEDIO
.
rate
,
data
.
vedioRules
.
kS_VEDIO
.
rate
data
.
vedioRules
.
kS_VEDIO
.
rate
,
data
.
vedioRules
.
rtA_VEDIO
.
rate
)
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
"ylhWeight:${data.vedioRules.ylH_VEDIO.rate} "
+
...
@@ -585,6 +585,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -585,6 +585,7 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"csjFullWeight:${data.vedioRules.csjfulL_VEDIO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"shWeight:${data.vedioRules.corAl_VIDEO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"flWeight:${data.vedioRules.fL_VEDIO.rate} "
+
"rtaWeight:${data.vedioRules.rtA_VEDIO.rate} "
+
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
"ksWeight:${data.vedioRules.kS_VEDIO.rate}"
)
)
// 广告视频数
// 广告视频数
...
@@ -595,18 +596,20 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -595,18 +596,20 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
csjFullVideoAdCount
=
data
.
vedioRules
.
csjfulL_VEDIO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
shVideoAdCount
=
data
.
vedioRules
.
corAl_VIDEO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
AppConfig
.
ksVideoAdCount
=
data
.
vedioRules
.
kS_VEDIO
.
surplus
AppConfig
.
rtaVideoAdCount
=
data
.
vedioRules
.
rtA_VEDIO
.
surplus
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVideoAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"ylhCount:${AppConfig.ylhAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"sdhzCount:${AppConfig.wnVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"csjFullCount:${AppConfig.csjFullVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"shCount:${AppConfig.shVideoAdCount} "
+
"flCount:${AppConfig.flVideoAdCount}"
+
"flCount:${AppConfig.flVideoAdCount} "
+
"ratCount:${AppConfig.rtaVideoAdCount} "
+
"ksCount:${AppConfig.ksVideoAdCount}"
"ksCount:${AppConfig.ksVideoAdCount}"
)
)
}
}
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
private
fun
initExpress
(
flowAdRules
:
FlowAdRulesBean
)
{
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
PreLoadExpressManager
.
init
(
flowAdRules
.
csj
,
flowAdRules
.
ylh
,
flowAdRules
.
ks
)
}
}
/**
/**
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
7ccdbd65
This diff is collapsed.
Click to expand it.
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/TaskCpdFragment.kt
View file @
7ccdbd65
...
@@ -81,7 +81,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -81,7 +81,7 @@ class TaskCpdFragment : BaseFragment(), TaskView,
@Volatile
@Volatile
private
var
shLoadCountTime
=
0
// 珊瑚 加载广告次数
private
var
shLoadCountTime
=
0
// 珊瑚 加载广告次数
//
@Volatile
@Volatile
private
var
cpdLoadCountTime
=
0
// CPD 加载广告次数
private
var
cpdLoadCountTime
=
0
// CPD 加载广告次数
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
...
@@ -205,23 +205,23 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -205,23 +205,23 @@ class TaskCpdFragment : BaseFragment(), TaskView,
}
}
}
}
// private fun loadCPDDataCycle() {
// // 循环拉取圣于地CPD广告拉取
// for (i in cpdLoadCountTime until cpdMax) {
// loadCPDData()
// }
// }
// private fun loadCPDData() {
// LogUtil.d(TAG, "syd loadCPDData")
// taskPresenter.getCpdDetail(outNetIp)
// }
private
fun
loadCPDDataList
()
{
private
fun
loadCPDDataList
()
{
// 圣于地CPD广告拉取
// 圣于地CPD广告拉取
for
(
i
in
cpdLoadCountTime
until
cpdMax
)
{
taskPresenter
.
getCpdListDetail
(
outNetIp
,
cpdMax
)
loadCPDData
()
}
}
}
private
fun
loadCPDData
()
{
LogUtil
.
d
(
TAG
,
"syd loadCPDData"
)
taskPresenter
.
getCpdDetail
(
outNetIp
)
}
// private fun loadCPDDataList() {
// // 圣于地CPD广告拉取
// taskPresenter.getCpdListDetail(outNetIp, cpdMax)
// }
override
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
{
override
fun
getCpdModelSuc
(
dataBean
:
CpdModelBean
.
DataBean
)
{
for
(
material
in
dataBean
.
materials
)
{
for
(
material
in
dataBean
.
materials
)
{
...
@@ -244,10 +244,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
...
@@ -244,10 +244,6 @@ class TaskCpdFragment : BaseFragment(), TaskView,
// 圣于地广告 循环完成后去重
// 圣于地广告 循环完成后去重
if
(
cpdLoadCountTime
++
>=
cpdMax
-
1
)
{
if
(
cpdLoadCountTime
++
>=
cpdMax
-
1
)
{
for
(
tzTaskBean
in
mFakeTaskList
)
{
LogUtil
.
d
(
"AA -> "
+
tzTaskBean
.
title
)
}
getCpdRepeatPkg
()
getCpdRepeatPkg
()
if
(
shMax
==
0
||
shLoadCountTime
>=
shMax
)
{
if
(
shMax
==
0
||
shLoadCountTime
>=
shMax
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/WrapViewPager.java
0 → 100644
View file @
7ccdbd65
package
com
.
mints
.
goodmoney
.
ui
.
widgets
;
import
android.content.Context
;
import
android.util.AttributeSet
;
import
android.view.View
;
import
androidx.viewpager.widget.ViewPager
;
public
class
WrapViewPager
extends
ViewPager
{
public
WrapViewPager
(
Context
context
)
{
super
(
context
);
}
public
WrapViewPager
(
Context
context
,
AttributeSet
attrs
)
{
super
(
context
,
attrs
);
}
@Override
protected
void
onMeasure
(
int
widthMeasureSpec
,
int
heightMeasureSpec
)
{
int
height
=
0
;
for
(
int
i
=
0
;
i
<
getChildCount
();
i
++)
{
View
child
=
getChildAt
(
i
);
child
.
measure
(
widthMeasureSpec
,
MeasureSpec
.
makeMeasureSpec
(
0
,
MeasureSpec
.
UNSPECIFIED
));
int
h
=
child
.
getMeasuredHeight
();
if
(
h
>
height
)
height
=
h
;
}
heightMeasureSpec
=
MeasureSpec
.
makeMeasureSpec
(
height
,
MeasureSpec
.
EXACTLY
);
super
.
onMeasure
(
widthMeasureSpec
,
heightMeasureSpec
);
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/dialog/DrawcashVideoDialog.kt
View file @
7ccdbd65
...
@@ -50,7 +50,7 @@ class DrawcashVideoDialog(activity: Activity) :
...
@@ -50,7 +50,7 @@ class DrawcashVideoDialog(activity: Activity) :
fun
onDestory
(){
fun
onDestory
(){
videoAdingManager
?.
setVideoAdingListener
(
null
)
videoAdingManager
?.
setVideoAdingListener
(
null
)
videoAdingManager
?.
onDest
or
y
()
videoAdingManager
?.
onDest
ro
y
()
activity
=
null
activity
=
null
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ForegroundOrBackground.java
View file @
7ccdbd65
...
@@ -10,7 +10,6 @@ import com.mints.goodmoney.manager.TrackManager;
...
@@ -10,7 +10,6 @@ import com.mints.goodmoney.manager.TrackManager;
import
com.mints.goodmoney.mvp.presenters.VersionUpdatePresenter
;
import
com.mints.goodmoney.mvp.presenters.VersionUpdatePresenter
;
import
com.mints.goodmoney.ui.activitys.SplashADActivity
;
import
com.mints.goodmoney.ui.activitys.SplashADActivity
;
import
com.mints.goodmoney.ui.activitys.SplashCsjADActivity
;
import
com.mints.goodmoney.ui.activitys.SplashCsjADActivity
;
import
com.mints.goodmoney.ui.activitys.SplashKsADActivity
;
import
java.lang.ref.WeakReference
;
import
java.lang.ref.WeakReference
;
...
@@ -20,6 +19,8 @@ import java.lang.ref.WeakReference;
...
@@ -20,6 +19,8 @@ import java.lang.ref.WeakReference;
*/
*/
public
class
ForegroundOrBackground
implements
Application
.
ActivityLifecycleCallbacks
{
public
class
ForegroundOrBackground
implements
Application
.
ActivityLifecycleCallbacks
{
public
static
final
String
TAG
=
ForegroundOrBackground
.
class
.
getSimpleName
();
private
long
leaveTime
=
0
;
//应用切后台时间
private
long
leaveTime
=
0
;
//应用切后台时间
private
static
ForegroundOrBackground
instance
;
private
static
ForegroundOrBackground
instance
;
...
@@ -31,7 +32,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -31,7 +32,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
private
VersionUpdatePresenter
vup
;
private
VersionUpdatePresenter
vup
;
private
WeakReference
<
Activity
>
reference
;
private
WeakReference
<
Activity
>
reference
;
private
Intent
ylhIntent
;
private
Intent
ylhIntent
;
// private Intent ksIntent;
// private Intent ksIntent;
private
Intent
csjIntent
;
private
Intent
csjIntent
;
public
static
ForegroundOrBackground
init
(
Application
application
)
{
public
static
ForegroundOrBackground
init
(
Application
application
)
{
...
...
GoodMoney/app/src/main/res/layout/fragment_main_dh.xml
View file @
7ccdbd65
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
<LinearLayout
xmlns:android=
"http://schemas.android.com/apk/res/android"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
android:background=
"@color/white"
android:background=
"@color/white"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_my.xml
View file @
7ccdbd65
...
@@ -27,36 +27,31 @@
...
@@ -27,36 +27,31 @@
android:overScrollMode=
"never"
>
android:overScrollMode=
"never"
>
<LinearLayout
<LinearLayout
android:id=
"@+id/llMyRoot"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<LinearLayout
<include
layout=
"@layout/item_fragment_main_my_title"
/>
android:id=
"@+id/llMyRoot"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:orientation=
"vertical"
>
<include
layout=
"@layout/item_fragment_main_my_title
"
/>
<include
layout=
"@layout/item_fragment_main_my_clock
"
/>
<include
layout=
"@layout/item_fragment_main_my_clock"
/>
<FrameLayout
android:id=
"@+id/fl_my_banner"
<FrameLayout
android:layout_width=
"wrap_content"
android:id=
"@+id/fl_my_banner"
android:layout_height=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_marginStart=
"12dp"
android:layout_height=
"wrap_content"
android:layout_marginEnd=
"12dp"
android:layout_marginStart=
"10dp"
android:background=
"@drawable/shape_bg_award"
android:layout_marginEnd=
"10dp"
android:visibility=
"gone"
/>
android:visibility=
"gone"
/>
<include
layout=
"@layout/item_divider_gray"
/>
<include
layout=
"@layout/item_divider_gray"
/>
<include
layout=
"@layout/item_fragment_main_my_promotions"
/>
<include
layout=
"@layout/item_fragment_main_my_promotions"
/>
<include
layout=
"@layout/item_divider_gray"
/>
<include
layout=
"@layout/item_divider_gray"
/>
<include
layout=
"@layout/view_title"
/>
<include
layout=
"@layout/view_title"
/>
</LinearLayout>
<androidx.recyclerview.widget.RecyclerView
<androidx.recyclerview.widget.RecyclerView
android:id=
"@+id/recy_my"
android:id=
"@+id/recy_my"
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_clock.xml
View file @
7ccdbd65
...
@@ -4,8 +4,8 @@
...
@@ -4,8 +4,8 @@
android:id=
"@+id/ll_my_sign"
android:id=
"@+id/ll_my_sign"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginStart=
"
6
dp"
android:layout_marginStart=
"
10
dp"
android:layout_marginEnd=
"
6
dp"
android:layout_marginEnd=
"
10
dp"
android:background=
"@mipmap/bg_sign"
>
android:background=
"@mipmap/bg_sign"
>
<ImageView
<ImageView
...
...
GoodMoney/app/src/main/res/layout/item_fragment_main_my_promotions.xml
View file @
7ccdbd65
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<com.mints.goodmoney.ui.widgets.ExpandableGridView
xmlns:android=
"http://schemas.android.com/apk/res/android"
<merge
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/item_promotions_egv"
xmlns:app=
"http://schemas.android.com/apk/res-auto"
android:layout_width=
"match_parent"
xmlns:attrs=
"http://schemas.android.com/tools"
>
android:layout_height=
"wrap_content"
android:visibility=
"gone"
<com.mints.goodmoney.ui.widgets.WrapViewPager
android:layout_marginTop=
"2dp"
android:id=
"@+id/vp_grid"
android:layout_marginBottom=
"16dp"
android:layout_width=
"match_parent"
android:columnWidth=
"85dp"
android:layout_height=
"wrap_content"
/>
android:divider=
"@null"
android:dividerHeight=
"10dp"
<com.rd.PageIndicatorView
android:listSelector=
"@color/color_0000"
android:id=
"@+id/piv_grid"
android:numColumns=
"4"
android:layout_width=
"wrap_content"
android:scrollbars=
"none"
android:layout_height=
"wrap_content"
android:stretchMode=
"spacingWidthUniform"
/>
android:layout_gravity=
"center_horizontal"
\ No newline at end of file
android:layout_marginTop=
"5dp"
android:layout_marginBottom=
"5dp"
app:piv_count=
"2"
app:piv_dynamicCount=
"false"
app:piv_selectedColor=
"@color/color_FF9837"
app:piv_unselectedColor=
"@color/color_20000000"
app:piv_viewPager=
"@id/vp_grid"
attrs:piv_padding=
"0dp"
attrs:piv_radius=
"2dp"
/>
</merge>
GoodMoney/app/src/main/res/layout/item_fragment_main_my_promotions_gv.xml
0 → 100644
View file @
7ccdbd65
<?xml version="1.0" encoding="utf-8"?>
<com.mints.goodmoney.ui.widgets.ExpandableGridView
xmlns:android=
"http://schemas.android.com/apk/res/android"
android:id=
"@+id/item_promotions_egv"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"2dp"
android:layout_marginBottom=
"16dp"
android:columnWidth=
"85dp"
android:divider=
"@null"
android:dividerHeight=
"10dp"
android:listSelector=
"@color/color_0000"
android:numColumns=
"4"
android:scrollbars=
"none"
android:stretchMode=
"spacingWidthUniform"
/>
GoodMoney/app/src/main/res/layout/item_fragment_main_my_task.xml
View file @
7ccdbd65
...
@@ -39,7 +39,7 @@
...
@@ -39,7 +39,7 @@
android:layout_width=
"260dp"
android:layout_width=
"260dp"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_marginTop=
"5dp"
android:layout_marginTop=
"5dp"
android:textColor=
"@color/color_
ccc
"
android:textColor=
"@color/color_
AAA
"
android:textSize=
"15sp"
android:textSize=
"15sp"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintStart_toStartOf=
"parent"
app:layout_constraintTop_toBottomOf=
"@id/item_task_title"
/>
app:layout_constraintTop_toBottomOf=
"@id/item_task_title"
/>
...
...
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