Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_highgold
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_highgold
Commits
d343b3fa
Commit
d343b3fa
authored
Jul 16, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加闪电盒子
parent
fdd28516
Changes
17
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
507 additions
and
35 deletions
+507
-35
build.gradle
highgold/app/build.gradle
+4
-6
wannuosili_ad_1.0.3.aar
highgold/app/libs/wannuosili_ad_1.0.3.aar
+0
-0
proguard-rules.pro
highgold/app/proguard-rules.pro
+4
-1
AndroidManifest.xml
highgold/app/src/main/AndroidManifest.xml
+10
-0
MintsApplication.java
...pp/src/main/java/com/mints/highgold/MintsApplication.java
+12
-3
VedioAdingManager.java
...rc/main/java/com/mints/highgold/ad/VedioAdingManager.java
+64
-15
WnVedioAdManager.kt
...p/src/main/java/com/mints/highgold/ad/WnVedioAdManager.kt
+260
-0
AppConfig.java
...pp/src/main/java/com/mints/highgold/common/AppConfig.java
+4
-0
Constant.java
...app/src/main/java/com/mints/highgold/common/Constant.java
+2
-0
AdMngrHolder.java
...rc/main/java/com/mints/highgold/manager/AdMngrHolder.java
+49
-0
UserTaskMsgBean.java
...in/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
+18
-0
WnVedioAdPresenter.kt
...a/com/mints/highgold/mvp/presenters/WnVedioAdPresenter.kt
+40
-0
WnVedioAdView.kt
...c/main/java/com/mints/highgold/mvp/views/WnVedioAdView.kt
+4
-0
AwardActivity.java
...n/java/com/mints/highgold/ui/activitys/AwardActivity.java
+1
-1
MainFragment.java
...ain/java/com/mints/highgold/ui/fragment/MainFragment.java
+23
-9
VersusFragment.java
...n/java/com/mints/highgold/ui/fragment/VersusFragment.java
+3
-0
wn_file_paths.xml
highgold/app/src/main/res/xml/wn_file_paths.xml
+9
-0
No files found.
highgold/app/build.gradle
View file @
d343b3fa
...
@@ -11,8 +11,8 @@ android {
...
@@ -11,8 +11,8 @@ android {
applicationId
"com.mints.highgold"
applicationId
"com.mints.highgold"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
8
versionCode
1
9
versionName
"1.1.
7
"
versionName
"1.1.
8
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
@@ -108,12 +108,8 @@ android {
...
@@ -108,12 +108,8 @@ android {
}
}
productFlavors
{
productFlavors
{
xiaomi
{}
yingyongbao
{}
oppo
{}
highgold
{}
highgold
{}
highgoldpkg
{}
highgoldpkg
{}
vivo
{}
}
}
productFlavors
.
all
{
productFlavors
.
all
{
...
@@ -300,6 +296,8 @@ dependencies {
...
@@ -300,6 +296,8 @@ dependencies {
// 酷问新闻
// 酷问新闻
// implementation 'com.tencent.tbs.tbssdk:sdk:43903'
// implementation 'com.tencent.tbs.tbssdk:sdk:43903'
// implementation 'com.liulishuo.filedownloader:library:1.7.4'
// implementation 'com.liulishuo.filedownloader:library:1.7.4'
// 闪电盒子
implementation
(
name:
'wannuosili_ad_1.0.3'
,
ext:
'aar'
)
...
...
highgold/app/libs/wannuosili_ad_1.0.3.aar
0 → 100644
View file @
d343b3fa
File added
highgold/app/proguard-rules.pro
View file @
d343b3fa
...
@@ -455,5 +455,8 @@
...
@@ -455,5 +455,8 @@
# ===================== 闪电盒子 START ================
-keep class com.wannuosili.sdk.
*
* {*;}
-dontwarn com.wannuosili.sdk.
*
*
# ======================= 闪电盒子 END ================
highgold/app/src/main/AndroidManifest.xml
View file @
d343b3fa
...
@@ -301,6 +301,16 @@
...
@@ -301,6 +301,16 @@
android:resource=
"@xml/provider_paths"
/>
android:resource=
"@xml/provider_paths"
/>
</provider>
</provider>
<provider
android:name=
"com.wannuosili.sdk.ad.component.WNFileProvider"
android:authorities=
"${applicationId}.WNFileProvider"
android:exported=
"false"
android:grantUriPermissions=
"true"
>
<meta-data
android:name=
"android.support.FILE_PROVIDER_PATHS"
android:resource=
"@xml/wn_file_paths"
/>
</provider>
<!-- 极光一键登录 -->
<!-- 极光一键登录 -->
<!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
<!-- since 2.0.0 optional 可选项,使用一键登录功能必须添加 -->
...
...
highgold/app/src/main/java/com/mints/highgold/MintsApplication.java
View file @
d343b3fa
...
@@ -10,7 +10,6 @@ import android.support.multidex.MultiDex;
...
@@ -10,7 +10,6 @@ import android.support.multidex.MultiDex;
import
android.support.multidex.MultiDexApplication
;
import
android.support.multidex.MultiDexApplication
;
import
android.support.v4.content.LocalBroadcastManager
;
import
android.support.v4.content.LocalBroadcastManager
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.util.Log
;
import
android.webkit.WebView
;
import
android.webkit.WebView
;
import
com.bun.miitmdid.core.JLibrary
;
import
com.bun.miitmdid.core.JLibrary
;
...
@@ -23,12 +22,12 @@ import com.mintegral.msdk.MIntegralSDK;
...
@@ -23,12 +22,12 @@ import com.mintegral.msdk.MIntegralSDK;
import
com.mintegral.msdk.out.MIntegralSDKFactory
;
import
com.mintegral.msdk.out.MIntegralSDKFactory
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.manager.AdMngrHolder
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.MiitHelper
;
import
com.mints.highgold.manager.MiitHelper
;
import
com.mints.highgold.manager.TTAdManagerHolder
;
import
com.mints.highgold.manager.TTAdManagerHolder
;
import
com.mints.highgold.manager.UserManager
;
import
com.mints.highgold.manager.UserManager
;
import
com.mints.highgold.net.LoanService
;
import
com.mints.highgold.net.LoanService
;
import
com.mints.highgold.ui.widgets.BannerView
;
import
com.mints.highgold.utils.DevicesUtil
;
import
com.mints.highgold.utils.DevicesUtil
;
import
com.mints.highgold.utils.ForegroundOrBackground
;
import
com.mints.highgold.utils.ForegroundOrBackground
;
import
com.mints.highgold.utils.LogUtil
;
import
com.mints.highgold.utils.LogUtil
;
...
@@ -88,7 +87,7 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -88,7 +87,7 @@ public class MintsApplication extends MultiDexApplication {
private
static
boolean
isSupportOaid
=
true
;
private
static
boolean
isSupportOaid
=
true
;
private
static
int
errorCode
;
private
static
int
errorCode
;
public
volatile
static
boolean
shanhuFlag
=
false
;
public
volatile
static
boolean
shanhuFlag
=
false
;
// 极光登录验证通过标志
public
static
String
getOaid
()
{
public
static
String
getOaid
()
{
return
oaid
;
return
oaid
;
...
@@ -242,8 +241,11 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -242,8 +241,11 @@ public class MintsApplication extends MultiDexApplication {
// 极光一键登录
// 极光一键登录
initJLogin
();
initJLogin
();
//闪电盒子
initWNAd
();
}
}
/**
/**
* 移动安装联盟 获取OAID等设备标识符
* 移动安装联盟 获取OAID等设备标识符
*/
*/
...
@@ -487,6 +489,13 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -487,6 +489,13 @@ public class MintsApplication extends MultiDexApplication {
});
});
}
}
/**
* 闪电盒子
*/
private
void
initWNAd
()
{
AdMngrHolder
.
init
(
this
);
}
/**
/**
* 酷问新闻
* 酷问新闻
*/
*/
...
...
highgold/app/src/main/java/com/mints/highgold/ad/VedioAdingManager.java
View file @
d343b3fa
...
@@ -24,8 +24,6 @@ public class VedioAdingManager {
...
@@ -24,8 +24,6 @@ public class VedioAdingManager {
private
static
final
String
TAG
=
VedioAdingManager
.
class
.
getSimpleName
();
private
static
final
String
TAG
=
VedioAdingManager
.
class
.
getSimpleName
();
public
static
final
int
SECOND
=
60
;
private
static
VedioAdingManager
_inst
;
private
static
VedioAdingManager
_inst
;
private
VedioAdingListener
vedioAdingListener
;
private
VedioAdingListener
vedioAdingListener
;
...
@@ -38,6 +36,7 @@ public class VedioAdingManager {
...
@@ -38,6 +36,7 @@ public class VedioAdingManager {
private
ShanhuVedioAdManager
shanhuVedioAdManager
;
private
ShanhuVedioAdManager
shanhuVedioAdManager
;
private
ChuangshenVedioAdManager
chuangshenVedioAdManager
;
private
ChuangshenVedioAdManager
chuangshenVedioAdManager
;
private
DomobVedioAdManager
domobVedioAdManager
;
private
DomobVedioAdManager
domobVedioAdManager
;
private
WnVedioAdManager
wnVedioAdManager
;
private
int
ylhWeight
;
private
int
ylhWeight
;
private
int
csjFullWeight
;
private
int
csjFullWeight
;
...
@@ -47,6 +46,7 @@ public class VedioAdingManager {
...
@@ -47,6 +46,7 @@ public class VedioAdingManager {
private
int
shanhuWeight
;
private
int
shanhuWeight
;
private
int
chuangshenWeight
;
private
int
chuangshenWeight
;
private
int
domobWeight
;
private
int
domobWeight
;
private
int
wnWeight
;
private
ArrayList
<
WeightBean
>
weightList
;
private
ArrayList
<
WeightBean
>
weightList
;
private
Activity
activity
;
private
Activity
activity
;
...
@@ -81,6 +81,7 @@ public class VedioAdingManager {
...
@@ -81,6 +81,7 @@ public class VedioAdingManager {
shanhuVedioAdManager
=
ShanhuVedioAdManager
.
getInstance
(
activity
);
shanhuVedioAdManager
=
ShanhuVedioAdManager
.
getInstance
(
activity
);
chuangshenVedioAdManager
=
ChuangshenVedioAdManager
.
Companion
.
getInstance
(
activity
);
chuangshenVedioAdManager
=
ChuangshenVedioAdManager
.
Companion
.
getInstance
(
activity
);
domobVedioAdManager
=
DomobVedioAdManager
.
Companion
.
getInstance
(
activity
);
domobVedioAdManager
=
DomobVedioAdManager
.
Companion
.
getInstance
(
activity
);
wnVedioAdManager
=
WnVedioAdManager
.
Companion
.
getInstance
(
activity
);
weightList
=
new
ArrayList
<>();
weightList
=
new
ArrayList
<>();
}
}
...
@@ -88,7 +89,8 @@ public class VedioAdingManager {
...
@@ -88,7 +89,8 @@ public class VedioAdingManager {
* 初始化广告权重
* 初始化广告权重
*/
*/
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
csjFullWeight
,
int
hytechVedioWeight
,
public
void
initAdWeight
(
int
csjVedioWeight
,
int
ylhWeight
,
int
csjFullWeight
,
int
hytechVedioWeight
,
int
mintegralWeight
,
int
shanhuWeight
,
int
chuangshenWeight
,
int
domobWeight
)
{
int
mintegralWeight
,
int
shanhuWeight
,
int
chuangshenWeight
,
int
domobWeight
,
int
wnWeight
)
{
this
.
csjVedioWeight
=
csjVedioWeight
;
this
.
csjVedioWeight
=
csjVedioWeight
;
this
.
ylhWeight
=
ylhWeight
;
this
.
ylhWeight
=
ylhWeight
;
this
.
csjFullWeight
=
csjFullWeight
;
this
.
csjFullWeight
=
csjFullWeight
;
...
@@ -97,6 +99,7 @@ public class VedioAdingManager {
...
@@ -97,6 +99,7 @@ public class VedioAdingManager {
this
.
shanhuWeight
=
shanhuWeight
;
this
.
shanhuWeight
=
shanhuWeight
;
this
.
chuangshenWeight
=
chuangshenWeight
;
this
.
chuangshenWeight
=
chuangshenWeight
;
this
.
domobWeight
=
domobWeight
;
this
.
domobWeight
=
domobWeight
;
this
.
wnWeight
=
wnWeight
;
}
}
/**
/**
...
@@ -142,6 +145,8 @@ public class VedioAdingManager {
...
@@ -142,6 +145,8 @@ public class VedioAdingManager {
nextAdType
=
Constant
.
HYTECH_VEDIO_AD
;
nextAdType
=
Constant
.
HYTECH_VEDIO_AD
;
}
else
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
}
else
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_FULL_AD
;
nextAdType
=
Constant
.
CSJ_FULL_AD
;
}
else
if
(
AppConfig
.
sdhzVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
SDHZ_VEDIO_AD
;
}
}
return
nextAdType
;
return
nextAdType
;
}
}
...
@@ -180,6 +185,11 @@ public class VedioAdingManager {
...
@@ -180,6 +185,11 @@ public class VedioAdingManager {
weight
=
weight
+
ylhWeight
;
weight
=
weight
+
ylhWeight
;
LogUtil
.
d
(
TAG
,
"权重值:ylhWeight:"
+
ylhWeight
);
LogUtil
.
d
(
TAG
,
"权重值:ylhWeight:"
+
ylhWeight
);
}
}
if
(
AppConfig
.
sdhzVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
wnWeight
,
Constant
.
SDHZ_VEDIO_AD
));
weight
=
weight
+
wnWeight
;
LogUtil
.
d
(
TAG
,
"权重值:wnWeight:"
+
wnWeight
);
}
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
if
(
AppConfig
.
shanhuAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
shanhuWeight
,
Constant
.
SHANHU_VEDIO_AD
));
weightList
.
add
(
new
WeightBean
(
shanhuWeight
,
Constant
.
SHANHU_VEDIO_AD
));
weight
=
weight
+
shanhuWeight
;
weight
=
weight
+
shanhuWeight
;
...
@@ -190,30 +200,29 @@ public class VedioAdingManager {
...
@@ -190,30 +200,29 @@ public class VedioAdingManager {
weight
=
weight
+
chuangshenWeight
;
weight
=
weight
+
chuangshenWeight
;
LogUtil
.
d
(
TAG
,
"权重值:chuangshenWeight:"
+
chuangshenWeight
);
LogUtil
.
d
(
TAG
,
"权重值:chuangshenWeight:"
+
chuangshenWeight
);
}
}
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
Q
&&
AppConfig
.
duomentVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
domobWeight
,
Constant
.
DUOMENT_VEDIO_AD
));
weight
=
weight
+
domobWeight
;
LogUtil
.
d
(
TAG
,
"权重值:domobWeight:"
+
domobWeight
);
}
if
(
AppConfig
.
mintegralAdCount
>
0
)
{
if
(
AppConfig
.
mintegralAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
mintegralWeight
,
Constant
.
MINTEGRAL_VEDIO_AD
));
weightList
.
add
(
new
WeightBean
(
mintegralWeight
,
Constant
.
MINTEGRAL_VEDIO_AD
));
weight
=
weight
+
mintegralWeight
;
weight
=
weight
+
mintegralWeight
;
LogUtil
.
d
(
TAG
,
"权重值:mintegralWeight:"
+
mintegralWeight
);
LogUtil
.
d
(
TAG
,
"权重值:mintegralWeight:"
+
mintegralWeight
);
}
}
if
(
AppConfig
.
hytechVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
hytechVedioWeight
,
Constant
.
HYTECH_VEDIO_AD
));
weight
=
weight
+
hytechVedioWeight
;
LogUtil
.
d
(
TAG
,
"权重值:hytechVedioWeight:"
+
hytechVedioWeight
);
}
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
if
(
AppConfig
.
csjFullAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
csjFullWeight
,
Constant
.
CSJ_FULL_AD
));
weightList
.
add
(
new
WeightBean
(
csjFullWeight
,
Constant
.
CSJ_FULL_AD
));
weight
=
weight
+
csjFullWeight
;
weight
=
weight
+
csjFullWeight
;
LogUtil
.
d
(
TAG
,
"权重值:csjFullWeight:"
+
csjFullWeight
);
LogUtil
.
d
(
TAG
,
"权重值:csjFullWeight:"
+
csjFullWeight
);
}
}
if
(
Build
.
VERSION
.
SDK_INT
<
Build
.
VERSION_CODES
.
Q
&&
AppConfig
.
duomentVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
domobWeight
,
Constant
.
DUOMENT_VEDIO_AD
));
weight
=
weight
+
domobWeight
;
LogUtil
.
d
(
TAG
,
"权重值:domobWeight:"
+
domobWeight
);
}
if
(
AppConfig
.
hytechVedioAdCount
>
0
)
{
weightList
.
add
(
new
WeightBean
(
hytechVedioWeight
,
Constant
.
HYTECH_VEDIO_AD
));
weight
=
weight
+
hytechVedioWeight
;
LogUtil
.
d
(
TAG
,
"权重值:hytechVedioWeight:"
+
hytechVedioWeight
);
}
// 权重随机
// 权重随机
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
&&
weight
>
0
)
{
if
(
weightList
!=
null
&&
weightList
.
size
()
>
0
&&
weight
>
0
)
{
LogUtil
.
d
(
TAG
,
"1、权重总值:"
+
weight
);
LogUtil
.
d
(
TAG
,
"1、权重总值:"
+
weight
);
Random
r
=
new
Random
();
Random
r
=
new
Random
();
int
randomWeight
=
r
.
nextInt
(
weight
)
+
1
;
int
randomWeight
=
r
.
nextInt
(
weight
)
+
1
;
...
@@ -254,6 +263,7 @@ public class VedioAdingManager {
...
@@ -254,6 +263,7 @@ public class VedioAdingManager {
int
mintegralAdCount
=
AppConfig
.
mintegralAdCount
;
int
mintegralAdCount
=
AppConfig
.
mintegralAdCount
;
int
shanhuAdCount
=
AppConfig
.
shanhuAdCount
;
int
shanhuAdCount
=
AppConfig
.
shanhuAdCount
;
int
chuangshenVedioAdCount
=
AppConfig
.
chuangshenVedioAdCount
;
int
chuangshenVedioAdCount
=
AppConfig
.
chuangshenVedioAdCount
;
int
sdhzVedioAdCount
=
AppConfig
.
sdhzVedioAdCount
;
// android10以下多盟判断可用视频数
// android10以下多盟判断可用视频数
boolean
domobFlag
=
true
;
boolean
domobFlag
=
true
;
...
@@ -265,7 +275,7 @@ public class VedioAdingManager {
...
@@ -265,7 +275,7 @@ public class VedioAdingManager {
if
(
csjFullAdCount
<=
0
&&
ylhAdCount
<=
0
&&
if
(
csjFullAdCount
<=
0
&&
ylhAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
hytechVedioAdCount
<=
0
&&
csjVedioAdCount
<=
0
&&
hytechVedioAdCount
<=
0
&&
mintegralAdCount
<=
0
&&
shanhuAdCount
<=
0
&&
mintegralAdCount
<=
0
&&
shanhuAdCount
<=
0
&&
chuangshenVedioAdCount
<=
0
&&
domobFlag
)
{
chuangshenVedioAdCount
<=
0
&&
domobFlag
&&
sdhzVedioAdCount
<=
0
)
{
// showToast("今日视频已看完,请明天再来吧");
// showToast("今日视频已看完,请明天再来吧");
return
true
;
return
true
;
}
}
...
@@ -311,6 +321,11 @@ public class VedioAdingManager {
...
@@ -311,6 +321,11 @@ public class VedioAdingManager {
domobVedioAdManager
.
destory
();
domobVedioAdManager
.
destory
();
domobVedioAdManager
=
null
;
domobVedioAdManager
=
null
;
}
}
if
(
wnVedioAdManager
!=
null
)
{
wnVedioAdManager
.
destory
();
wnVedioAdManager
=
null
;
}
}
}
public
void
setVedioAdingListener
(
VedioAdingListener
vedioAdingListener
)
{
public
void
setVedioAdingListener
(
VedioAdingListener
vedioAdingListener
)
{
...
@@ -598,6 +613,40 @@ public class VedioAdingManager {
...
@@ -598,6 +613,40 @@ public class VedioAdingManager {
});
});
domobVedioAdManager
.
loadDomobAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
domobVedioAdManager
.
loadDomobAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
else
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
SDHZ_VEDIO_AD
))
{
// 闪电盒子激励视频
if
(
wnVedioAdManager
==
null
)
{
if
(
activity
==
null
)
{
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerError
(
Constant
.
SDHZ_VEDIO_AD
);
}
return
;
}
wnVedioAdManager
=
WnVedioAdManager
.
Companion
.
getInstance
(
activity
);
}
wnVedioAdManager
.
setWnVedioAdListener
(
new
WnVedioAdManager
.
WnVedioAdListener
()
{
@Override
public
void
wnVedioAdSuccess
()
{
AppConfig
.
sdhzVedioAdCount
--;
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerSuccess
(
Constant
.
SDHZ_VEDIO_AD
);
}
}
@Override
public
void
wnVedioAdFail
()
{
if
(
vedioAdingListener
!=
null
)
{
vedioAdingListener
.
vedioAdingListenerFail
(
Constant
.
SDHZ_VEDIO_AD
);
}
}
@Override
public
void
wnVedioAdDownload
()
{
isVedioAdDownload
=
true
;
}
});
wnVedioAdManager
.
loadWnAd
(
bean
.
getDownloadCoin
(),
bean
.
getCurCoin
(),
bean
.
getCarrierType
(),
bean
.
getExtraId
());
}
}
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
...
highgold/app/src/main/java/com/mints/highgold/ad/WnVedioAdManager.kt
0 → 100644
View file @
d343b3fa
package
com.mints.highgold.ad
import
android.app.Activity
import
android.util.Log
import
android.widget.Toast
import
com.mints.highgold.MintsApplication
import
com.mints.highgold.common.Constant
import
com.mints.highgold.manager.AdMngrHolder
import
com.mints.highgold.manager.TrackManager
import
com.mints.highgold.mvp.presenters.WnVedioAdPresenter
import
com.mints.highgold.mvp.views.WnVedioAdView
import
com.mints.highgold.utils.LogUtil
import
com.mints.highgold.utils.ToastUtil
import
com.wannuosili.sdk.WNAdConstant
import
com.wannuosili.sdk.WNAdDownloadListener
import
com.wannuosili.sdk.WNAdSlot
import
com.wannuosili.sdk.WNRewardVideoAd
import
java.util.*
/**
* 闪电盒子视频
*/
class
WnVedioAdManager
private
constructor
(
activity
:
Activity
)
:
WnVedioAdView
{
private
val
TAG
=
WnVedioAdManager
::
class
.
java
.
simpleName
lateinit
var
wnVedioAdPresenter
:
WnVedioAdPresenter
private
var
wnVedioAdListener
:
WnVedioAdListener
?
=
null
var
activity
:
Activity
?
=
null
private
lateinit
var
mRewardVideoAd
:
WNRewardVideoAd
private
var
curCoin
=
0
private
var
extraId
:
String
?
=
null
private
var
downloadCoin
=
10
private
var
carrierType
=
""
private
var
isClickScreen
:
Boolean
=
true
companion
object
{
private
var
_inst
:
WnVedioAdManager
?
=
null
fun
getInstance
(
activity
:
Activity
):
WnVedioAdManager
?
{
return
if
(
_inst
!=
null
)
{
_inst
}
else
{
_inst
=
WnVedioAdManager
(
activity
)
_inst
}
}
}
init
{
init
(
activity
)
}
private
fun
init
(
activity
:
Activity
)
{
this
.
activity
=
activity
wnVedioAdPresenter
=
WnVedioAdPresenter
()
wnVedioAdPresenter
.
attachView
(
this
)
}
fun
loadWnAd
(
downloadCoin
:
Int
,
curCoin
:
Int
,
carrierType
:
String
,
extraId
:
String
?)
{
if
(
activity
==
null
)
{
return
}
isClickScreen
=
true
this
.
downloadCoin
=
downloadCoin
this
.
carrierType
=
carrierType
this
.
curCoin
=
curCoin
this
.
extraId
=
extraId
var
postId
:
String
when
(
carrierType
)
{
Constant
.
CARRIER_DAILY_VIDEO
->
postId
=
AdMngrHolder
.
SDHZ_AD_VEDIO_MAIN_LOOK
Constant
.
CARRIER_VERSUS_VIDEO
->
postId
=
AdMngrHolder
.
SDHZ_AD_VEDIO_VERSUS_LOOK
Constant
.
CARRIER_ONLINE_INCOME_DOUBLE
,
Constant
.
CARRIER_HOMEWATER_BUBBLE
->
postId
=
AdMngrHolder
.
SDHZ_AD_VEDIO_MAIN_POP
Constant
.
CARRIER_REDENVELOPE_DOUBLE
,
Constant
.
CARRIER_REDENVELOPE
->
postId
=
AdMngrHolder
.
SDHZ_AD_VEDIO_REDBOX
else
->
postId
=
AdMngrHolder
.
SDHZ_AD_VEDIO_MAIN_LOOK
}
val
slot
=
WNAdSlot
.
Builder
()
.
setSlotId
(
postId
)
.
setOrientation
(
WNAdConstant
.
REWARD_VIDEO_AD_PORTRAIT
)
.
build
()
AdMngrHolder
.
get
().
loadRewardVideoAd
(
slot
,
object
:
WNRewardVideoAd
.
RewardVideoAdListener
{
override
fun
onError
(
code
:
Int
,
message
:
String
)
{
LogUtil
.
d
(
TAG
,
"onError $code:$message"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_ONE
,
(
code
).
toString
(),
message
)
if
(
wnVedioAdListener
!=
null
)
{
wnVedioAdListener
?.
wnVedioAdFail
()
}
}
override
fun
onLoad
(
ad
:
WNRewardVideoAd
)
{
ad
.
interactionListener
=
object
:
WNRewardVideoAd
.
InteractionListener
{
override
fun
onAdShow
()
{
LogUtil
.
d
(
TAG
,
"onAdShow"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_ZERO
,
""
,
""
)
}
override
fun
onAdClick
()
{
LogUtil
.
d
(
TAG
,
"onAdClick"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_TWO
,
""
,
""
)
if
(
isClickScreen
)
{
// 防止重复
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_FOUR
,
""
,
""
)
isClickScreen
=
false
}
if
(
wnVedioAdListener
!=
null
)
{
wnVedioAdListener
?.
wnVedioAdDownload
()
}
}
override
fun
onAdClose
()
{
LogUtil
.
d
(
TAG
,
"onAdClose"
)
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_SDHZ
,
Constant
.
EVENT_TYPE_THREE
,
""
,
""
)
if
(
wnVedioAdListener
!=
null
)
{
wnVedioAdListener
?.
wnVedioAdSuccess
()
}
wnVedioAdPresenter
?.
reportAddCoinMsg
(
activity
,
getAdMapVO
())
}
override
fun
onVideoComplete
()
{
LogUtil
.
d
(
TAG
,
"onVideoComplete"
)
}
override
fun
onRewardVerify
(
rewardVerify
:
Boolean
,
rewardAmount
:
Int
,
rewardName
:
String
)
{
LogUtil
.
d
(
TAG
,
"onRewardVerify"
)
}
}
if
(
ad
.
type
==
WNAdConstant
.
AD_TYPE_DOWNLOAD
)
{
ad
.
downloadListener
=
object
:
WNAdDownloadListener
{
override
fun
onDownloadStarted
(
totalBytes
:
Long
,
fileName
:
String
,
appName
:
String
)
{
showToast
(
"开始下载"
)
}
override
fun
onDownloadFinished
(
totalBytes
:
Long
,
fileName
:
String
,
appName
:
String
)
{
LogUtil
.
d
(
TAG
,
"下载结束"
)
}
override
fun
onDownloadFailed
(
fileName
:
String
,
appName
:
String
)
{
LogUtil
.
d
(
TAG
,
"下载报错: $fileName"
)
}
}
}
mRewardVideoAd
=
ad
mRewardVideoAd
.
showRewardVideoAd
(
activity
)
}
})
}
fun
setWnVedioAdListener
(
wnVedioAdListener
:
WnVedioAdListener
?)
{
this
.
wnVedioAdListener
=
wnVedioAdListener
}
interface
WnVedioAdListener
{
fun
wnVedioAdSuccess
()
fun
wnVedioAdFail
()
fun
wnVedioAdDownload
()
}
override
fun
showLoading
(
msg
:
String
?)
{
TODO
(
"Not yet implemented"
)
}
override
fun
showToast
(
msg
:
String
?)
{
if
(
activity
==
null
)
return
ToastUtil
.
show
(
activity
,
msg
)
}
override
fun
hideLoading
()
{
TODO
(
"Not yet implemented"
)
}
override
fun
getBaseApplication
()
=
activity
?.
application
as
MintsApplication
private
fun
getAdMapVO
():
HashMap
<
String
,
Any
>
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
vo
[
"adtype"
]
=
Constant
.
ADTYPE_VEDIO
vo
[
"adsource"
]
=
Constant
.
AD_SOURCE_SDHZ
when
(
carrierType
)
{
Constant
.
CARRIER_VERSUS_VIDEO
->
vo
[
"coin"
]
=
curCoin
Constant
.
CARRIER_DAILY_DOWNLOAD
->
vo
[
"coin"
]
=
curCoin
Constant
.
CARRIER_DAILY_VIDEO
->
vo
[
"coin"
]
=
curCoin
Constant
.
CARRIER_HOMEWATER_BUBBLE
->
vo
[
"waterCoin"
]
=
curCoin
Constant
.
CARRIER_ONLINE_INCOME_DOUBLE
->
vo
[
"online_income"
]
=
curCoin
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
vo
[
"offline_income"
]
=
curCoin
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_ONE
}
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_ONE
}
Constant
.
CARRIER_DRINK
,
Constant
.
CARRIER_DRINK_PATCH
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
vo
[
"block"
]
=
Constant
.
BLOCK_FOUR
vo
[
"order"
]
=
Constant
.
ORDER_ONE
vo
[
"critId"
]
=
extraId
!!
}
Constant
.
CARRIER_VERSUS_DRINKTEA
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_THREE
vo
[
"critId"
]
=
extraId
!!
}
Constant
.
CARRIER_DAILY_TURN
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
vo
[
"block"
]
=
Constant
.
BLOCK_THREE
vo
[
"order"
]
=
Constant
.
ORDER_THREE
vo
[
"turntableKey"
]
=
extraId
!!
}
Constant
.
CARRIER_CHALLENGE_TURN
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_FOUR
vo
[
"turntableKey"
]
=
extraId
!!
}
Constant
.
CARRIER_CHALLENGE_CARD
->
{
vo
[
"page"
]
=
Constant
.
PAGE_TWO
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_FIVE
vo
[
"turntableKey"
]
=
extraId
!!
}
Constant
.
CARRIER_REDENVELOPE_DOUBLE
,
Constant
.
CARRIER_REDENVELOPE
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
vo
[
"block"
]
=
Constant
.
BLOCK_ONE
vo
[
"order"
]
=
Constant
.
ORDER_ONE
vo
[
"numKey"
]
=
extraId
!!
}
else
->
{
vo
[
"page"
]
=
Constant
.
PAGE_ONE
if
(
curCoin
!=
-
1
)
{
vo
[
"online_income"
]
=
curCoin
}
}
}
return
vo
}
fun
destory
()
{
wnVedioAdPresenter
?.
let
{
wnVedioAdPresenter
.
dispose
()
wnVedioAdPresenter
.
detachView
()
}
}
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/common/AppConfig.java
View file @
d343b3fa
...
@@ -65,6 +65,10 @@ public class AppConfig {
...
@@ -65,6 +65,10 @@ public class AppConfig {
* 多盟 剩余广告播放数
* 多盟 剩余广告播放数
*/
*/
public
static
int
duomentVedioAdCount
=
0
;
public
static
int
duomentVedioAdCount
=
0
;
/**
* 多盟 剩余广告播放数
*/
public
static
int
sdhzVedioAdCount
=
0
;
/**
/**
* 一览视频 时间间隔 单位-秒
* 一览视频 时间间隔 单位-秒
...
...
highgold/app/src/main/java/com/mints/highgold/common/Constant.java
View file @
d343b3fa
...
@@ -127,6 +127,7 @@ public interface Constant {
...
@@ -127,6 +127,7 @@ public interface Constant {
String
SHANHU_VEDIO_AD
=
"SHANHU_VEDIO_AD"
;
String
SHANHU_VEDIO_AD
=
"SHANHU_VEDIO_AD"
;
String
CHUANGSHEN_VEDIO_AD
=
"CHUANGSHEN_VEDIO_AD"
;
String
CHUANGSHEN_VEDIO_AD
=
"CHUANGSHEN_VEDIO_AD"
;
String
DUOMENT_VEDIO_AD
=
"DUOMENT_VEDIO_AD"
;
String
DUOMENT_VEDIO_AD
=
"DUOMENT_VEDIO_AD"
;
String
SDHZ_VEDIO_AD
=
"SDHZ_VEDIO_AD"
;
// 载体
// 载体
String
CARRIER_DRINK
=
"DRINK"
;
//喝水
String
CARRIER_DRINK
=
"DRINK"
;
//喝水
...
@@ -194,6 +195,7 @@ public interface Constant {
...
@@ -194,6 +195,7 @@ public interface Constant {
String
AD_SOURCE_SHANHU
=
"CORAL"
;
//珊瑚
String
AD_SOURCE_SHANHU
=
"CORAL"
;
//珊瑚
String
AD_SOURCE_CHUANGSHEN
=
"CHUANGSHEN"
;
//创神
String
AD_SOURCE_CHUANGSHEN
=
"CHUANGSHEN"
;
//创神
String
AD_SOURCE_DOMOB
=
"DOMOB"
;
//多盟
String
AD_SOURCE_DOMOB
=
"DOMOB"
;
//多盟
String
AD_SOURCE_SDHZ
=
"SDHZ"
;
//闪电盒子
// 页面
// 页面
int
PAGE_ONE
=
1
;
int
PAGE_ONE
=
1
;
...
...
highgold/app/src/main/java/com/mints/highgold/manager/AdMngrHolder.java
0 → 100755
View file @
d343b3fa
package
com
.
mints
.
highgold
.
manager
;
import
android.content.Context
;
import
com.mints.highgold.BuildConfig
;
import
com.wannuosili.sdk.WNAdConfig
;
import
com.wannuosili.sdk.WNAdManager
;
import
com.wannuosili.sdk.WNAdSdk
;
/**
* 闪电盒子
*/
public
class
AdMngrHolder
{
private
static
boolean
sInit
;
public
static
final
String
APPID
=
"10000013"
;
public
static
final
String
SDHZ_AD_VEDIO_MAIN_LOOK
=
"100000042011"
;
//首页看视频
public
static
final
String
SDHZ_AD_VEDIO_REDBOX
=
"100000052011"
;
//抢红包
public
static
final
String
SDHZ_AD_VEDIO_VERSUS_LOOK
=
"100000062011"
;
//任务赚看视频
public
static
final
String
SDHZ_AD_VEDIO_MAIN_POP
=
"100000072011"
;
//汽泡
public
static
WNAdManager
get
()
{
if
(!
sInit
)
{
throw
new
RuntimeException
(
"WNAdSdk is not init, please check."
);
}
return
WNAdSdk
.
getAdManager
();
}
public
static
void
init
(
Context
context
)
{
doInit
(
context
);
}
private
static
void
doInit
(
Context
context
)
{
if
(!
sInit
)
{
WNAdSdk
.
initialize
(
new
WNAdConfig
.
Builder
()
.
setAppId
(
APPID
)
.
setDebug
(
BuildConfig
.
DEBUG
)
// 设置是否是debug模式
.
setContext
(
context
)
// 上下文
.
build
());
sInit
=
true
;
}
}
public
static
void
setOaid
(
String
oaid
)
{
WNAdSdk
.
setOaid
(
oaid
);
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/model/UserTaskMsgBean.java
View file @
d343b3fa
...
@@ -75,6 +75,7 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -75,6 +75,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_coral_vedio_rate
;
private
int
vedioplan_coral_vedio_rate
;
private
int
vedioplan_chuangshen_vedio_rate
;
private
int
vedioplan_chuangshen_vedio_rate
;
private
int
vedioplan_domob_vedio_rate
;
private
int
vedioplan_domob_vedio_rate
;
private
int
vedioplan_sdhz_vedio_rate
;
private
int
vedioplan_csj_vedio_surplus
;
private
int
vedioplan_csj_vedio_surplus
;
private
int
vedioplan_liyan_vedio_surplus
;
private
int
vedioplan_liyan_vedio_surplus
;
...
@@ -85,6 +86,7 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -85,6 +86,7 @@ public class UserTaskMsgBean implements Serializable {
private
int
vedioplan_coral_vedio_surplus
;
private
int
vedioplan_coral_vedio_surplus
;
private
int
vedioplan_chuangshen_vedio_surplus
;
private
int
vedioplan_chuangshen_vedio_surplus
;
private
int
vedioplan_domob_vedio_surplus
;
private
int
vedioplan_domob_vedio_surplus
;
private
int
vedioplan_sdhz_vedio_surplus
;
private
int
JPushLogin
;
private
int
JPushLogin
;
...
@@ -456,4 +458,20 @@ public class UserTaskMsgBean implements Serializable {
...
@@ -456,4 +458,20 @@ public class UserTaskMsgBean implements Serializable {
public
void
setJPushLogin
(
int
JPushLogin
)
{
public
void
setJPushLogin
(
int
JPushLogin
)
{
this
.
JPushLogin
=
JPushLogin
;
this
.
JPushLogin
=
JPushLogin
;
}
}
public
int
getVedioplan_sdhz_vedio_rate
()
{
return
vedioplan_sdhz_vedio_rate
;
}
public
void
setVedioplan_sdhz_vedio_rate
(
int
vedioplan_sdhz_vedio_rate
)
{
this
.
vedioplan_sdhz_vedio_rate
=
vedioplan_sdhz_vedio_rate
;
}
public
int
getVedioplan_sdhz_vedio_surplus
()
{
return
vedioplan_sdhz_vedio_surplus
;
}
public
void
setVedioplan_sdhz_vedio_surplus
(
int
vedioplan_sdhz_vedio_surplus
)
{
this
.
vedioplan_sdhz_vedio_surplus
=
vedioplan_sdhz_vedio_surplus
;
}
}
}
highgold/app/src/main/java/com/mints/highgold/mvp/presenters/WnVedioAdPresenter.kt
0 → 100644
View file @
d343b3fa
package
com.mints.highgold.mvp.presenters
import
android.app.Activity
import
com.mints.highgold.MintsApplication
import
com.mints.highgold.mvp.model.BaseResponse
import
com.mints.highgold.mvp.views.DomobVedioAdView
import
com.mints.highgold.mvp.views.WnVedioAdView
import
com.mints.highgold.net.LoanService
import
com.mints.library.net.neterror.BaseSubscriber
import
com.mints.library.net.neterror.Throwable
import
rx.Subscription
import
rx.android.schedulers.AndroidSchedulers
import
java.util.*
class
WnVedioAdPresenter
:
BasePresenter
<
WnVedioAdView
>()
{
fun
reportAddCoinMsg
(
activity
:
Activity
?,
vo
:
HashMap
<
String
,
Any
>)
{
if
(
activity
==
null
)
return
loanApplication
=
activity
.
application
as
MintsApplication
loanService
=
loanApplication
.
getLoanService
()
subscription
=
loanService
.
reportAddCoinMsg
(
vo
)
.
observeOn
(
AndroidSchedulers
.
mainThread
())
.
subscribeOn
(
loanApplication
.
defaultSubscribeScheduler
())
.
subscribe
(
object
:
BaseSubscriber
<
BaseResponse
<
Any
?>?>()
{
override
fun
onCompleted
()
{}
override
fun
onError
(
e
:
Throwable
)
{
}
fun
onNext
(
baseResponse
:
BaseResponse
<
Any
?
>)
{}
})
}
fun
dispose
()
{
loanService
=
null
loanApplication
=
null
if
(
subscription
!=
null
&&
!
subscription
.
isUnsubscribed
())
{
subscription
.
unsubscribe
()
}
}
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/mvp/views/WnVedioAdView.kt
0 → 100644
View file @
d343b3fa
package
com.mints.highgold.mvp.views
interface
WnVedioAdView
:
BaseView
{
}
\ No newline at end of file
highgold/app/src/main/java/com/mints/highgold/ui/activitys/AwardActivity.java
View file @
d343b3fa
...
@@ -453,7 +453,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
...
@@ -453,7 +453,7 @@ public class AwardActivity extends BaseActivity implements AwardView {
/**
/**
* 广告返回结果
* 广告返回结果
*
*
* @param adType
* @param adType
CHUANGSHEN_VEDIO_AD HYTECH_VEDIO_AD 自有界面
*/
*/
private
void
vedioAdingSuccess
(
String
adType
)
{
private
void
vedioAdingSuccess
(
String
adType
)
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
CHUANGSHEN_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
HYTECH_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
CHUANGSHEN_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
HYTECH_VEDIO_AD
))
{
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/MainFragment.java
View file @
d343b3fa
...
@@ -25,12 +25,15 @@ import com.daimajia.androidanimations.library.YoYo;
...
@@ -25,12 +25,15 @@ import com.daimajia.androidanimations.library.YoYo;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonObject
;
import
com.google.gson.JsonParser
;
import
com.google.gson.JsonParser
;
import
com.mints.highgold.BuildConfig
;
import
com.mints.highgold.BuildConfig
;
import
com.mints.highgold.MintsApplication
;
import
com.mints.highgold.R
;
import
com.mints.highgold.R
;
import
com.mints.highgold.ad.DomobVedioAdManager
;
import
com.mints.highgold.ad.DomobVedioAdManager
;
import
com.mints.highgold.ad.VedioAdingManager
;
import
com.mints.highgold.ad.VedioAdingManager
;
import
com.mints.highgold.ad.WnVedioAdManager
;
import
com.mints.highgold.ad.inscreenvedio.MintegralInscreenVedioAdManager
;
import
com.mints.highgold.ad.inscreenvedio.MintegralInscreenVedioAdManager
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.AppConfig
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.common.Constant
;
import
com.mints.highgold.manager.AdMngrHolder
;
import
com.mints.highgold.manager.AmapLocationManager
;
import
com.mints.highgold.manager.AmapLocationManager
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.LiebaoManager
;
import
com.mints.highgold.manager.ShumeiManager
;
import
com.mints.highgold.manager.ShumeiManager
;
...
@@ -360,7 +363,7 @@ public class MainFragment extends BaseFragment
...
@@ -360,7 +363,7 @@ public class MainFragment extends BaseFragment
case
R
.
id
.
tv_fragment_main_whatgold
:
// 如何赚金币
case
R
.
id
.
tv_fragment_main_whatgold
:
// 如何赚金币
readyGo
(
WhatGoldActivity
.
class
);
readyGo
(
WhatGoldActivity
.
class
);
// WnVedioAdManager.Companion.getInstance(getActivity()).loadWnAd(0, 0, "", "");
break
;
break
;
case
R
.
id
.
rl_fragment_main_redbox
:
// 红包
case
R
.
id
.
rl_fragment_main_redbox
:
// 红包
readyGo
(
RedboxActivity
.
class
);
readyGo
(
RedboxActivity
.
class
);
...
@@ -383,7 +386,7 @@ public class MainFragment extends BaseFragment
...
@@ -383,7 +386,7 @@ public class MainFragment extends BaseFragment
.
subscribe
(
granted
->
{
.
subscribe
(
granted
->
{
if
(
granted
)
{
if
(
granted
)
{
String
gameId
=
userConfig
.
getGameHomeId
();
String
gameId
=
userConfig
.
getGameHomeId
();
if
(!
TextUtils
.
isEmpty
(
gameId
)
)
{
if
(!
TextUtils
.
isEmpty
(
gameId
))
{
liebaoManager
.
startH5Game
(
gameId
);
liebaoManager
.
startH5Game
(
gameId
);
}
else
{
}
else
{
boolean
main
=
getActivity
()
instanceof
MainActivity
;
boolean
main
=
getActivity
()
instanceof
MainActivity
;
...
@@ -486,7 +489,8 @@ public class MainFragment extends BaseFragment
...
@@ -486,7 +489,8 @@ public class MainFragment extends BaseFragment
// data.setVedioplan_mintegral_vedio_rate(0);
// data.setVedioplan_mintegral_vedio_rate(0);
// data.setVedioplan_coral_vedio_rate(0);
// data.setVedioplan_coral_vedio_rate(0);
// data.setVedioplan_domob_vedio_rate(0);
// data.setVedioplan_domob_vedio_rate(0);
// data.setVedioplan_chuangshen_vedio_rate(10);
// data.setVedioplan_chuangshen_vedio_rate(0);
// data.setVedioplan_sdhz_vedio_rate(10);
//
//
// data.setVedioplan_csj_vedio_surplus(0);
// data.setVedioplan_csj_vedio_surplus(0);
// data.setVedioplan_lyh_vedio_surplus(0);
// data.setVedioplan_lyh_vedio_surplus(0);
...
@@ -495,18 +499,19 @@ public class MainFragment extends BaseFragment
...
@@ -495,18 +499,19 @@ public class MainFragment extends BaseFragment
// data.setVedioplan_mintegral_vedio_surplus(0);
// data.setVedioplan_mintegral_vedio_surplus(0);
// data.setVedioplan_coral_vedio_surplus(0);
// data.setVedioplan_coral_vedio_surplus(0);
// data.setVedioplan_domob_vedio_surplus(0);
// data.setVedioplan_domob_vedio_surplus(0);
// data.setVedioplan_chuangshen_vedio_surplus(10);
// data.setVedioplan_chuangshen_vedio_surplus(0);
// data.setVedioplan_sdhz_vedio_surplus(10);
// 设置随机广告权重
// 设置随机广告权重
if
(
vedioAdingManager
!=
null
)
{
if
(
vedioAdingManager
!=
null
)
{
vedioAdingManager
.
initAdWeight
(
data
.
getVedioplan_csj_vedio_rate
(),
data
.
getVedioplan_lyh_vedio_rate
(),
vedioAdingManager
.
initAdWeight
(
data
.
getVedioplan_csj_vedio_rate
(),
data
.
getVedioplan_lyh_vedio_rate
(),
data
.
getVedioplan_csj_full_screen_video_rate
(),
data
.
getVedioplan_hytech_vedio_rate
(),
data
.
getVedioplan_csj_full_screen_video_rate
(),
data
.
getVedioplan_hytech_vedio_rate
(),
data
.
getVedioplan_mintegral_vedio_rate
(),
data
.
getVedioplan_coral_vedio_rate
(),
data
.
getVedioplan_mintegral_vedio_rate
(),
data
.
getVedioplan_coral_vedio_rate
(),
data
.
getVedioplan_chuangshen_vedio_rate
(),
data
.
getVedioplan_domob_vedio_rate
());
data
.
getVedioplan_chuangshen_vedio_rate
(),
data
.
getVedioplan_domob_vedio_rate
()
,
data
.
getVedioplan_sdhz_vedio_rate
()
);
}
}
LogUtil
.
d
(
TAG
,
"首页权重值:csjVedioWeight:"
+
data
.
getVedioplan_csj_vedio_rate
()
+
" ylhWeight:"
+
data
.
getVedioplan_lyh_vedio_rate
()
+
" csjFullWeight:"
+
data
.
getVedioplan_csj_full_screen_video_rate
()
+
LogUtil
.
d
(
TAG
,
"首页权重值:csjVedioWeight:"
+
data
.
getVedioplan_csj_vedio_rate
()
+
" ylhWeight:"
+
data
.
getVedioplan_lyh_vedio_rate
()
+
" csjFullWeight:"
+
data
.
getVedioplan_csj_full_screen_video_rate
()
+
" hytechVedioAdWeight:"
+
data
.
getVedioplan_hytech_vedio_rate
()
+
" mintegralVedioAdWeight:"
+
data
.
getVedioplan_mintegral_vedio_rate
()
+
" shanhuVedioAdWeight:"
+
data
.
getVedioplan_coral_vedio_rate
()
+
" hytechVedioAdWeight:"
+
data
.
getVedioplan_hytech_vedio_rate
()
+
" mintegralVedioAdWeight:"
+
data
.
getVedioplan_mintegral_vedio_rate
()
+
" shanhuVedioAdWeight:"
+
data
.
getVedioplan_coral_vedio_rate
()
+
" chuangshenVedioAdWeight:"
+
data
.
getVedioplan_chuangshen_vedio_rate
()
+
" domobVedioAdWeight:"
+
data
.
getVedioplan_domob_vedio_rate
());
" chuangshenVedioAdWeight:"
+
data
.
getVedioplan_chuangshen_vedio_rate
()
+
" domobVedioAdWeight:"
+
data
.
getVedioplan_domob_vedio_rate
()
+
" sdhzVedioAdWeight:"
+
data
.
getVedioplan_sdhz_vedio_rate
()
);
// 广告视频数
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
getVedioplan_csj_vedio_surplus
();
AppConfig
.
csjVedioAdCount
=
data
.
getVedioplan_csj_vedio_surplus
();
AppConfig
.
ylhAdCount
=
data
.
getVedioplan_lyh_vedio_surplus
();
AppConfig
.
ylhAdCount
=
data
.
getVedioplan_lyh_vedio_surplus
();
...
@@ -516,9 +521,10 @@ public class MainFragment extends BaseFragment
...
@@ -516,9 +521,10 @@ public class MainFragment extends BaseFragment
AppConfig
.
shanhuAdCount
=
data
.
getVedioplan_coral_vedio_surplus
();
AppConfig
.
shanhuAdCount
=
data
.
getVedioplan_coral_vedio_surplus
();
AppConfig
.
chuangshenVedioAdCount
=
data
.
getVedioplan_chuangshen_vedio_surplus
();
AppConfig
.
chuangshenVedioAdCount
=
data
.
getVedioplan_chuangshen_vedio_surplus
();
AppConfig
.
duomentVedioAdCount
=
data
.
getVedioplan_domob_vedio_surplus
();
AppConfig
.
duomentVedioAdCount
=
data
.
getVedioplan_domob_vedio_surplus
();
AppConfig
.
sdhzVedioAdCount
=
data
.
getVedioplan_sdhz_vedio_surplus
();
LogUtil
.
d
(
TAG
,
"首页视频数:csjVedioAdCount:"
+
data
.
getVedioplan_csj_vedio_surplus
()
+
" ylhAdCount:"
+
data
.
getVedioplan_lyh_vedio_surplus
()
+
" csjFullAdCount:"
+
data
.
getVedioplan_csj_full_screen_video_surplus
()
+
LogUtil
.
d
(
TAG
,
"首页视频数:csjVedioAdCount:"
+
data
.
getVedioplan_csj_vedio_surplus
()
+
" ylhAdCount:"
+
data
.
getVedioplan_lyh_vedio_surplus
()
+
" csjFullAdCount:"
+
data
.
getVedioplan_csj_full_screen_video_surplus
()
+
" hytechVedioAdCount:"
+
data
.
getVedioplan_hytech_vedio_surplus
()
+
" mintegralVedioAdCount:"
+
data
.
getVedioplan_mintegral_vedio_surplus
()
+
" shanhuVedioAdCount:"
+
data
.
getVedioplan_coral_vedio_surplus
()
+
" hytechVedioAdCount:"
+
data
.
getVedioplan_hytech_vedio_surplus
()
+
" mintegralVedioAdCount:"
+
data
.
getVedioplan_mintegral_vedio_surplus
()
+
" shanhuVedioAdCount:"
+
data
.
getVedioplan_coral_vedio_surplus
()
+
" chuangshenVedioAdCount:"
+
data
.
getVedioplan_chuangshen_vedio_surplus
()
+
" domobVedioAdCount:"
+
data
.
getVedioplan_domob_vedio_surplus
());
" chuangshenVedioAdCount:"
+
data
.
getVedioplan_chuangshen_vedio_surplus
()
+
" domobVedioAdCount:"
+
data
.
getVedioplan_domob_vedio_surplus
()
+
" sdhzVedioAdCount:"
+
data
.
getVedioplan_sdhz_vedio_surplus
()
);
AppConfig
.
yilanVedioTime
=
data
.
getRedPacketSecond
();
AppConfig
.
yilanVedioTime
=
data
.
getRedPacketSecond
();
...
@@ -1068,7 +1074,7 @@ public class MainFragment extends BaseFragment
...
@@ -1068,7 +1074,7 @@ public class MainFragment extends BaseFragment
switch
(
status
)
{
switch
(
status
)
{
case
0
:
case
0
:
case
2
:
case
2
:
if
(!
TextUtils
.
isEmpty
(
gameId
)
)
{
if
(!
TextUtils
.
isEmpty
(
gameId
))
{
liebaoManager
.
startH5Game
(
gameId
);
liebaoManager
.
startH5Game
(
gameId
);
}
else
{
}
else
{
boolean
main
=
getActivity
()
instanceof
MainActivity
;
boolean
main
=
getActivity
()
instanceof
MainActivity
;
...
@@ -1092,7 +1098,7 @@ public class MainFragment extends BaseFragment
...
@@ -1092,7 +1098,7 @@ public class MainFragment extends BaseFragment
readyGo
(
AwardActivity
.
class
,
bundle
);
readyGo
(
AwardActivity
.
class
,
bundle
);
break
;
break
;
default
:
default
:
if
(!
TextUtils
.
isEmpty
(
gameId
)
)
{
if
(!
TextUtils
.
isEmpty
(
gameId
))
{
liebaoManager
.
startH5Game
(
gameId
);
liebaoManager
.
startH5Game
(
gameId
);
}
else
{
}
else
{
boolean
main
=
getActivity
()
instanceof
MainActivity
;
boolean
main
=
getActivity
()
instanceof
MainActivity
;
...
@@ -1143,6 +1149,11 @@ public class MainFragment extends BaseFragment
...
@@ -1143,6 +1149,11 @@ public class MainFragment extends BaseFragment
wvWater
.
setWaterViewListener
(
this
);
wvWater
.
setWaterViewListener
(
this
);
// 权限
// 权限
showOpenAppPermissionDialog
();
showOpenAppPermissionDialog
();
//闪电盒子传入oaid
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
getOaid
()))
{
AdMngrHolder
.
setOaid
(
MintsApplication
.
getOaid
());
}
}
}
/**
/**
...
@@ -1450,6 +1461,7 @@ public class MainFragment extends BaseFragment
...
@@ -1450,6 +1461,7 @@ public class MainFragment extends BaseFragment
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_FULL_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_FULL_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SDHZ_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
YLH_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
YLH_VEDIO_AD
))
{
...
@@ -1460,6 +1472,8 @@ public class MainFragment extends BaseFragment
...
@@ -1460,6 +1472,8 @@ public class MainFragment extends BaseFragment
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
SDHZ_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_SDHZ
;
}
else
{
}
else
{
AD_SOURCE
=
Constant
.
AD_SOURCE_CSJ
;
AD_SOURCE
=
Constant
.
AD_SOURCE_CSJ
;
}
}
...
...
highgold/app/src/main/java/com/mints/highgold/ui/fragment/VersusFragment.java
View file @
d343b3fa
...
@@ -2246,6 +2246,7 @@ public class VersusFragment extends BaseFragment
...
@@ -2246,6 +2246,7 @@ public class VersusFragment extends BaseFragment
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_FULL_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
CSJ_FULL_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SHANHU_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
MINTEGRAL_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
SDHZ_VEDIO_AD
)
||
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
YLH_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
adType
,
Constant
.
YLH_VEDIO_AD
))
{
...
@@ -2256,6 +2257,8 @@ public class VersusFragment extends BaseFragment
...
@@ -2256,6 +2257,8 @@ public class VersusFragment extends BaseFragment
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
AD_SOURCE
=
Constant
.
AD_SOURCE_SHANHU
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
DUOMENT_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_DOMOB
;
AD_SOURCE
=
Constant
.
AD_SOURCE_DOMOB
;
}
else
if
(
TextUtils
.
equals
(
adType
,
Constant
.
SDHZ_VEDIO_AD
))
{
AD_SOURCE
=
Constant
.
AD_SOURCE_SDHZ
;
}
else
{
}
else
{
AD_SOURCE
=
Constant
.
AD_SOURCE_CSJ
;
AD_SOURCE
=
Constant
.
AD_SOURCE_CSJ
;
}
}
...
...
highgold/app/src/main/res/xml/wn_file_paths.xml
0 → 100755
View file @
d343b3fa
<?xml version="1.0" encoding="utf-8"?>
<paths
xmlns:android=
"http://schemas.android.com/apk/res/android"
>
<!--为了适配所有路径可以设置 path = "." -->
<external-path
name=
"download"
path=
"."
/>
<external-files-path
name=
"external_file"
path=
"."
/>
<external-cache-path
name=
"external_cache"
path=
"."
/>
<files-path
name=
"files"
path=
"."
/>
<cache-path
name=
"cache"
path=
"。"
/>
</paths>
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