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
46e96719
Commit
46e96719
authored
Nov 13, 2020
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码合并
parent
3c4cd3a4
Changes
43
Show whitespace changes
Inline
Side-by-side
Showing
43 changed files
with
411 additions
and
1269 deletions
+411
-1269
build.gradle
GoodMoney/app/build.gradle
+16
-12
bxmsdk-release-3.0.0-csj3300.aar
GoodMoney/app/libs/bxmsdk-release-3.0.0-csj3300.aar
+0
-0
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+12
-0
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+3
-2
MintsApplication.java
...p/src/main/java/com/mints/goodmoney/MintsApplication.java
+7
-65
CsjFullVedioAdManager.java
...in/java/com/mints/goodmoney/ad/CsjFullVedioAdManager.java
+0
-374
BannerAdmanager.kt
...ain/java/com/mints/goodmoney/ad/banner/BannerAdmanager.kt
+0
-51
InsertScreenAdManager.java
...om/mints/goodmoney/ad/inscreen/InsertScreenAdManager.java
+0
-428
MintegralInscreenVedioAdManager.java
...ney/ad/inscreenvedio/MintegralInscreenVedioAdManager.java
+0
-185
CsjVedioAdManager.java
.../java/com/mints/goodmoney/ad/video/CsjVedioAdManager.java
+2
-2
VedioAdingManager.java
.../java/com/mints/goodmoney/ad/video/VedioAdingManager.java
+2
-9
YlhVedioAdManager.java
.../java/com/mints/goodmoney/ad/video/YlhVedioAdManager.java
+7
-3
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+6
-1
BxmManager.kt
...p/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
+3
-0
LiebaoManager.java
.../main/java/com/mints/goodmoney/manager/LiebaoManager.java
+4
-4
MiitHelper.java
...src/main/java/com/mints/goodmoney/manager/MiitHelper.java
+1
-1
TrackManager.java
...c/main/java/com/mints/goodmoney/manager/TrackManager.java
+1
-0
TtCsjAdManager.java
...main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
+1
-2
YlhAdManager.kt
...src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
+2
-2
DrawcashBean.java
...main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
+18
-0
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+24
-0
MyView.kt
...app/src/main/java/com/mints/goodmoney/mvp/views/MyView.kt
+3
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+15
-17
DrawcashActivity.kt
...java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
+5
-4
EraseActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/EraseActivity.kt
+11
-11
GuideActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
+9
-1
LoginActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
+24
-1
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+1
-1
SplashYlhActivity.kt
...ava/com/mints/goodmoney/ui/activitys/SplashYlhActivity.kt
+10
-3
WalkActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
+2
-1
WaterActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
+2
-1
BaseActivity.java
...a/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
+31
-31
DhGameFragment.kt
...in/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
+36
-0
MainFragment.kt
...main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
+7
-13
MoneyFragment.kt
...ain/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
+41
-9
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+38
-3
CustomRefreshLayout.java
...nts/goodmoney/ui/widgets/refresh/CustomRefreshLayout.java
+1
-1
ForegroundOrBackground.java
...ava/com/mints/goodmoney/utils/ForegroundOrBackground.java
+25
-8
BaseAppCompatActivity.java
...in/java/com/mints/library/base/BaseAppCompatActivity.java
+3
-2
activity_liebao_game.xml
GoodMoney/app/src/main/res/layout/activity_liebao_game.xml
+15
-15
fragment_main_dh.xml
GoodMoney/app/src/main/res/layout/fragment_main_dh.xml
+15
-0
fragment_main_money.xml
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
+0
-1
fragment_main_zy.xml
GoodMoney/app/src/main/res/layout/fragment_main_zy.xml
+8
-5
No files found.
GoodMoney/app/build.gradle
View file @
46e96719
...
@@ -9,8 +9,8 @@ android {
...
@@ -9,8 +9,8 @@ android {
applicationId
"com.mints.goodmoney"
applicationId
"com.mints.goodmoney"
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
minSdkVersion
rootProject
.
ext
.
androidMinSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
targetSdkVersion
rootProject
.
ext
.
androidTargetSdkVersion
versionCode
1
versionCode
2
versionName
"1.0.
0
"
versionName
"1.0.
1
"
flavorDimensions
"default"
flavorDimensions
"default"
// dex突破65535的限制
// dex突破65535的限制
...
@@ -68,6 +68,8 @@ android {
...
@@ -68,6 +68,8 @@ android {
manifestPlaceholders
=
[
TD_SCHEMA_KEY:
DEBUG_TD_SCHEMA_KEY
,
manifestPlaceholders
=
[
TD_SCHEMA_KEY:
DEBUG_TD_SCHEMA_KEY
,
TD_KEY
:
DEBUG_TD_KEY
]
TD_KEY
:
DEBUG_TD_KEY
]
// buildConfigField "String", "MainIp", RELEASE_URL
//混淆
//混淆
minifyEnabled
false
minifyEnabled
false
zipAlignEnabled
false
zipAlignEnabled
false
...
@@ -105,7 +107,8 @@ android {
...
@@ -105,7 +107,8 @@ android {
}
}
productFlavors
{
productFlavors
{
goodmoneypkg
{}
// goodmoneypkg {}
share_goodmoney
{}
}
}
productFlavors
.
all
{
productFlavors
.
all
{
...
@@ -131,10 +134,11 @@ android {
...
@@ -131,10 +134,11 @@ android {
dependencies
{
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'androidx.appcompat:appcompat:1.2.0'
// implementation 'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.constraintlayout:constraintlayout:2.0.4'
implementation
'androidx.appcompat:appcompat:1.0.0'
implementation
'androidx.recyclerview:recyclerview:1.1.0'
implementation
'androidx.constraintlayout:constraintlayout:1.1.3'
implementation
'com.google.android.material:material:1.2.1'
implementation
'androidx.recyclerview:recyclerview:1.0.0'
implementation
'com.google.android.material:material:1.0.0'
// 网络请求
// 网络请求
implementation
'com.squareup.retrofit2:retrofit:2.7.1'
implementation
'com.squareup.retrofit2:retrofit:2.7.1'
implementation
'com.squareup.retrofit2:adapter-rxjava:2.1.0'
implementation
'com.squareup.retrofit2:adapter-rxjava:2.1.0'
...
@@ -152,6 +156,7 @@ dependencies {
...
@@ -152,6 +156,7 @@ dependencies {
implementation
'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
implementation
'com.tbruyelle.rxpermissions:rxpermissions:0.9.3@aar'
// 图片加载
// 图片加载
implementation
'com.github.bumptech.glide:glide:4.11.0'
implementation
'com.github.bumptech.glide:glide:4.11.0'
implementation
'androidx.localbroadcastmanager:localbroadcastmanager:1.0.0'
annotationProcessor
'com.github.bumptech.glide:compiler:4.11.0'
annotationProcessor
'com.github.bumptech.glide:compiler:4.11.0'
// 65536
// 65536
implementation
'androidx.multidex:multidex:2.0.1'
implementation
'androidx.multidex:multidex:2.0.1'
...
@@ -223,12 +228,11 @@ dependencies {
...
@@ -223,12 +228,11 @@ dependencies {
// 掌阅书城
// 掌阅书城
implementation
(
name:
'iReader-release-1.0.1'
,
ext:
'aar'
)
implementation
(
name:
'iReader-release-1.0.1'
,
ext:
'aar'
)
implementation
'com.alibaba:fastjson:1.2.11'
implementation
'com.alibaba:fastjson:1.2.11'
implementation
'androidx.annotation:annotation:1.
1
.0'
implementation
'androidx.annotation:annotation:1.
0
.0'
implementation
'androidx.core:core:1.
3.2
'
implementation
'androidx.core:core:1.
0.0
'
implementation
'androidx.fragment:fragment:1.
2.5
'
implementation
'androidx.fragment:fragment:1.
0.0
'
// 变现猫
// 变现猫
implementation
(
name:
'bxmsdk-release-3.0.0'
,
ext:
'aar'
)
implementation
(
name:
'bxmsdk-release-3.0.0-csj3300'
,
ext:
'aar'
)
implementation
'com.android.support:support-v4:28.0.0'
testImplementation
'junit:junit:4.13'
testImplementation
'junit:junit:4.13'
...
...
GoodMoney/app/libs/bxmsdk-release-3.0.0.aar
→
GoodMoney/app/libs/bxmsdk-release-3.0.0
-csj3300
.aar
100755 → 100644
View file @
46e96719
No preview for this file type
GoodMoney/app/src/main/AndroidManifest.xml
View file @
46e96719
...
@@ -87,6 +87,18 @@
...
@@ -87,6 +87,18 @@
android:name=
"JPUSH_CHANNEL"
android:name=
"JPUSH_CHANNEL"
android:value=
"${JPUSH_CHANNEL}"
/>
android:value=
"${JPUSH_CHANNEL}"
/>
<!-- <activity-->
<!-- android:configChanges="keyboard|orientation|screenSize"-->
<!-- android:windowSoftInputMode="adjustPan|stateHidden"-->
<!-- android:theme="@style/Theme.ActivitySplash"-->
<!-- android:name=".ui.activitys.SplashYlhActivity"-->
<!-- android:screenOrientation="portrait">-->
<!-- <intent-filter>-->
<!-- <action android:name="android.intent.action.MAIN" />-->
<!-- <category android:name="android.intent.category.LAUNCHER" />-->
<!-- </intent-filter>-->
<!-- </activity>-->
<activity
<activity
android:name=
".ui.activitys.SplashYlhActivity"
android:name=
".ui.activitys.SplashYlhActivity"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
46e96719
...
@@ -8,7 +8,7 @@ import cn.jpush.android.api.BasicPushNotificationBuilder
...
@@ -8,7 +8,7 @@ import cn.jpush.android.api.BasicPushNotificationBuilder
import
cn.jpush.android.api.JPushInterface
import
cn.jpush.android.api.JPushInterface
import
com.mints.goodmoney.manager.BxmManager.initBxm
import
com.mints.goodmoney.manager.BxmManager.initBxm
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.ShumeiManager
import
com.mints.goodmoney.manager.ZhangyueManager
.onCreateIreader
import
com.mints.goodmoney.manager.ZhangyueManager
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.CommonUtils
import
com.mob.MobSDK
import
com.mob.MobSDK
import
com.orhanobut.logger.AndroidLogAdapter
import
com.orhanobut.logger.AndroidLogAdapter
...
@@ -79,7 +79,8 @@ class InitAppService : IntentService("InitializeService") {
...
@@ -79,7 +79,8 @@ class InitAppService : IntentService("InitializeService") {
initJpush
()
initJpush
()
// 掌阅书城
// 掌阅书城
onCreateIreader
(
this
.
application
)
ZhangyueManager
.
attachBaseContextIreader
(
this
.
application
)
ZhangyueManager
.
onCreateIreader
(
this
.
application
)
// 变现猫
// 变现猫
initBxm
(
this
.
application
)
initBxm
(
this
.
application
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/MintsApplication.java
View file @
46e96719
...
@@ -4,7 +4,6 @@ import android.content.Context;
...
@@ -4,7 +4,6 @@ import android.content.Context;
import
android.content.Intent
;
import
android.content.Intent
;
import
android.os.Build
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
android.webkit.WebView
;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.localbroadcastmanager.content.LocalBroadcastManager
;
import
androidx.multidex.MultiDex
;
import
androidx.multidex.MultiDex
;
...
@@ -15,17 +14,13 @@ import com.component.dly.xzzq_ywsdk.YwSDK;
...
@@ -15,17 +14,13 @@ import com.component.dly.xzzq_ywsdk.YwSDK;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.common.Constant
;
import
com.mints.goodmoney.manager.LiebaoManager
;
import
com.mints.goodmoney.manager.LiebaoManager
;
import
com.mints.goodmoney.manager.MiitHelper
;
import
com.mints.goodmoney.manager.MiitHelper
;
import
com.mints.goodmoney.manager.OaidManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.TtCsjAdManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.UserManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.manager.YlhAdManager
;
import
com.mints.goodmoney.manager.ZhangyueManager
;
import
com.mints.goodmoney.net.LoanService
;
import
com.mints.goodmoney.net.LoanService
;
import
com.mints.goodmoney.utils.ForegroundOrBackground
;
import
com.mints.goodmoney.utils.ForegroundOrBackground
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.SystemUtils
;
import
com.mints.goodmoney.utils.SystemUtils
;
import
com.mints.goodmoney.utils.rxutil.CommonRxTask
;
import
com.mints.goodmoney.utils.rxutil.RxjavaUtil
;
import
com.yilan.sdk.ui.YLUIInit
;
import
com.yilan.sdk.ui.YLUIInit
;
import
com.yilan.sdk.ui.configs.CommentConfig
;
import
com.yilan.sdk.ui.configs.CommentConfig
;
import
com.yilan.sdk.ui.configs.FeedConfig
;
import
com.yilan.sdk.ui.configs.FeedConfig
;
...
@@ -80,8 +75,6 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -80,8 +75,6 @@ public class MintsApplication extends MultiDexApplication {
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
}
ZhangyueManager
.
INSTANCE
.
attachBaseContextIreader
(
this
);
}
}
/**
/**
...
@@ -92,12 +85,12 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -92,12 +85,12 @@ public class MintsApplication extends MultiDexApplication {
initMiitHelper
();
initMiitHelper
();
//Android 9 or above must be set
//Android 9 or above must be set
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
P
)
{
//
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
String
processName
=
getProcessName
();
//
String processName = getProcessName();
if
(!
getPackageName
().
equals
(
processName
))
{
//
if (!getPackageName().equals(processName)) {
WebView
.
setDataDirectorySuffix
(
processName
);
//
WebView.setDataDirectorySuffix(processName);
}
//
}
}
//
}
// 子线程初始化三方SDK
// 子线程初始化三方SDK
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
String
processName
=
SystemUtils
.
INSTANCE
.
getProcessName
(
this
,
android
.
os
.
Process
.
myPid
());
...
@@ -118,17 +111,8 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -118,17 +111,8 @@ public class MintsApplication extends MultiDexApplication {
// 一览视频
// 一览视频
initYL
();
initYL
();
// 鱼丸盒子
initYwhz
();
// 猎豹游戏初始化
// 猎豹游戏初始化
LiebaoManager
.
getInstance
().
initCmGameSdk
();
LiebaoManager
.
getInstance
().
initCmGameSdk
();
// // 掌阅书城
// ZhangyueManager.INSTANCE.onCreateIreader(this);
//
// // 变现猫
// BxmManager.INSTANCE.initBxm(this);
}
}
private
MiitHelper
.
AppIdsUpdater
appIdsUpdater
=
ids
->
OAID
=
ids
;
private
MiitHelper
.
AppIdsUpdater
appIdsUpdater
=
ids
->
OAID
=
ids
;
...
@@ -139,19 +123,7 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -139,19 +123,7 @@ public class MintsApplication extends MultiDexApplication {
private
void
initMiitHelper
()
{
private
void
initMiitHelper
()
{
try
{
try
{
MiitHelper
miitHelper
=
new
MiitHelper
(
appIdsUpdater
);
MiitHelper
miitHelper
=
new
MiitHelper
(
appIdsUpdater
);
miitHelper
.
getDeviceIds
(
getApplicationContext
());
miitHelper
.
initDeviceIds
(
getApplicationContext
());
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
LogUtil
.
e
(
e
);
}
}
/**
* 移动安装联盟 获取OAID等设备标识符
*/
private
void
initOaid
()
{
try
{
new
OaidManager
(
ids
->
OAID
=
ids
).
InitSdk
(
this
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
LogUtil
.
e
(
e
);
LogUtil
.
e
(
e
);
...
@@ -198,36 +170,6 @@ public class MintsApplication extends MultiDexApplication {
...
@@ -198,36 +170,6 @@ public class MintsApplication extends MultiDexApplication {
FeedConfig
.
getInstance
().
setPlayerStyle
(
FeedConfig
.
STYLE_NATIVE
);
//FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
FeedConfig
.
getInstance
().
setPlayerStyle
(
FeedConfig
.
STYLE_NATIVE
);
//FeedConfig.STYLE_STYLE_FEED_PLAY当前页面播放
}
}
/**
* 鱼丸盒子
*/
private
void
initYwhz
()
{
if
(
UserManager
.
getInstance
().
userIsLogin
())
{
if
(
Build
.
VERSION
.
SDK_INT
>
28
)
{
// android10 延迟加载 因为获取不到oaid
RxjavaUtil
.
executeRxTask
(
new
CommonRxTask
<
String
>(
""
)
{
@Override
public
void
doInIOThread
()
{
try
{
Thread
.
sleep
(
1500
);
}
catch
(
InterruptedException
e
)
{
e
.
printStackTrace
();
}
}
@Override
public
void
doInUIThread
()
{
initYwSdk
();
}
});
}
else
{
initYwSdk
();
}
}
}
/**
/**
* 鱼丸盒子
* 鱼丸盒子
*/
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/CsjFullVedioAdManager.java
deleted
100644 → 0
View file @
3c4cd3a4
//package com.mints.goodmoney.ad;
//
//import android.app.Activity;
//import android.content.DialogInterface;
//import android.text.TextUtils;
//import android.view.KeyEvent;
//
//import com.bytedance.sdk.openadsdk.AdSlot;
//import com.bytedance.sdk.openadsdk.TTAdConstant;
//import com.bytedance.sdk.openadsdk.TTAdNative;
//import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
//import com.mints.goodmoney.MintsApplication;
//import com.mints.goodmoney.common.Constant;
//import com.mints.goodmoney.manager.TTNativeExpressManager;
//import com.mints.goodmoney.manager.TrackManager;
//import com.mints.goodmoney.manager.TtCsjAdManager;
//import com.mints.goodmoney.mvp.presenters.CsjFullVedioAdPresenter;
//import com.mints.goodmoney.mvp.views.VedioAdManagerView;
//import com.mints.goodmoney.ui.widgets.LoadingDialog;
//import com.mints.goodmoney.utils.ToastUtil;
//
//import java.util.HashMap;
//
///**
// * 穿山甲全屏广告
// */
//public class CsjFullVedioAdManager implements VedioAdManagerView {
//
// private static CsjFullVedioAdManager _inst;
//
// private int curCoin;
// private String extraId;
// private CsjFullVedioAdPresenter csjFullVedioAdPresenter;
// private CsjFullVedioAdListener csjFullVedioAdListener;
//
// Activity activity;
// private TTAdNative ttAdNative;
// private TTFullScreenVideoAd mttFullVideoAd;
//
// protected LoadingDialog progressDialog;
// boolean isClickRunDownload = false;
//
// private boolean isClickScreen = true; // 是否点击屏幕跳转广告
//
//
// public static CsjFullVedioAdManager getInstance(Activity activity) {
// if (_inst != null) {
// return _inst;
// } else {
// _inst = new CsjFullVedioAdManager(activity);
// return _inst;
// }
// }
//
// private CsjFullVedioAdManager(Activity activity) {
// init(activity);
// return;
// }
//
// private void init(Activity activity) {
// this.activity = activity;
//
// TTNativeExpressManager ttNativeExpressManager = new TTNativeExpressManager();
// ttAdNative = ttNativeExpressManager.initTTAd(MintsApplication.getContext(), false);
//
// csjFullVedioAdPresenter = new CsjFullVedioAdPresenter();
// csjFullVedioAdPresenter.attachView(this);
// }
//
// public void destory() {
// if (mttFullVideoAd != null) {
// mttFullVideoAd.setFullScreenVideoAdInteractionListener(null);
// }
//
// if (csjFullVedioAdPresenter != null) {
// csjFullVedioAdPresenter.dispose();
// csjFullVedioAdPresenter.detachView();
// }
// }
//
// /**
// * 全屏广告
// *
// * @param carrierType
// */
// @SuppressWarnings("SameParameterValue")
// public void loadCsjFullAd(int curCoin, String carrierType, String extraId) {
// if (activity == null) {
// showToast("界面加载超时,请重新加载");
// return;
// }
// isClickScreen = true;
// isClickRunDownload = false;
// this.curCoin = curCoin;
// this.extraId = extraId;
//// showLoading("加载中...");
//
// String codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_EXCEPTION;
//
// switch (carrierType) {
// case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
// codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_OFFLINE_DOUBLE;
// break;
//// case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
//// codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_DRINK_PATCH;
//// break;
//// case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
//// codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_VERSUS_DRINKTEA;
//// break;
// case Constant.CARRIER_CHALLENGE_TURN:// 挑战大转盘
// codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_CHALLENGE_TURN;
// break;
// case Constant.CARRIER_CHALLENGE_CARD:// 挑战刮刮乐
// codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_CHALLENGE_CARD;
// break;
// default: // 激励视频异常或其他 时使用
// codeId = TtCsjAdManager.TT_AD_ALLVEDIO_ID_EXCEPTION;
// break;
// }
//
// if (mttFullVideoAd != null) {
// mttFullVideoAd.setFullScreenVideoAdInteractionListener(null);
// }
//
// AdSlot adSlot = new AdSlot.Builder()
// .setCodeId(codeId)
// .setSupportDeepLink(true)
// .setImageAcceptedSize(1080, 1920)
// .setOrientation(TTAdConstant.VERTICAL)
// .build();
// ttAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() {
// @Override
// public void onError(int code, String message) {
//// hideLoading();
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, String.valueOf(code), message);
//
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdFail();
// }
// }
//
// @Override
// public void onFullScreenVideoAdLoad(TTFullScreenVideoAd ad) {
// mttFullVideoAd = ad;
// mttFullVideoAd.setFullScreenVideoAdInteractionListener(new TTFullScreenVideoAd.FullScreenVideoAdInteractionListener() {
//
// @Override
// public void onAdShow() {
//// hideLoading();
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ZERO, "", "");
//
// }
//
// @Override
// public void onAdVideoBarClick() {
// if (isClickScreen) {
// // 防止重复
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_FOUR, "", "");
// isClickScreen = false;
// }
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_TWO, "", "");
//
// isClickRunDownload = true;
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioDownload();
// }
// }
//
// @Override
// public void onAdClose() {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_THREE, "", "");
//
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdSuccess();
// }
// if (activity != null) {
// csjFullVedioAdPresenter.reportAddCoinMsg(activity, getAdMapVO(carrierType));
// }
//// csjFullVedioAdPresenter.reportAddCoinMsg(activity, AdParam.getAdMapVO(curCoin,extraId,Constant.ADTYPE_FULLSCREEN_VIDEO, Constant.AD_SOURCE_CSJ, carrierType, ""));
// }
//
// @Override
// public void onVideoComplete() {
// }
//
// @Override
// public void onSkippedVideo() {
//
// }
//
// });
// }
//
// @Override
// public void onFullScreenVideoCached() {
// if (mttFullVideoAd != null) {
// //step6:在获取到广告后展示
// mttFullVideoAd.showFullScreenVideoAd(activity);
// mttFullVideoAd = null;
// } else {
//// hideLoading();
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
//
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdFail();
// }
// }
// }
// });
// }
//
// @Override
// public void checkLYContextSuc(boolean lyCmtFlag) {
// if (!lyCmtFlag) {
//// hideLoading();
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdFail();
// }
// }
// }
//
// /**
// * 封装广告数据,请求服务器
// *
// * @param carrierType
// * @return
// */
// private HashMap<String, Object> getAdMapVO(String carrierType) {
// HashMap<String, Object> vo = new HashMap<>();
// vo.put("adsource", Constant.AD_SOURCE_CSJ);
// vo.put("carrierType", carrierType);
// vo.put("adtype", Constant.ADTYPE_VEDIO);
// // 全屏广告传入
// vo.put("detailAdtype", Constant.ADTYPE_FULLSCREEN_VIDEO);
//
// switch (carrierType) {
// case Constant.CARRIER_VERSUS_VIDEO:// 每日任务-视频
// vo.put("coin", curCoin);
// break;
// case Constant.CARRIER_DAILY_DOWNLOAD:// 每日任务-视频
// vo.put("coin", curCoin);
// break;
// case Constant.CARRIER_DAILY_VIDEO:// 观看视频-视频
// vo.put("coin", curCoin);
// break;
// case Constant.CARRIER_HOMEWATER:// 首页喝水汽泡
// vo.put("waterCoin", curCoin);
// break;
// case Constant.CARRIER_ONLINE_INCOME_DOUBLE:// 在线收益翻倍
// vo.put("online_income", curCoin);
// break;
// case Constant.CARRIER_OFFLINE_DOUBLE:// 离线收益翻倍
// vo.put("offline_income", curCoin);
// case Constant.CARRIER_SIGNIN_HOMEPAGE_CARD:// 签到翻倍
// break;
// case Constant.CARRIER_DRINK:// 喝水正常
// case Constant.CARRIER_DRINK_PATCH:// 喝水补卡
// vo.put("critId", extraId);
// break;
// case Constant.CARRIER_VERSUS_DRINKTEA://喝饮料
// vo.put("critId", extraId);
// break;
// case Constant.CARRIER_DAILY_TURN:// 首页大转盘
// vo.put("turntableKey", extraId);
// break;
// case Constant.CARRIER_CHALLENGE_TURN:// 挑战大转盘
// vo.put("turntableKey", extraId);
// break;
// case Constant.CARRIER_CHALLENGE_CARD:// 挑战刮刮乐
// vo.put("turntableKey", extraId);
// break;
// case Constant.CARRIER_REDENVELOPE_DOUBLE:// 红包翻倍奖励
// case Constant.CARRIER_REDENVELOPE:// 红包奖励
// vo.put("numKey", extraId);
// break;
// }
// return vo;
// }
//
// @Override
// public MintsApplication getBaseApplication() {
// return (MintsApplication) activity.getApplication();
// }
//
// /**
// * 显示加载进度条(自定义message)
// *
// * @param message
// */
// @Override
// public void showLoading(String message) {
// if (activity.getWindow() != null && !activity.isFinishing()) {
// if (progressDialog == null) {
// progressDialog = new LoadingDialog(activity);
// progressDialog.setLoadText(message);
// }
//
// progressDialog.show();
// setProgressOnTouchOutside(false);
// setProgressNoDismiss();
// }
// }
//
// /**
// * 设置Progress是否手触消失
// *
// * @param onTouchOutside
// */
// public void setProgressOnTouchOutside(boolean onTouchOutside) {
// if (progressDialog != null)
// progressDialog.setCanceledOnTouchOutside(onTouchOutside);
// }
//
// /**
// * 设置点击返回是否消失加载进度条
// */
// public final void setProgressNoDismiss() {
// if (progressDialog != null && progressDialog.isShowing()) {
// progressDialog.setOnKeyListener(new DialogInterface.OnKeyListener() {
//
// @Override
// public boolean onKey(DialogInterface dialog, int keyCode, KeyEvent event) {
// if (keyCode == KeyEvent.KEYCODE_BACK) {
// return true;
// }
// return false;
// }
// });
// }
// }
//
// /**
// * 消失加载进度条
// */
// @Override
// public void hideLoading() {
// try {
// if (activity.getWindow() != null && !activity.isFinishing()) {
// if (progressDialog != null && progressDialog.isShowing()) {
// progressDialog.dismiss();
// progressDialog = null;
// }
// }
// } catch (Exception e) {
// e.printStackTrace();
// } finally {
// progressDialog = null;
// }
// }
//
// @Override
// public void showToast(String msg) {
// if (!TextUtils.isEmpty(msg))
// ToastUtil.show(MintsApplication.getContext(), msg);
// }
//
// public void setCsjFullVedioAdListener(CsjFullVedioAdListener csjFullVedioAdListener) {
// this.csjFullVedioAdListener = csjFullVedioAdListener;
// }
//
// @Override
// public void checkSuc(boolean lyCmtFlag) {
//
// }
//
//
// public interface CsjFullVedioAdListener {
// void csjFullVedioAdFail();
//
// void csjFullVedioAdSuccess();
//
// void csjFullVedioDownload();
// }
//}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/banner/BannerAdmanager.kt
deleted
100644 → 0
View file @
3c4cd3a4
//package com.mints.highgold.ad.banner
//
//import android.app.Activity
//import android.view.View
//import com.lechuan.midunovel.view.FoxStreamerView
//import com.mints.highgold.common.AppConfig
//import com.mints.highgold.manager.TaAdManager
//import com.mints.highgold.manager.UserManager
//
//class BannerAdmanager {
// var activity: Activity? = null
// var fsvAward: FoxStreamerView? = null
//
// constructor(activity: Activity?) {
// this.activity = activity
// }
//
// /**
// * 展示banner
// *
// * @param carrierType
// * @param view 要展示的banner
// */
// fun showBannerAd(carrierType: String, view: View?) {
// if (UserManager.getInstance().adShowFlag) initBannerAd(carrierType, view)
// }
//
// /**
// * banner广告显示类型 0-推啊
// *
// * @param carrierType
// * @param view
// */
// private fun initBannerAd(carrierType: String, view: View?) {
//// if (AppConfig.bannerAdType == 0) loadTaBannerAd(carrierType, view)
// loadTaBannerAd(carrierType, view)
// }
//
// private fun loadTaBannerAd(carrierType: String, view: View?) {
// if (view != null) {
// if (view is FoxStreamerView) {
// fsvAward = view
// fsvAward?.loadAd(TaAdManager.TA_AD_AWARD_BANNER, UserManager.getInstance().userID)
// }
// }
// }
//
// fun ondestory() {
// fsvAward?.destroy()
// }
//}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/inscreen/InsertScreenAdManager.java
deleted
100644 → 0
View file @
3c4cd3a4
//package com.mints.goodmoney.ad.inscreen;
//
//import android.app.Activity;
//import android.os.Build;
//import android.text.TextUtils;
//import android.view.View;
//
//import com.bytedance.sdk.openadsdk.AdSlot;
//import com.bytedance.sdk.openadsdk.TTAdNative;
//import com.bytedance.sdk.openadsdk.TTNativeExpressAd;
//import com.lechuan.midunovel.view.FoxListener;
//import com.lechuan.midunovel.view.FoxTbScreen;
//import com.mints.highgold.ad.VedioAdingManager;
//import com.mints.highgold.common.AppConfig;
//import com.mints.highgold.common.Constant;
//import com.mints.highgold.manager.TTAdManagerHolder;
//import com.mints.highgold.manager.TaAdManager;
//import com.mints.highgold.manager.UserManager;
//import com.mints.highgold.manager.YlhAdManager;
//import com.mints.highgold.mvp.model.WeightBean;
//import com.mints.highgold.utils.LogUtil;
//import com.mints.highgold.utils.ToastUtil;
//import com.qq.e.ads.interstitial2.UnifiedInterstitialAD;
//import com.qq.e.ads.interstitial2.UnifiedInterstitialADListener;
//import com.qq.e.comm.util.AdError;
//
//import java.util.ArrayList;
//import java.util.List;
//import java.util.Random;
//
///**
// * 插屏广告
// */
//public class InsertScreenAdManager {
//
// private static final String TAG = VedioAdingManager.class.getSimpleName();
//
// private Activity activity;
// private ArrayList<WeightBean> weightList;
//
// // 穿山甲
// private TTAdNative mTTAdNative;
// private TTNativeExpressAd mTTAd;
//
// // 优量汇
// private UnifiedInterstitialAD iad;
//
// // 推啊
// private FoxTbScreen mTMItAd;
//
// public InsertScreenAdManager(Activity activity) {
// this.activity = activity;
// }
//
// public void showInsertScreenAd(String carrierType) {
// if (UserManager.getInstance().getAdShowFlag()) {
// if (!AppConfig.interactionAdFlag) {
// weightList = new ArrayList<>();
// AppConfig.interactionAdFlag = true;
// initInsertScreenAd(carrierType);
// }
// }
// }
//
// public void ondestory() {
// if (mTTAd != null) {
// mTTAd.destroy();
// }
// if (iad != null) {
// iad.destroy();
// }
// if (mTMItAd != null) {
// mTMItAd.destroy();
// }
// if (weightList != null) {
// weightList = null;
// }
// }
//
// /**
// * 插屏广告显示类型 0-穿山甲 1-优量汇 2-推啊
// *
// * @param carrierType
// */
// private void initInsertScreenAd(String carrierType) {
// String adType = getRandomWeight();
// if (TextUtils.isEmpty(adType)) {
// //推啊
// loadTaInteractionAd(carrierType);
// } else {
// if (TextUtils.equals(adType, Constant.CSJ_INSERTSCREEN_AD)) {
// //穿山甲
// loadCsjInteractionAd(carrierType);
// } else if (TextUtils.equals(adType, Constant.YLH_INSERTSCREEN_AD)) {
// //优量汇
// loadYlhInteractionAd(carrierType);
// } else {
// //推啊
// loadTaInteractionAd(carrierType);
// }
// }
//
//// if (AppConfig.interactionAdType == 0) {
//// //穿山甲
//// loadCsjInteractionAd(carrierType);
//// } else if (AppConfig.interactionAdType == 1) {
//// //优量汇
//// loadYlhInteractionAd(carrierType);
//// } else if (AppConfig.interactionAdType == 2) {
//// //推啊
//// loadTaInteractionAd(carrierType);
//// }
// }
//
// /**
// * 加载穿山甲插屏广告
// */
// public void loadCsjInteractionAd(String carrierType) {
// if (activity == null) return;
//
// String codeId = TTAdManagerHolder.TT_AD_INSERT_LOADING_ID_SMALLVEDIO;
// switch (carrierType) {
// case Constant.CARRIER_DRAWCASH:// 提现
// codeId = TTAdManagerHolder.TT_AD_INSERT_LOADING_ID_DRAWCASH;
// break;
// case Constant.CARRIER_YILANVEIDO_REDENVELOPE:// 小视频
// codeId = TTAdManagerHolder.TT_AD_INSERT_LOADING_ID_SMALLVEDIO;
// break;
// case Constant.CARRIER_REDENVELOPE:// 抢红包
// codeId = TTAdManagerHolder.TT_AD_INSERT_LOADING_ID_REDBOX;
// break;
// case Constant.CARRIER_FRIENDS:// 邀请好友
// codeId = TTAdManagerHolder.TT_AD_INSERT_LOADING_ID_FRIENDS;
// break;
// case Constant.CARRIER_GAME:// 游戏赚
// codeId = TTAdManagerHolder.TT_AD_INSERT_LOADING_ID_GAME;
// break;
// }
//
// //step4:创建广告请求参数AdSlot,具体参数含义参考文档
// AdSlot adSlot = new AdSlot.Builder()
// .setCodeId(codeId) //广告位id
// .setSupportDeepLink(true)
// .setAdCount(1) //请求广告数量为1到3条
// .setExpressViewAcceptedSize(300, 0) //期望模板广告view的size,单位dp
// .setImageAcceptedSize(600, 600)
// .build();
// //step5:请求广告,对请求回调的广告作渲染处理
// if (mTTAdNative == null) {
// mTTAdNative = TTAdManagerHolder.get().createAdNative(activity);
// }
// mTTAdNative.loadInteractionExpressAd(adSlot, new TTAdNative.NativeExpressAdListener() {
// @Override
// public void onError(int code, String message) {
// //当前播放完成换下一个类型 1-优量汇
//// AppConfig.interactionAdType = 1;
// setNextShowInteractionAd();
// }
//
// @Override
// public void onNativeExpressAdLoad(List<TTNativeExpressAd> ads) {
// if (ads == null || ads.size() == 0) {
// return;
// }
// mTTAd = ads.get(0);
// bindAdListener(mTTAd);
// mTTAd.render();
// }
// });
// }
//
// private void bindAdListener(TTNativeExpressAd ad) {
// if (activity == null) return;
// ad.setExpressInteractionListener(new TTNativeExpressAd.AdInteractionListener() {
// @Override
// public void onAdDismiss() {
// setNextShowInteractionAd();
// }
//
// @Override
// public void onAdClicked(View view, int type) {
// }
//
// @Override
// public void onAdShow(View view, int type) {
// //当前播放完成换下一个类型 1-优量汇
//// AppConfig.interactionAdType = 1;
//
//
// }
//
// @Override
// public void onRenderFail(View view, String msg, int code) {
// //当前播放完成换下一个类型 1-优量汇
//// AppConfig.interactionAdType = 1;
// setNextShowInteractionAd();
// }
//
// @Override
// public void onRenderSuccess(View view, float width, float height) {
// if (mTTAd != null && activity != null && !activity.isFinishing()) {
// //返回view的宽高 单位 dp
// mTTAd.showInteractionExpressAd(activity);
// }
// }
// });
// }
//
// /**
// * 加载优量汇插屏广告
// */
// public void loadYlhInteractionAd(String carrierType) {
// iad = getIAD(carrierType);
// if (iad != null && activity != null && !activity.isFinishing()) {
// iad.loadAD();
// }
// }
//
// private UnifiedInterstitialAD getIAD(String carrierType) {
// if (activity != null) {
// String posId = YlhAdManager.YLH_AD_INTERSTITIALAD_SMALLVEDIO;
// switch (carrierType) {
// case Constant.CARRIER_DRAWCASH:// 提现
// posId = YlhAdManager.YLH_AD_INTERSTITIALAD_DRAWCAH;
// break;
// case Constant.CARRIER_YILANVEIDO_REDENVELOPE:// 小视频
// posId = YlhAdManager.YLH_AD_INTERSTITIALAD_SMALLVEDIO;
// break;
// case Constant.CARRIER_REDENVELOPE:// 抢红包
// posId = YlhAdManager.YLH_AD_INTERSTITIALAD_REDBOX;
// break;
// case Constant.CARRIER_FRIENDS:// 邀请好友
// posId = YlhAdManager.YLH_AD_INTERSTITIALAD_FRIENDS;
// break;
// case Constant.CARRIER_GAME:// 游戏赚
// posId = YlhAdManager.YLH_AD_INTERSTITIALAD_GAME;
// break;
// }
// if (this.iad != null) {
// iad.close();
// iad.destroy();
// iad = null;
// }
//
// iad = new UnifiedInterstitialAD(activity, YlhAdManager.YLH_AD_VEDIO_APPID, posId, new UnifiedInterstitialADListener() {
// @Override
// public void onADReceive() {
// //当前优量汇播放完成换下一个类型
//// AppConfig.interactionAdType = 2;
// showAD();
// }
//
// @Override
// public void onVideoCached() {
// }
//
// @Override
// public void onNoAD(AdError adError) {
//// AppConfig.interactionAdType = 2;
// setNextShowInteractionAd();
// }
//
// @Override
// public void onADOpened() {
// }
//
// @Override
// public void onADExposure() {
//
// }
//
// @Override
// public void onADClicked() {
//
// }
//
// @Override
// public void onADLeftApplication() {
//
// }
//
// @Override
// public void onADClosed() {
// setNextShowInteractionAd();
// }
// });
// }
// return iad;
// }
//
// private void showAD() {
// if (iad != null && activity != null && !activity.isFinishing()) {
// iad.show();
// }
// }
//
// /**
// * 加载推啊插屏广告
// *
// * @param carrierType
// */
// private void loadTaInteractionAd(String carrierType) {
// if (activity == null) return;
//
// int codeId = TaAdManager.TA_AD_INTERSTITIALAD_SMALLVEDIO;
// switch (carrierType) {
// case Constant.CARRIER_DRAWCASH:// 提现
// codeId = TaAdManager.TA_AD_INTERSTITIALAD_DRAWCAH;
// break;
// case Constant.CARRIER_YILANVEIDO_REDENVELOPE:// 小视频
// codeId = TaAdManager.TA_AD_INTERSTITIALAD_SMALLVEDIO;
// break;
// case Constant.CARRIER_REDENVELOPE:// 抢红包
// codeId = TaAdManager.TA_AD_INTERSTITIALAD_REDBOX;
// break;
// case Constant.CARRIER_FRIENDS:// 邀请好友
// codeId = TaAdManager.TA_AD_INTERSTITIALAD_FRIENDS;
// break;
// case Constant.CARRIER_GAME:// 游戏赚
// codeId = TaAdManager.TA_AD_INTERSTITIALAD_GAME;
// break;
// }
//
// if (mTMItAd == null) {
// mTMItAd = new FoxTbScreen(activity);
// }
// if (activity != null && !activity.isFinishing()) {
// mTMItAd.setAdListener(new FoxListener() {
// @Override
// public void onReceiveAd() {
//// AppConfig.interactionAdType = 0;
// }
//
// @Override
// public void onFailedToReceiveAd() {
// setNextShowInteractionAd();
//// AppConfig.interactionAdType = 0;
// LogUtil.d(TAG, "tuia onFailedToReceiveAd");
// }
//
// @Override
// public void onLoadFailed() {
// setNextShowInteractionAd();
//// AppConfig.interactionAdType = 0;
// LogUtil.d(TAG, "tuia onLoadFailed");
//
// }
//
// @Override
// public void onCloseClick() {
// setNextShowInteractionAd();
// }
//
// @Override
// public void onAdClick() {
// }
//
// @Override
// public void onAdExposure() {
// }
//
// @Override
// public void onAdActivityClose(String s) {
// setNextShowInteractionAd();
// }
// });
// mTMItAd.loadAd(codeId, UserManager.getInstance().getUserID());
// }
// }
//
// /**
// * 设置插屏下次可以展示
// * <p>
// * false-下次显示
// */
// public void setNextShowInteractionAd() {
// AppConfig.interactionAdFlag = false;
// }
//
// /**
// * 根据权重获取广告类型
// *
// * @return
// */
// private String getRandomWeight() {
// if (weightList != null) {
// weightList.clear();
// }
// int weight = 0;
//
// if (AppConfig.interactionTuiaWeight > 0) {
// weightList.add(new WeightBean(AppConfig.interactionTuiaWeight, Constant.TUIA_INSERTSCREEN_AD));
// weight = weight + AppConfig.interactionTuiaWeight;
// LogUtil.d(TAG, "权重值:interactionTuiaWeight:" + AppConfig.interactionTuiaWeight);
// }
//
// if (AppConfig.interactionCsjWeight > 0) {
// weightList.add(new WeightBean(AppConfig.interactionCsjWeight, Constant.CSJ_INSERTSCREEN_AD));
// weight = weight + AppConfig.interactionCsjWeight;
// LogUtil.d(TAG, "权重值:interactionCsjWeight:" + AppConfig.interactionCsjWeight);
// }
//
// if (AppConfig.interactionYlhWeight > 0) {
// weightList.add(new WeightBean(AppConfig.interactionYlhWeight, Constant.YLH_INSERTSCREEN_AD));
// weight = weight + AppConfig.interactionYlhWeight;
// LogUtil.d(TAG, "权重值:interactionYlhWeight:" + AppConfig.interactionYlhWeight);
// }
//
// // 权重随机
// if (weightList != null && weightList.size() > 0 && weight > 0) {
// LogUtil.d(TAG, "1、权重总值:" + weight);
// Random r = new Random();
// int randomWeight = r.nextInt(weight) + 1;
// LogUtil.d(TAG, "2、权重随机值:" + randomWeight);
//
//// ToastUtil.showLong(activity,"插屏权重随机值:" + randomWeight);
//
// for (WeightBean weightBean : weightList) {
// randomWeight -= weightBean.getWeight();
// if (randomWeight <= 0) {
// LogUtil.d(TAG, "3、权重结果:" + weightBean.getType());
// return weightBean.getType();
// }
// }
// }
// return "";
// }
//}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/inscreenvedio/MintegralInscreenVedioAdManager.java
deleted
100644 → 0
View file @
3c4cd3a4
//package com.mints.goodmoney.ad.inscreenvedio;
//
//import android.app.Activity;
//import android.content.IntentFilter;
//import android.net.ConnectivityManager;
//
//import com.bytedance.sdk.openadsdk.AdSlot;
//import com.bytedance.sdk.openadsdk.TTAdConstant;
//import com.bytedance.sdk.openadsdk.TTAdNative;
//import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
//import com.mintegral.msdk.interstitialvideo.out.InterstitialVideoListener;
//import com.mintegral.msdk.interstitialvideo.out.MTGInterstitialVideoHandler;
//import com.mintegral.msdk.videocommon.download.NetStateOnReceive;
//import com.mints.highgold.MintsApplication;
//import com.mints.highgold.common.AppConfig;
//import com.mints.highgold.manager.MintegralManager;
//import com.mints.highgold.manager.TTAdManagerHolder;
//import com.mints.highgold.manager.TTNativeExpressManager;
//import com.mints.highgold.utils.LogUtil;
//
///**
// * Mintegral插屏视频
// */
//public class MintegralInscreenVedioAdManager {
//
// private static final String TAG = MintegralInscreenVedioAdManager.class.getSimpleName();
//
// private static MintegralInscreenVedioAdManager _inst;
// private Activity activity;
//
// private MTGInterstitialVideoHandler mMtgInterstitalVideoHandler;
// private NetStateOnReceive mNetStateOnReceive;
// private String mRewardUnitId = MintegralManager.MINTEGRAL_AD_INSCREEN_VEDIO_POP_DRINK;
//
// private TTAdNative ttAdNative;
// private TTFullScreenVideoAd mttFullVideoAd;
//
// public static MintegralInscreenVedioAdManager getInstance(Activity activity) {
// if (_inst != null) {
// return _inst;
// } else {
// _inst = new MintegralInscreenVedioAdManager(activity);
// return _inst;
// }
// }
//
// private MintegralInscreenVedioAdManager(Activity activity) {
// init(activity);
// return;
// }
//
// private void init(Activity activity) {
// this.activity = activity;
//
// initHandler();
// }
//
// public void loadMintegralInscreen() {
// if (mMtgInterstitalVideoHandler != null) {
// mMtgInterstitalVideoHandler.load();
// }
// }
//
// public void showMintegralInscreen() {
// if (mMtgInterstitalVideoHandler != null && mMtgInterstitalVideoHandler.isReady()) {
// mMtgInterstitalVideoHandler.show();
// } else {
// AppConfig.isMintegralInscreenFlag = false;
// loadCsjFullAd();
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadFail noReady:");
// }
// }
//
// private void initHandler() {
// if (activity == null) return;
//
// try {
// if (mNetStateOnReceive == null) {
// mNetStateOnReceive = new NetStateOnReceive();
// IntentFilter filter = new IntentFilter();
// filter.addAction(ConnectivityManager.CONNECTIVITY_ACTION);
// activity.registerReceiver(mNetStateOnReceive, filter);
// }
//
// mMtgInterstitalVideoHandler = new MTGInterstitialVideoHandler(activity, mRewardUnitId);
// mMtgInterstitalVideoHandler.setInterstitialVideoListener(new InterstitialVideoListener() {
// @Override
// public void onLoadSuccess(String unitId) {
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onLoadSuccess");
// AppConfig.isMintegralInscreenFlag = true;
//
// }
//
// @Override
// public void onVideoLoadSuccess(String unitId) {
// AppConfig.isMintegralInscreenFlag = true;
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadSuccess");
// }
//
// @Override
// public void onVideoLoadFail(String errorMsg) {
// AppConfig.isMintegralInscreenFlag = false;
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadFail errorMsg:" + errorMsg);
// }
//
// @Override
// public void onShowFail(String errorMsg) {
// AppConfig.isMintegralInscreenFlag = false;
// LogUtil.d(TAG, "MintegralInscreenVedioAdManager onShowFail errorMsg:" + errorMsg);
// }
//
// @Override
// public void onAdShow() {
// }
//
// @Override
// public void onAdClose(boolean isCompleteView) {
// AppConfig.isMintegralInscreenFlag = false;
// }
//
// @Override
// public void onVideoAdClicked(String unitId) {
// }
//
// @Override
// public void onVideoComplete(String unitId) {
// }
//
// @Override
// public void onEndcardShow(String unitId) {
// }
//
// });
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//
// public void destory() {
// try {
// if (mNetStateOnReceive != null) {
// activity.unregisterReceiver(mNetStateOnReceive);
// }
// if (mMtgInterstitalVideoHandler != null) {
// mMtgInterstitalVideoHandler.setInterstitialVideoListener(null);
// }
// } catch (Exception e) {
// e.printStackTrace();
// }
// }
//
// /**
// * 全屏广告
// */
// @SuppressWarnings("SameParameterValue")
// private void loadCsjFullAd() {
// ttAdNative = new TTNativeExpressManager().initTTAd(activity, false);
// String codeId = TTAdManagerHolder.TT_AD_ALLVEDIO_ID_DRINKTIME;
// AdSlot adSlot = new AdSlot.Builder()
// .setCodeId(codeId)
// .setSupportDeepLink(true)
// .setImageAcceptedSize(1080, 1920)
// .setOrientation(TTAdConstant.VERTICAL)
// .build();
// ttAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() {
// @Override
// public void onError(int code, String message) {
// }
//
// @Override
// public void onFullScreenVideoAdLoad(TTFullScreenVideoAd ad) {
// mttFullVideoAd = ad;
// }
//
// @Override
// public void onFullScreenVideoCached() {
// if (activity != null && !activity.isFinishing() && mttFullVideoAd != null) {
// //step6:在获取到广告后展示
// mttFullVideoAd.showFullScreenVideoAd(activity);
// mttFullVideoAd = null;
// }
// }
// });
// }
//}
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/CsjVedioAdManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
video/
CsjVedioAdManager.java
View file @
46e96719
package
com
.
mints
.
goodmoney
.
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
...
@@ -8,7 +8,6 @@ import android.view.KeyEvent;
...
@@ -8,7 +8,6 @@ import android.view.KeyEvent;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.AdSlot
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
import
com.bytedance.sdk.openadsdk.TTAdConstant
;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
import
com.bytedance.sdk.openadsdk.TTAdNative
;
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.MintsApplication
;
import
com.mints.goodmoney.MintsApplication
;
...
@@ -146,6 +145,7 @@ public class CsjVedioAdManager implements VedioAdManagerView {
...
@@ -146,6 +145,7 @@ public class CsjVedioAdManager implements VedioAdManagerView {
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_CSJ
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
code
),
message
);
LogUtil
.
d
(
"CsjVedioAdManager"
,
"onError "
+
code
+
message
);
if
(
csjVedioAdListener
!=
null
)
{
if
(
csjVedioAdListener
!=
null
)
{
csjVedioAdListener
.
csjVedioAdFail
();
csjVedioAdListener
.
csjVedioAdFail
();
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/VedioAdingManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
video/
VedioAdingManager.java
View file @
46e96719
package
com
.
mints
.
goodmoney
.
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.os.Build
;
import
android.text.TextUtils
;
import
android.text.TextUtils
;
import
com.mints.goodmoney.common.AppConfig
;
import
com.mints.goodmoney.common.AppConfig
;
...
@@ -9,7 +8,6 @@ import com.mints.goodmoney.common.Constant;
...
@@ -9,7 +8,6 @@ import com.mints.goodmoney.common.Constant;
import
com.mints.goodmoney.mvp.model.VedioAdingBean
;
import
com.mints.goodmoney.mvp.model.VedioAdingBean
;
import
com.mints.goodmoney.mvp.model.WeightBean
;
import
com.mints.goodmoney.mvp.model.WeightBean
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
java.util.ArrayList
;
import
java.util.ArrayList
;
import
java.util.Random
;
import
java.util.Random
;
...
@@ -100,7 +98,7 @@ public class VedioAdingManager {
...
@@ -100,7 +98,7 @@ public class VedioAdingManager {
String
nextAdType
=
""
;
String
nextAdType
=
""
;
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
if
(
AppConfig
.
csjVedioAdCount
>
0
)
{
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
nextAdType
=
Constant
.
CSJ_VEDIO_AD
;
}
else
if
(
AppConfig
.
ylhAdCount
>
0
)
{
}
else
{
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
nextAdType
=
Constant
.
YLH_VEDIO_AD
;
}
}
return
nextAdType
;
return
nextAdType
;
...
@@ -224,11 +222,6 @@ public class VedioAdingManager {
...
@@ -224,11 +222,6 @@ public class VedioAdingManager {
*/
*/
private
void
loadAdVedio
(
String
vedioAdType
,
VedioAdingBean
bean
)
{
private
void
loadAdVedio
(
String
vedioAdType
,
VedioAdingBean
bean
)
{
try
{
try
{
if
(
TextUtils
.
isEmpty
(
vedioAdType
))
{
ToastUtil
.
show
(
activity
,
"今日视频已看完,请明天再来吧"
);
return
;
}
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
YLH_VEDIO_AD
))
{
if
(
TextUtils
.
equals
(
vedioAdType
,
Constant
.
YLH_VEDIO_AD
))
{
// 优量汇
// 优量汇
if
(
ylhVedioAdManager
==
null
)
{
if
(
ylhVedioAdManager
==
null
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/YlhVedioAdManager.java
→
GoodMoney/app/src/main/java/com/mints/goodmoney/ad/
video/
YlhVedioAdManager.java
View file @
46e96719
package
com
.
mints
.
goodmoney
.
ad
;
package
com
.
mints
.
goodmoney
.
ad
.
video
;
import
android.app.Activity
;
import
android.app.Activity
;
import
android.content.DialogInterface
;
import
android.content.DialogInterface
;
...
@@ -13,6 +13,7 @@ import com.mints.goodmoney.manager.YlhAdManager;
...
@@ -13,6 +13,7 @@ import com.mints.goodmoney.manager.YlhAdManager;
import
com.mints.goodmoney.mvp.presenters.YlhVedioAdPresenter
;
import
com.mints.goodmoney.mvp.presenters.YlhVedioAdPresenter
;
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
;
import
com.mints.goodmoney.mvp.views.VedioAdManagerView
;
import
com.mints.goodmoney.ui.widgets.LoadingDialog
;
import
com.mints.goodmoney.ui.widgets.LoadingDialog
;
import
com.mints.goodmoney.utils.LogUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
com.mints.goodmoney.utils.ToastUtil
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoAD
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
import
com.qq.e.ads.rewardvideo.RewardVideoADListener
;
...
@@ -74,7 +75,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
...
@@ -74,7 +75,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
/**
/**
* 加载优量汇激励视频
* 加载优量汇激励视频
*/
*/
public
void
loanYlhAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
public
void
loanYlhAd
(
Activity
activity
,
int
curCoin
,
String
carrierType
,
String
extraId
)
{
this
.
activity
=
activity
;
this
.
activity
=
activity
;
isClickScreen
=
true
;
isClickScreen
=
true
;
this
.
curCoin
=
curCoin
;
this
.
curCoin
=
curCoin
;
...
@@ -108,7 +109,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
...
@@ -108,7 +109,7 @@ public class YlhVedioAdManager implements VedioAdManagerView {
rewardVideoAD
=
null
;
rewardVideoAD
=
null
;
}
}
rewardVideoAD
=
new
RewardVideoAD
(
activity
,
YlhAdManager
.
YLH_AD_APPID
,
ylhPostId
,
new
RewardVideoADListener
()
{
rewardVideoAD
=
new
RewardVideoAD
(
activity
,
YlhAdManager
.
YLH_AD_APPID
,
ylhPostId
,
new
RewardVideoADListener
()
{
@Override
@Override
public
void
onADLoad
()
{
//广告加载成功,可在此回调后进行广告展示,此时广告过期时间确定,可通过RewardVideoAD.getExpireTimestamp()获取
public
void
onADLoad
()
{
//广告加载成功,可在此回调后进行广告展示,此时广告过期时间确定,可通过RewardVideoAD.getExpireTimestamp()获取
try
{
try
{
...
@@ -187,6 +188,9 @@ public class YlhVedioAdManager implements VedioAdManagerView {
...
@@ -187,6 +188,9 @@ public class YlhVedioAdManager implements VedioAdManagerView {
@Override
@Override
public
void
onError
(
AdError
adError
)
{
//广告流程出错,AdError中包含错误码和错误描述
public
void
onError
(
AdError
adError
)
{
//广告流程出错,AdError中包含错误码和错误描述
if
(
adError
!=
null
)
{
if
(
adError
!=
null
)
{
LogUtil
.
d
(
"YlhVedioAdManager"
,
"onError "
+
adError
.
getErrorCode
()
+
adError
.
getErrorMsg
());
// 0 成功 1失败 2点击 3-有效展示
// 0 成功 1失败 2点击 3-有效展示
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
adError
.
getErrorCode
()),
adError
.
getErrorMsg
());
TrackManager
.
getInstance
().
addCallImp
(
Constant
.
AD_SOURCE_YLH
,
Constant
.
EVENT_TYPE_ONE
,
String
.
valueOf
(
adError
.
getErrorCode
()),
adError
.
getErrorMsg
());
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
46e96719
...
@@ -97,7 +97,7 @@ object Constant {
...
@@ -97,7 +97,7 @@ object Constant {
const
val
CARRIER_WALK_BUBBLE
=
"WALK_BUBBLE"
//走路汽泡
const
val
CARRIER_WALK_BUBBLE
=
"WALK_BUBBLE"
//走路汽泡
const
val
CARRIER_NEW_USER
=
"CARRIER_NEW_USER"
//新用户红包
const
val
CARRIER_NEW_USER
=
"CARRIER_NEW_USER"
//新用户红包
const
val
CARRIER_GAME_ONLINE
=
"GAME_ONLINE"
//跳转猎豹
const
val
CARRIER_GAME_ONLINE
=
"GAME_ONLINE"
//跳转猎豹
const
val
CARRIER_ZHANGYUE
=
"ZHANGYUE"
//
跳转猎豹
const
val
CARRIER_ZHANGYUE
=
"ZHANGYUE"
//
阅读书城
const
val
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
=
"CHALLENGE_SHAREFRIEND_DOUBLE"
//邀请好友翻倍
const
val
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
=
"CHALLENGE_SHAREFRIEND_DOUBLE"
//邀请好友翻倍
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
const
val
SHAREFRIEND_COMPLETE_1
=
"SHAREFRIEND_COMPLETE_1"
//邀请任务1
...
@@ -151,4 +151,9 @@ object Constant {
...
@@ -151,4 +151,9 @@ object Constant {
var
SHARE_CONTENT
=
"邀请码【${UserManager.getInstance().codeID}】,共享新模式,快来加入跟我一起赚钱吧"
var
SHARE_CONTENT
=
"邀请码【${UserManager.getInstance().codeID}】,共享新模式,快来加入跟我一起赚钱吧"
var
SHARE_URL
:
String
=
BuildConfig
.
MainIp
+
"share/shareFriend.html?ruid="
+
UserManager
.
getInstance
().
getUserID
()
+
"&channel="
+
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
var
SHARE_URL
:
String
=
BuildConfig
.
MainIp
+
"share/shareFriend.html?ruid="
+
UserManager
.
getInstance
().
getUserID
()
+
"&channel="
+
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
// 首页视频时长 单位-秒
const
val
MAIN_VEDIO_TIME
=
"main_vedio_time"
// 首页视频时长 单位-秒
const
val
CHANNEL_SHARE
=
"share_goodmoney"
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
View file @
46e96719
...
@@ -46,4 +46,7 @@ object BxmManager {
...
@@ -46,4 +46,7 @@ object BxmManager {
bdAdvanceButtonAd
?.
loadAd
()
bdAdvanceButtonAd
?.
loadAd
()
}
}
fun
onDestory
()
{
bdAdvanceButtonAd
=
null
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/LiebaoManager.java
View file @
46e96719
...
@@ -79,7 +79,7 @@ public class LiebaoManager {
...
@@ -79,7 +79,7 @@ public class LiebaoManager {
// 设置游戏的广告id
// 设置游戏的广告id
CmGameAppInfo
.
TTInfo
ttInfo
=
new
CmGameAppInfo
.
TTInfo
();
CmGameAppInfo
.
TTInfo
ttInfo
=
new
CmGameAppInfo
.
TTInfo
();
// 游戏内广告有如下6种;
// 游戏内广告有如下6种;
//
ttInfo.setGameLoad_EXADId(TtCsjAdManager.TT_AD_INSERT_LOADING_ID_LIEBAO); // 游戏加载时,插屏广告1:1,模板渲染
ttInfo
.
setGameLoad_EXADId
(
TtCsjAdManager
.
TT_AD_INSERT_LOADING_ID_LIEBAO
);
// 游戏加载时,插屏广告1:1,模板渲染
ttInfo
.
setRewardVideoId
(
TtCsjAdManager
.
TT_AD_VEDIO_GAME
);
// 激励视频
ttInfo
.
setRewardVideoId
(
TtCsjAdManager
.
TT_AD_VEDIO_GAME
);
// 激励视频
ttInfo
.
setFullVideoId
(
TtCsjAdManager
.
TT_AD_ALLVEDIO_ID_LIEBAO
);
// 全屏视频,插屏场景下展示
ttInfo
.
setFullVideoId
(
TtCsjAdManager
.
TT_AD_ALLVEDIO_ID_LIEBAO
);
// 全屏视频,插屏场景下展示
// ttInfo.setExpressInteractionId(TtCsjAdManager.TT_AD_INSERT_ID_LIEBAO); // 插屏广告,插屏场景下展示,模板渲染,2:3
// ttInfo.setExpressInteractionId(TtCsjAdManager.TT_AD_INSERT_ID_LIEBAO); // 插屏广告,插屏场景下展示,模板渲染,2:3
...
@@ -96,9 +96,9 @@ public class LiebaoManager {
...
@@ -96,9 +96,9 @@ public class LiebaoManager {
gdtAdInfo
.
setAppId
(
YlhAdManager
.
YLH_AD_APPID
);
// 广点通的APPID
gdtAdInfo
.
setAppId
(
YlhAdManager
.
YLH_AD_APPID
);
// 广点通的APPID
// 游戏内广告场景;
// 游戏内广告场景;
gdtAdInfo
.
setRewardVideoId
(
YlhAdManager
.
YLH_AD_VEDIO_GAME_POSTID
);
// 激励视频
gdtAdInfo
.
setRewardVideoId
(
YlhAdManager
.
YLH_AD_VEDIO_GAME_POSTID
);
// 激励视频
//
gdtAdInfo.setGameLoadInterId(YlhAdManager.YLH_AD_INTERSTITIALAD_LIEBAO);//游戏加载中的插屏
gdtAdInfo
.
setGameLoadInterId
(
YlhAdManager
.
YLH_AD_INTERSTITIALAD_LIEBAO
);
//游戏加载中的插屏
// gdtAdInfo.setBannerId(YlhAdManager.YLH_AD_BANNER_LIEBAO); // banner广告
// gdtAdInfo.setBannerId(YlhAdManager.YLH_AD_BANNER_LIEBAO); // banner广告
//
gdtAdInfo.setPlayGameInterId(YlhAdManager.YLH_AD_INTERSTITIALAD_LIEBAO);//游戏进行中关卡插屏
gdtAdInfo
.
setPlayGameInterId
(
YlhAdManager
.
YLH_AD_INTERSTITIALAD_LIEBAO
);
//游戏进行中关卡插屏
cmGameAppInfo
.
setGdtAdInfo
(
gdtAdInfo
);
cmGameAppInfo
.
setGdtAdInfo
(
gdtAdInfo
);
//
//
...
@@ -113,7 +113,7 @@ public class LiebaoManager {
...
@@ -113,7 +113,7 @@ public class LiebaoManager {
// // 戏关卡间插屏广告概率设置建议,代码默认值为20
// // 戏关卡间插屏广告概率设置建议,代码默认值为20
// // 1)80%流量给穿山甲,20%给优量汇,原因:穿山甲全屏视频广告收益更高,优量汇收益低但体验 好
// // 1)80%流量给穿山甲,20%给优量汇,原因:穿山甲全屏视频广告收益更高,优量汇收益低但体验 好
// // 2)概率云端控制,媒体自行下发2种广告源占比
// // 2)概率云端控制,媒体自行下发2种广告源占比
// cmGameAppInfo.setExpressInterAdProbability(2
0);
cmGameAppInfo
.
setExpressInterAdProbability
(
6
0
);
// 功能默认开启,可使用如下方法来关闭
// 功能默认开启,可使用如下方法来关闭
// cmGameAppInfo.setShowLogin(false);
// cmGameAppInfo.setShowLogin(false);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/MiitHelper.java
View file @
46e96719
...
@@ -25,7 +25,7 @@ public class MiitHelper implements IIdentifierListener {
...
@@ -25,7 +25,7 @@ public class MiitHelper implements IIdentifierListener {
}
}
public
void
ge
tDeviceIds
(
Context
cxt
)
{
public
void
ini
tDeviceIds
(
Context
cxt
)
{
long
timeb
=
System
.
currentTimeMillis
();
long
timeb
=
System
.
currentTimeMillis
();
int
nres
=
CallFromReflect
(
cxt
);
int
nres
=
CallFromReflect
(
cxt
);
// int nres=DirectCall(cxt);
// int nres=DirectCall(cxt);
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TrackManager.java
View file @
46e96719
...
@@ -40,6 +40,7 @@ public class TrackManager {
...
@@ -40,6 +40,7 @@ public class TrackManager {
*/
*/
public
void
offline
()
{
public
void
offline
()
{
if
(
trackPresenter
!=
null
&&
if
(
trackPresenter
!=
null
&&
UserManager
.
getInstance
().
userIsLogin
()
&&
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getTokenID
()))
{
!
TextUtils
.
isEmpty
(
UserManager
.
getInstance
().
getTokenID
()))
{
trackPresenter
.
offline
();
trackPresenter
.
offline
();
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/TtCsjAdManager.java
View file @
46e96719
...
@@ -35,8 +35,7 @@ public class TtCsjAdManager {
...
@@ -35,8 +35,7 @@ public class TtCsjAdManager {
public
static
final
String
TT_AD_ALLVEDIO_ID_LIEBAO
=
"945562481"
;
//猎豹全屏带跳过按钮
public
static
final
String
TT_AD_ALLVEDIO_ID_LIEBAO
=
"945562481"
;
//猎豹全屏带跳过按钮
/*插屏广告*/
/*插屏广告*/
public
static
final
String
TT_AD_INSERT_ID_LIEBAO
=
""
;
//猎豹插屏场景
public
static
final
String
TT_AD_INSERT_LOADING_ID_LIEBAO
=
"945608874"
;
//猎豹游戏加载时
public
static
final
String
TT_AD_INSERT_LOADING_ID_LIEBAO
=
""
;
//猎豹游戏加载时
private
static
boolean
sInit
;
private
static
boolean
sInit
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/YlhAdManager.kt
View file @
46e96719
...
@@ -18,7 +18,7 @@ object YlhAdManager {
...
@@ -18,7 +18,7 @@ object YlhAdManager {
/* vedio-postid */
/* vedio-postid */
const
val
YLH_AD_VEDIO_DRINK_POSTID
=
"
5071107856089058
"
//喝水打卡
const
val
YLH_AD_VEDIO_DRINK_POSTID
=
"
2041542191534951
"
//喝水打卡
const
val
YLH_AD_VEDIO_MAIN_POSTID
=
"3091434802115910"
//我的界面视频
const
val
YLH_AD_VEDIO_MAIN_POSTID
=
"3091434802115910"
//我的界面视频
const
val
YLH_AD_VEDIO_ERASE_POSTID
=
"4061637892217932"
//挑战刮刮乐
const
val
YLH_AD_VEDIO_ERASE_POSTID
=
"4061637892217932"
//挑战刮刮乐
const
val
YLH_AD_VEDIO_TURNABLE_POSTID
=
"5021539812411906"
//大转盘
const
val
YLH_AD_VEDIO_TURNABLE_POSTID
=
"5021539812411906"
//大转盘
...
@@ -27,7 +27,7 @@ object YlhAdManager {
...
@@ -27,7 +27,7 @@ object YlhAdManager {
/* 插屏 */
/* 插屏 */
const
val
YLH_AD_INTERSTITIALAD_LIEBAO
=
""
//猎豹
const
val
YLH_AD_INTERSTITIALAD_LIEBAO
=
"
5031044115480084
"
//猎豹
/**
/**
* 广告初始化
* 广告初始化
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/DrawcashBean.java
View file @
46e96719
...
@@ -7,6 +7,8 @@ public class DrawcashBean implements Serializable {
...
@@ -7,6 +7,8 @@ public class DrawcashBean implements Serializable {
private
String
openid
;
private
String
openid
;
private
String
nickName
;
private
String
nickName
;
private
String
drawcashRule
;
private
String
drawcashHint
;
private
int
coin
;
private
int
coin
;
private
List
<
CashOutMoneyArrBean
>
cashOutMoneyArr
;
private
List
<
CashOutMoneyArrBean
>
cashOutMoneyArr
;
...
@@ -26,6 +28,22 @@ public class DrawcashBean implements Serializable {
...
@@ -26,6 +28,22 @@ public class DrawcashBean implements Serializable {
this
.
nickName
=
nickName
;
this
.
nickName
=
nickName
;
}
}
public
String
getDrawcashRule
()
{
return
drawcashRule
;
}
public
void
setDrawcashRule
(
String
drawcashRule
)
{
this
.
drawcashRule
=
drawcashRule
;
}
public
String
getDrawcashHint
()
{
return
drawcashHint
;
}
public
void
setDrawcashHint
(
String
drawcashHint
)
{
this
.
drawcashHint
=
drawcashHint
;
}
public
int
getCoin
()
{
public
int
getCoin
()
{
return
coin
;
return
coin
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
46e96719
...
@@ -249,4 +249,28 @@ class MyPresenter : BasePresenter<MyView>() {
...
@@ -249,4 +249,28 @@ class MyPresenter : BasePresenter<MyView>() {
}
}
fun
getHallBaseMsg
()
{
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
getHallBaseMsg
(),
object
:
BaseSubscriber
<
BaseResponse
<
UserTaskMsgBean
>>()
{
override
fun
onCompleted
()
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onError
(
e
:
Throwable
)
{
if
(
isLinkView
)
return
view
.
hideLoading
()
}
override
fun
onNext
(
baseResponse
:
BaseResponse
<
UserTaskMsgBean
>)
{
if
(
isLinkView
)
return
val
code
=
baseResponse
.
getStatus
()
when
(
code
)
{
200
->
view
.
getHallBaseMsgSuc
(
baseResponse
.
getData
())
}
}
})
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/views/MyView.kt
View file @
46e96719
...
@@ -3,6 +3,7 @@ package com.mints.goodmoney.mvp.views
...
@@ -3,6 +3,7 @@ package com.mints.goodmoney.mvp.views
import
com.mints.goodmoney.mvp.model.BannerBean
import
com.mints.goodmoney.mvp.model.BannerBean
import
com.mints.goodmoney.mvp.model.MyInfo
import
com.mints.goodmoney.mvp.model.MyInfo
import
com.mints.goodmoney.mvp.model.SignCardBean
import
com.mints.goodmoney.mvp.model.SignCardBean
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
interface
MyView
:
BaseView
{
interface
MyView
:
BaseView
{
...
@@ -32,4 +33,6 @@ interface MyView : BaseView {
...
@@ -32,4 +33,6 @@ interface MyView : BaseView {
* 游客登录成功
* 游客登录成功
*/
*/
fun
userLoginSuc
()
fun
userLoginSuc
()
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
46e96719
...
@@ -4,10 +4,9 @@ import android.os.Bundle
...
@@ -4,10 +4,9 @@ import android.os.Bundle
import
android.view.KeyEvent
import
android.view.KeyEvent
import
android.view.View
import
android.view.View
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.manager.TTPreLoadExpressManager
import
com.mints.goodmoney.manager.TTPreLoadExpressManager
import
com.mints.goodmoney.mvp.model.UserTaskMsgBean
import
com.mints.goodmoney.mvp.model.VedioAdingBean
import
com.mints.goodmoney.mvp.model.VedioAdingBean
import
com.mints.goodmoney.mvp.presenters.AwardPresenter
import
com.mints.goodmoney.mvp.presenters.AwardPresenter
import
com.mints.goodmoney.mvp.views.AwardView
import
com.mints.goodmoney.mvp.views.AwardView
...
@@ -67,6 +66,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -67,6 +66,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
startTime
()
startTime
()
when
(
carrierType
)
{
when
(
carrierType
)
{
Constant
.
CHALLENGE_SHAREFRIEND
,
Constant
.
SHAREFRIEND_COMPLETE_1
,
Constant
.
SHAREFRIEND_COMPLETE_2
,
Constant
.
SHAREFRIEND_COMPLETE_1
,
Constant
.
SHAREFRIEND_COMPLETE_2
,
Constant
.
SHAREFRIEND_COMPLETE_3
,
Constant
.
SHAREFRIEND_COMPLETE_4
,
Constant
.
SHAREFRIEND_COMPLETE_3
,
Constant
.
SHAREFRIEND_COMPLETE_4
,
Constant
.
SHAREFRIEND_COMPLETE_5
,
Constant
.
SHAREFRIEND_COMPLETE_6
,
Constant
.
SHAREFRIEND_COMPLETE_5
,
Constant
.
SHAREFRIEND_COMPLETE_6
,
...
@@ -78,16 +78,16 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -78,16 +78,16 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
tvAwardNext
.
setText
(
"我知道了"
)
tvAwardNext
.
setText
(
"我知道了"
)
}
}
Constant
.
CHALLENGE_SHAREFRIEND
->
{
//
Constant.CHALLENGE_SHAREFRIEND -> {
val
vo
=
HashMap
<
String
,
Any
>()
//
val vo = HashMap<String, Any>()
vo
[
"carrierType"
]
=
carrierType
//
vo["carrierType"] = carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
//
awardPresenter.reportAddCoinMsg(vo)
//
tvAwardContent
.
setText
(
curCoin
.
toString
()
+
"金币已到账"
)
//
tvAwardContent.setText(curCoin.toString() + "金币已到账")
tvAwardNext
.
setText
(
"金币翻倍"
)
//
tvAwardNext.setText("金币翻倍")
//
carrierType
=
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
//
carrierType = Constant.CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
}
//
}
Constant
.
CARRIER_NEW_USER
->
{
Constant
.
CARRIER_NEW_USER
->
{
tvAwardContent
.
setText
(
"新人红包"
)
tvAwardContent
.
setText
(
"新人红包"
)
tvAwardNext
.
setText
(
"我知道了"
)
tvAwardNext
.
setText
(
"我知道了"
)
...
@@ -96,6 +96,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -96,6 +96,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
}
}
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
Constant
.
CARRIER_OFFLINE_DOUBLE
->
{
tvAwardContent
.
setText
(
"离线收益奖励"
+
curCoin
+
"金币"
)
tvAwardContent
.
setText
(
"离线收益奖励"
+
curCoin
+
"金币"
)
tvAwardNext
.
setText
(
"金币翻倍"
)
}
}
Constant
.
CARRIER_ZHANGYUE
->
{
Constant
.
CARRIER_ZHANGYUE
->
{
tvAwardContent
.
setText
(
"阅读奖励"
+
curCoin
+
"金币"
)
tvAwardContent
.
setText
(
"阅读奖励"
+
curCoin
+
"金币"
)
...
@@ -172,9 +173,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -172,9 +173,8 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
// 只有看视频才能领金币
// 只有看视频才能领金币
Constant
.
CARRIER_OFFLINE_DOUBLE
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
,
Constant
.
CARRIER_OFFLINE_DOUBLE
,
Constant
.
CARRIER_SIGNIN_HOMEPAGE_CARD
,
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_CHALLENGE_TURN
,
Constant
.
CARRIER_CHALLENGE_CARD
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_WALK_BUBBLE
,
Constant
.
CARRIER_HOMEVEDIO_BIG
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
,
Constant
.
CARRIER_WALK
,
Constant
.
CARRIER_HOMEWATER
->
{
Constant
.
CARRIER_CHALLENGE_SHAREFRIEND_DOUBLE
,
Constant
.
CARRIER_HOMEVEDIO_BIG
->
{
awardVedio
()
awardVedio
()
}
}
else
->
{
else
->
{
...
@@ -297,8 +297,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
...
@@ -297,8 +297,6 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
/**
/**
* 广告返回结果
* 广告返回结果
*
* @param adType CHUANGSHEN_VEDIO_AD HYTECH_VEDIO_AD 自有界面
*/
*/
private
fun
vedioAdingSuccess
(
adType
:
String
)
{
private
fun
vedioAdingSuccess
(
adType
:
String
)
{
setAdFinshLayout
()
setAdFinshLayout
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/DrawcashActivity.kt
View file @
46e96719
...
@@ -58,7 +58,7 @@ class DrawcashActivity : BaseActivity(),
...
@@ -58,7 +58,7 @@ class DrawcashActivity : BaseActivity(),
view_title
.
text
=
"提现规则"
view_title
.
text
=
"提现规则"
drawcashPresenter
.
attachView
(
this
)
drawcashPresenter
.
attachView
(
this
)
initText
()
//
initText()
initListener
()
initListener
()
}
}
...
@@ -135,7 +135,7 @@ class DrawcashActivity : BaseActivity(),
...
@@ -135,7 +135,7 @@ class DrawcashActivity : BaseActivity(),
return
return
}
}
drawcashPresenter
.
saveTerminalInfo
(
priceList
!!
[
drawcashAdapter
?.
getPosition
()].
money
)
drawcashPresenter
.
saveTerminalInfo
(
priceList
!!
[
drawcashAdapter
?.
getPosition
()].
money
)
}
}
}
}
}
}
...
@@ -144,6 +144,8 @@ class DrawcashActivity : BaseActivity(),
...
@@ -144,6 +144,8 @@ class DrawcashActivity : BaseActivity(),
override
fun
getUserTaskMsgSuc
(
data
:
DrawcashBean
)
{
override
fun
getUserTaskMsgSuc
(
data
:
DrawcashBean
)
{
userConfig
=
data
userConfig
=
data
tvDrawcashExplain
.
text
=
data
.
drawcashRule
tvDrawcashHint
.
text
=
data
.
drawcashHint
tvDrawcashGold
.
text
=
"${data.getCoin()}"
tvDrawcashGold
.
text
=
"${data.getCoin()}"
if
(
TextUtils
.
isEmpty
(
data
.
openid
))
{
if
(
TextUtils
.
isEmpty
(
data
.
openid
))
{
tvDrawcashWx
.
setText
(
"去授权"
)
tvDrawcashWx
.
setText
(
"去授权"
)
...
@@ -202,12 +204,11 @@ class DrawcashActivity : BaseActivity(),
...
@@ -202,12 +204,11 @@ class DrawcashActivity : BaseActivity(),
.
append
(
"4、提现申请将在3-5个工作日审核到账,请耐心等待。"
)
.
append
(
"4、提现申请将在3-5个工作日审核到账,请耐心等待。"
)
.
append
(
"\n"
)
.
append
(
"\n"
)
.
append
(
"5、每日可申请提现一次,若当日限额已满,请次日申请。"
)
.
append
(
"5、每日可申请提现一次,若当日限额已满,请次日申请。"
)
.
append
(
"\n"
)
.
append
(
"6、"
+
0.3
+
"元-"
+
50
+
"元,是新人专享福利,每个账号仅可享受一次。"
)
.
create
())
.
create
())
tvDrawcashHint
.
text
=
"* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。"
+
tvDrawcashHint
.
text
=
"* 如您或好友通过刷机等违规操作获取非法收益,平台将视情况扣除违规所得或冻结账号。"
+
"\n* 最终解释权归本公司所有。"
"\n* 最终解释权归本公司所有。"
}
}
private
fun
initRvView
()
{
private
fun
initRvView
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/EraseActivity.kt
View file @
46e96719
...
@@ -2,7 +2,6 @@ package com.mints.goodmoney.ui.activitys
...
@@ -2,7 +2,6 @@ package com.mints.goodmoney.ui.activitys
import
android.os.Bundle
import
android.os.Bundle
import
android.view.KeyEvent
import
android.view.KeyEvent
import
android.view.MotionEvent
import
android.view.View
import
android.view.View
import
android.view.View.OnLongClickListener
import
android.view.View.OnLongClickListener
import
android.view.ViewGroup
import
android.view.ViewGroup
...
@@ -18,7 +17,6 @@ import com.mints.goodmoney.mvp.model.TurntableBean
...
@@ -18,7 +17,6 @@ import com.mints.goodmoney.mvp.model.TurntableBean
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.json.JsonUtil
import
kotlinx.android.synthetic.main.activity_erase.*
import
kotlinx.android.synthetic.main.activity_erase.*
import
kotlinx.android.synthetic.main.fragment_main_pan.*
import
kotlinx.android.synthetic.main.header_layout.*
import
kotlinx.android.synthetic.main.header_layout.*
/**
/**
...
@@ -87,6 +85,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
...
@@ -87,6 +85,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
blEarseWebview
.
setWebChromeClient
(
WebChromeClient
())
blEarseWebview
.
setWebChromeClient
(
WebChromeClient
())
blEarseWebview
.
setOnLongClickListener
(
OnLongClickListener
{
true
})
blEarseWebview
.
setOnLongClickListener
(
OnLongClickListener
{
true
})
blEarseWebview
.
registerHandler
(
"getEraseResult"
,
BridgeHandler
{
data
,
function
->
blEarseWebview
.
registerHandler
(
"getEraseResult"
,
BridgeHandler
{
data
,
function
->
if
(!
isFinishing
){
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
val
turntableBean
:
TurntableBean
=
JsonUtil
.
parseJson
(
data
,
TurntableBean
::
class
.
java
)
if
(
turntableBean
!=
null
)
{
if
(
turntableBean
!=
null
)
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
...
@@ -97,6 +96,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
...
@@ -97,6 +96,7 @@ class EraseActivity : BaseActivity(), View.OnClickListener{
androidCallJsReferse
()
androidCallJsReferse
()
}
}
}
})
})
blEarseWebview
.
setDefaultHandler
(
object
:
DefaultHandler
()
{
blEarseWebview
.
setDefaultHandler
(
object
:
DefaultHandler
()
{
override
fun
handler
(
data
:
String
,
function
:
CallBackFunction
)
{
override
fun
handler
(
data
:
String
,
function
:
CallBackFunction
)
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/GuideActivity.kt
View file @
46e96719
...
@@ -2,14 +2,17 @@ package com.mints.goodmoney.ui.activitys
...
@@ -2,14 +2,17 @@ package com.mints.goodmoney.ui.activitys
import
android.animation.AnimatorSet
import
android.animation.AnimatorSet
import
android.animation.ObjectAnimator
import
android.animation.ObjectAnimator
import
android.text.TextUtils
import
android.view.View
import
android.view.View
import
android.widget.ImageView
import
android.widget.ImageView
import
androidx.viewpager.widget.ViewPager.OnPageChangeListener
import
androidx.viewpager.widget.ViewPager.OnPageChangeListener
import
com.mints.goodmoney.MintsApplication
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.manager.UserManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.adapter.ViewPagerAdapter
import
com.mints.goodmoney.ui.adapter.ViewPagerAdapter
import
com.mints.library.utils.CommonUtils
import
kotlinx.android.synthetic.main.activity_guide.*
import
kotlinx.android.synthetic.main.activity_guide.*
import
net.grandcentrix.tray.AppPreferences
import
net.grandcentrix.tray.AppPreferences
import
java.util.*
import
java.util.*
...
@@ -42,8 +45,13 @@ class GuideActivity : BaseActivity() {
...
@@ -42,8 +45,13 @@ class GuideActivity : BaseActivity() {
val
customVersion
:
Int
=
instance
.
getInt
(
Constant
.
CUSTOM_VERSION
,
0
)
val
customVersion
:
Int
=
instance
.
getInt
(
Constant
.
CUSTOM_VERSION
,
0
)
instance
.
put
(
Constant
.
ISFIRSTENTER
+
customVersion
,
false
)
instance
.
put
(
Constant
.
ISFIRSTENTER
+
customVersion
,
false
)
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
private
fun
initView
()
{
private
fun
initView
()
{
mImageViews
.
clear
()
mImageViews
.
clear
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/LoginActivity.kt
View file @
46e96719
...
@@ -3,9 +3,11 @@ package com.mints.goodmoney.ui.activitys
...
@@ -3,9 +3,11 @@ package com.mints.goodmoney.ui.activitys
import
android.Manifest
import
android.Manifest
import
android.os.Bundle
import
android.os.Bundle
import
android.text.TextUtils
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
import
android.view.View
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.framework.ShareSDK
import
cn.sharesdk.wechat.friends.Wechat
import
cn.sharesdk.wechat.friends.Wechat
import
com.mints.goodmoney.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.login.LoginApi
import
com.mints.goodmoney.login.LoginApi
...
@@ -17,6 +19,7 @@ import com.mints.goodmoney.mvp.views.LoginView
...
@@ -17,6 +19,7 @@ import com.mints.goodmoney.mvp.views.LoginView
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.BackInputUtil
import
com.mints.goodmoney.utils.BackInputUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
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
com.tbruyelle.rxpermissions.RxPermissions
import
com.tbruyelle.rxpermissions.RxPermissions
...
@@ -73,11 +76,26 @@ class LoginActivity : BaseActivity()
...
@@ -73,11 +76,26 @@ class LoginActivity : BaseActivity()
overridePendingTransition
(
0
,
R
.
anim
.
push_bottom_out
)
overridePendingTransition
(
0
,
R
.
anim
.
push_bottom_out
)
}
}
override
fun
onKeyDown
(
keyCode
:
Int
,
event
:
KeyEvent
):
Boolean
{
return
if
(
keyCode
==
KeyEvent
.
KEYCODE_BACK
)
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
finish
()
}
true
}
else
super
.
onKeyDown
(
keyCode
,
event
)
}
override
fun
onClick
(
v
:
View
?)
{
override
fun
onClick
(
v
:
View
?)
{
if
(
AntiShake
.
check
(
v
?.
id
))
return
if
(
AntiShake
.
check
(
v
?.
id
))
return
when
(
v
?.
id
)
{
when
(
v
?.
id
)
{
R
.
id
.
ivLoginBack
->
finish
()
R
.
id
.
ivLoginBack
->
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(!
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
finish
()
}
}
R
.
id
.
tvLoginSendcode
->
{
R
.
id
.
tvLoginSendcode
->
{
var
mobile
=
etLoginMobile
.
getText
().
toString
().
trim
()
var
mobile
=
etLoginMobile
.
getText
().
toString
().
trim
()
if
(
mobile
.
length
<
13
)
{
if
(
mobile
.
length
<
13
)
{
...
@@ -173,6 +191,11 @@ class LoginActivity : BaseActivity()
...
@@ -173,6 +191,11 @@ class LoginActivity : BaseActivity()
progressDialog
.
dismiss
()
progressDialog
.
dismiss
()
}
}
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
))
{
readyGo
(
MainActivity
::
class
.
java
)
}
finish
()
finish
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
46e96719
...
@@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment
...
@@ -9,7 +9,7 @@ import androidx.fragment.app.Fragment
import
androidx.fragment.app.FragmentTransaction
import
androidx.fragment.app.FragmentTransaction
import
com.ireader.ireadersdk.IreaderApi
import
com.ireader.ireadersdk.IreaderApi
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.mvp.views.MainView
import
com.mints.goodmoney.mvp.views.MainView
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/SplashYlhActivity.kt
View file @
46e96719
...
@@ -3,17 +3,21 @@ package com.mints.goodmoney.ui.activitys
...
@@ -3,17 +3,21 @@ package com.mints.goodmoney.ui.activitys
import
android.app.Activity
import
android.app.Activity
import
android.os.Handler
import
android.os.Handler
import
android.os.Looper
import
android.os.Looper
import
android.text.TextUtils
import
android.util.Log
import
android.util.Log
import
android.view.KeyEvent
import
android.view.KeyEvent
import
android.view.View
import
android.view.View
import
android.view.ViewGroup
import
android.view.ViewGroup
import
android.widget.TextView
import
android.widget.TextView
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.common.DeviceInfo
import
com.mints.goodmoney.common.DeviceInfo
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.YlhAdManager
import
com.mints.goodmoney.manager.YlhAdManager
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.ui.activitys.base.BaseActivity
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.utils.CommonUtils
import
com.qq.e.ads.splash.SplashAD
import
com.qq.e.ads.splash.SplashAD
import
com.qq.e.ads.splash.SplashADListener
import
com.qq.e.ads.splash.SplashADListener
import
com.qq.e.comm.util.AdError
import
com.qq.e.comm.util.AdError
...
@@ -188,10 +192,13 @@ class SplashYlhActivity : BaseActivity(), SplashADListener {
...
@@ -188,10 +192,13 @@ class SplashYlhActivity : BaseActivity(), SplashADListener {
val
isFirstEnter
:
Boolean
=
ps
.
getBoolean
(
Constant
.
ISFIRSTENTER
+
customVersion
,
true
)
val
isFirstEnter
:
Boolean
=
ps
.
getBoolean
(
Constant
.
ISFIRSTENTER
+
customVersion
,
true
)
if
(
isFirstEnter
)
{
if
(
isFirstEnter
)
{
readyGoThenKill
(
GuideActivity
::
class
.
java
)
readyGoThenKill
(
GuideActivity
::
class
.
java
)
}
else
{
val
channel
=
CommonUtils
.
getAppMetaData
(
MintsApplication
.
getContext
(),
"CHANNEL_NAME"
)
if
(
TextUtils
.
equals
(
channel
,
Constant
.
CHANNEL_SHARE
)
&&
!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
LoginActivity
::
class
.
java
)
}
else
{
}
else
{
readyGoThenKill
(
MainActivity
::
class
.
java
)
readyGoThenKill
(
MainActivity
::
class
.
java
)
}
}
}
}
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WalkActivity.kt
View file @
46e96719
...
@@ -30,13 +30,14 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
...
@@ -30,13 +30,14 @@ class WalkActivity : BaseActivity(), View.OnClickListener, WalkView, StepView.St
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
walkPresenter
.
attachView
(
this
)
walkPresenter
.
attachView
(
this
)
initExpress
()
initListener
()
initListener
()
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
initExpress
()
walkPresenter
.
getWalkMsg
()
walkPresenter
.
getWalkMsg
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/WaterActivity.kt
View file @
46e96719
...
@@ -29,13 +29,14 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
...
@@ -29,13 +29,14 @@ class WaterActivity : BaseActivity(), View.OnClickListener, WaterView.WaterViewL
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
waterPresenter
.
attachView
(
this
)
waterPresenter
.
attachView
(
this
)
initExpress
()
initListener
()
initListener
()
}
}
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
initExpress
()
waterPresenter
.
getWaterMsg
()
waterPresenter
.
getWaterMsg
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/base/BaseActivity.java
View file @
46e96719
...
@@ -71,37 +71,37 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
...
@@ -71,37 +71,37 @@ public abstract class BaseActivity extends BaseAppCompatActivity implements Base
return
this
;
return
this
;
}
}
@Override
//
@Override
public
boolean
dispatchTouchEvent
(
MotionEvent
ev
)
{
//
public boolean dispatchTouchEvent(MotionEvent ev) {
if
(
ev
.
getAction
()
==
MotionEvent
.
ACTION_UP
)
{
//
if (ev.getAction() == MotionEvent.ACTION_UP) {
View
v
=
getCurrentFocus
();
//
View v = getCurrentFocus();
//
//如果不是落在EditText区域,则需要关闭输入法
//
//如果不是落在EditText区域,则需要关闭输入法
if
(
HideKeyboard
(
v
,
ev
))
{
//
if (HideKeyboard(v, ev)) {
InputMethodManager
imm
=
(
InputMethodManager
)
getSystemService
(
Context
.
INPUT_METHOD_SERVICE
);
//
InputMethodManager imm = (InputMethodManager) getSystemService(Context.INPUT_METHOD_SERVICE);
imm
.
hideSoftInputFromWindow
(
v
.
getWindowToken
(),
InputMethodManager
.
HIDE_NOT_ALWAYS
);
//
imm.hideSoftInputFromWindow(v.getWindowToken(), InputMethodManager.HIDE_NOT_ALWAYS);
// FixUtils.fixInputMethodManagerLeak(this);
//
//
FixUtils.fixInputMethodManagerLeak(this);
}
//
}
}
//
}
return
super
.
dispatchTouchEvent
(
ev
);
//
return super.dispatchTouchEvent(ev);
//
}
//
}
//
// 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
//
// 根据EditText所在坐标和用户点击的坐标相对比,来判断是否隐藏键盘
private
boolean
HideKeyboard
(
View
view
,
MotionEvent
event
)
{
//
private boolean HideKeyboard(View view, MotionEvent event) {
if
(
view
instanceof
EditText
)
{
//
if (view instanceof EditText) {
//
int
[]
location
=
{
0
,
0
};
//
int[] location = {0, 0};
view
.
getLocationInWindow
(
location
);
//
view.getLocationInWindow(location);
//
//获取现在拥有焦点的控件view的位置,即EditText
//
//获取现在拥有焦点的控件view的位置,即EditText
int
left
=
location
[
0
],
top
=
location
[
1
],
bottom
=
top
+
view
.
getHeight
(),
right
=
left
+
view
.
getWidth
();
//
int left = location[0], top = location[1], bottom = top + view.getHeight(), right = left + view.getWidth();
//判断我们手指点击的区域是否落在EditText上面,如果不是,则返回true,否则返回false
//
//判断我们手指点击的区域是否落在EditText上面,如果不是,则返回true,否则返回false
boolean
isInEt
=
(
event
.
getX
()
>
left
&&
event
.
getX
()
<
right
&&
event
.
getY
()
>
top
&&
event
.
getY
()
<
bottom
);
//
boolean isInEt = (event.getX() > left && event.getX() < right && event.getY() > top && event.getY() < bottom);
return
!
isInEt
;
//
return !isInEt;
}
//
}
return
false
;
//
return false;
}
//
}
@Override
@Override
protected
void
onDestroy
()
{
protected
void
onDestroy
()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/DhGameFragment.kt
0 → 100644
View file @
46e96719
package
com.mints.goodmoney.ui.fragment
import
com.mints.goodmoney.R
import
com.mints.goodmoney.common.AppConfig
import
com.mints.goodmoney.common.Constant
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.utils.LogUtil
/**
* 描述:电魂游戏
* 作者:孟崔广
*/
class
DhGameFragment
:
LazyLoadBaseFragment
()
{
private
val
TAG
=
DhGameFragment
::
class
.
java
.
simpleName
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_dh
override
fun
initViewsAndEvents
()
{
}
override
fun
onFragmentFirstVisible
()
{
LogUtil
.
e
(
"DhGameFragment"
,
"onFragmentFirstVisible"
)
}
override
fun
onFragmentResume
()
{
super
.
onFragmentResume
()
if
(
AppConfig
.
fragmentClickFlag
===
Constant
.
FRAGMENT_CLICK_MAIN
)
{
}
}
override
fun
onDestroy
()
{
super
.
onDestroy
()
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MainFragment.kt
View file @
46e96719
...
@@ -6,7 +6,7 @@ import android.view.View
...
@@ -6,7 +6,7 @@ import android.view.View
import
android.widget.ImageView
import
android.widget.ImageView
import
androidx.fragment.app.FragmentTransaction
import
androidx.fragment.app.FragmentTransaction
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
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.TTPreLoadExpressManager
import
com.mints.goodmoney.manager.TTPreLoadExpressManager
...
@@ -22,6 +22,7 @@ import com.mints.goodmoney.ui.widgets.DialogListener
...
@@ -22,6 +22,7 @@ import com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.PowerDialog
import
com.mints.goodmoney.ui.widgets.PowerDialog
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.library.utils.json.JsonUtil
import
com.mints.library.utils.json.JsonUtil
import
com.yilan.sdk.player.UserCallback
import
com.yilan.sdk.ui.littlevideo.LittleVideoFragment
import
com.yilan.sdk.ui.littlevideo.LittleVideoFragment
import
kotlinx.android.synthetic.main.fragment_main_first.*
import
kotlinx.android.synthetic.main.fragment_main_first.*
import
net.grandcentrix.tray.AppPreferences
import
net.grandcentrix.tray.AppPreferences
...
@@ -158,13 +159,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -158,13 +159,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
}
}
// 设置视频权限
// 设置视频权限
// vedioAdingManager?.initAdWeight(data.vedioRules.csJ_VEDIO.rate, data.vedioRules.ylH_VEDIO.rate)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
data
.
vedioRules
.
ylH_VEDIO
.
rate
)
vedioAdingManager
?.
initAdWeight
(
data
.
vedioRules
.
csJ_VEDIO
.
rate
,
0
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
)
LogUtil
.
d
(
TAG
,
"首页权重值:csjWeight:${data.vedioRules.csJ_VEDIO.rate} ylhWeight:${data.vedioRules.ylH_VEDIO.rate}"
)
// 广告视频数
// 广告视频数
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
AppConfig
.
csjVedioAdCount
=
data
.
vedioRules
.
csJ_VEDIO
.
surplus
// AppConfig.ylhAdCount = data.vedioRules.ylH_VEDIO.surplus
AppConfig
.
ylhAdCount
=
data
.
vedioRules
.
ylH_VEDIO
.
surplus
AppConfig
.
ylhAdCount
=
0
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
)
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount}"
)
...
@@ -182,6 +181,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -182,6 +181,8 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
return
return
}
}
ps
.
put
(
Constant
.
MAIN_VEDIO_TIME
,
data
.
createRewardNeedTime
)
smallRewardCoin
=
data
.
smallRewardCoin
smallRewardCoin
=
data
.
smallRewardCoin
bigRewardCoin
=
data
.
bigRewardCoin
bigRewardCoin
=
data
.
bigRewardCoin
...
@@ -278,15 +279,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -278,15 +279,11 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
* 将播放的id记录到list中
* 将播放的id记录到list中
*/
*/
private
fun
addVedioIdList
(
id
:
String
)
{
private
fun
addVedioIdList
(
id
:
String
)
{
// LogUtil.d(TAG, "addVedioIdList:" + id)
// LogUtil.d(TAG, "addVedioId ListItem pre:" + JsonUtil.toJson(vedioIdList))
// 达到12个视频时 删除前10个记录
// 达到12个视频时 删除前10个记录
if
(
vedioIdList
.
size
>=
VEDIO_MAX_COUNT
)
{
if
(
vedioIdList
.
size
>=
VEDIO_MAX_COUNT
)
{
vedioIdList
.
subList
(
0
,
10
).
clear
()
vedioIdList
.
subList
(
0
,
10
).
clear
()
// LogUtil.d(TAG, "addVedioId ListItem removeAt:" + JsonUtil.toJson(vedioIdList))
}
}
if
(!
vedioIdList
.
contains
(
id
))
vedioIdList
.
add
(
id
)
if
(!
vedioIdList
.
contains
(
id
))
vedioIdList
.
add
(
id
)
// LogUtil.d(TAG, "addVedioId ListItem next:" + JsonUtil.toJson(vedioIdList))
}
}
/**
/**
...
@@ -302,8 +299,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -302,8 +299,6 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
*/
*/
private
fun
resumeDownloadTime
(
id
:
String
)
{
private
fun
resumeDownloadTime
(
id
:
String
)
{
if
(!
TextUtils
.
isEmpty
(
id
))
{
if
(!
TextUtils
.
isEmpty
(
id
))
{
LogUtil
.
d
(
TAG
,
"resumeDownloadTime cur id:$id"
)
LogUtil
.
d
(
TAG
,
"resumeDownloadTime ListItem:"
+
JsonUtil
.
toJson
(
vedioIdList
))
if
(
vedioIdList
.
contains
(
id
))
{
if
(
vedioIdList
.
contains
(
id
))
{
cdvvYilanTime
?.
pause
()
cdvvYilanTime
?.
pause
()
return
return
...
@@ -339,13 +334,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
...
@@ -339,13 +334,12 @@ class MainFragment : BaseFragment(), HomeView, View.OnClickListener {
isFristWacthVideo
=
false
isFristWacthVideo
=
false
}
}
cdvvYilanTime
?.
showRedbox
()
cdvvYilanTime
?.
showRedbox
()
stopDownloadTime
()
stopDownloadTime
()
homePresenter
.
requestAddHomeVedioReward
()
homePresenter
.
requestAddHomeVedioReward
()
}
}
va
l
vedioTime
=
60
va
r
vedioTime
=
ps
.
getInt
(
Constant
.
MAIN_VEDIO_TIME
,
30
)
cdvvYilanTime
.
setTime
(
vedioTime
)
cdvvYilanTime
.
setTime
(
vedioTime
)
cdvvYilanTime
.
start
()
cdvvYilanTime
.
start
()
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MoneyFragment.kt
View file @
46e96719
...
@@ -2,11 +2,16 @@ package com.mints.goodmoney.ui.fragment
...
@@ -2,11 +2,16 @@ package com.mints.goodmoney.ui.fragment
import
androidx.fragment.app.Fragment
import
androidx.fragment.app.Fragment
import
androidx.viewpager.widget.ViewPager
import
androidx.viewpager.widget.ViewPager
import
com.androidkun.xtablayout.XTabLayout
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.presenters.MyPresenter
import
com.mints.goodmoney.mvp.presenters.MyPresenter
import
com.mints.goodmoney.ui.activitys.LoginActivity
import
com.mints.goodmoney.ui.adapter.MessageFragAdapter
import
com.mints.goodmoney.ui.adapter.MessageFragAdapter
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.fragment.base.BaseFragment
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.ui.fragment.base.LazyLoadBaseFragment
import
com.mints.goodmoney.ui.widgets.tablayout.TabLayout
import
com.mints.goodmoney.utils.LogUtil
import
kotlinx.android.synthetic.main.fragment_main_money.*
import
kotlinx.android.synthetic.main.fragment_main_money.*
import
java.util.*
import
java.util.*
...
@@ -15,10 +20,12 @@ import java.util.*
...
@@ -15,10 +20,12 @@ import java.util.*
* 作者:孟崔广
* 作者:孟崔广
* 时间:2020/10/29 13:48
* 时间:2020/10/29 13:48
*/
*/
class
MoneyFragment
:
BaseFragment
()
{
class
MoneyFragment
:
BaseFragment
()
,
XTabLayout
.
OnTabSelectedListener
{
private
var
mainFragment
:
MainFragment
?
=
null
private
var
mainFragment
:
MainFragment
?
=
null
private
var
curPosition
=
0
;
//当前标签选中的下标
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_money
override
fun
getContentViewLayoutID
()
=
R
.
layout
.
fragment_main_money
override
fun
initViewsAndEvents
()
{
override
fun
initViewsAndEvents
()
{
...
@@ -26,34 +33,59 @@ class MoneyFragment : BaseFragment() {
...
@@ -26,34 +33,59 @@ class MoneyFragment : BaseFragment() {
}
}
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
override
fun
onHiddenChanged
(
hidden
:
Boolean
)
{
if
(
curPosition
==
0
)
{
mainFragment
?.
onHiddenChanged
(
hidden
)
mainFragment
?.
onHiddenChanged
(
hidden
)
}
super
.
onHiddenChanged
(
hidden
)
super
.
onHiddenChanged
(
hidden
)
}
}
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
override
fun
setUserVisibleHint
(
isVisibleToUser
:
Boolean
)
{
super
.
setUserVisibleHint
(
isVisibleToUser
)
super
.
setUserVisibleHint
(
isVisibleToUser
)
if
(
curPosition
==
0
)
{
mainFragment
?.
userVisibleHint
=
isVisibleToUser
mainFragment
?.
userVisibleHint
=
isVisibleToUser
}
}
}
private
fun
initView
()
{
private
fun
initView
()
{
//去除两侧应阴影
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
vpFragmentMoney
.
setOverScrollMode
(
ViewPager
.
OVER_SCROLL_NEVER
)
tabs
.
add
(
"视频"
)
// tabs.add("游戏")
tabs
.
add
(
"书城"
)
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
val
fragments
:
MutableList
<
Fragment
>
=
ArrayList
()
mainFragment
=
MainFragment
()
mainFragment
=
MainFragment
()
fragments
.
add
(
mainFragment
!!
)
fragments
.
add
(
mainFragment
!!
)
// fragments.add(DhGameFragment())
fragments
.
add
(
ZhangyueFragment
())
fragments
.
add
(
ZhangyueFragment
())
val
tabs
:
MutableList
<
String
>
=
ArrayList
()
//去除两侧应阴影
tabs
.
add
(
"视频"
)
vpFragmentMoney
.
setOverScrollMode
(
ViewPager
.
OVER_SCROLL_NEVER
)
tabs
.
add
(
"书城"
)
vpFragmentMoney
.
offscreenPageLimit
=
tabs
.
size
+
3
val
adapter
=
MessageFragAdapter
(
childFragmentManager
,
fragments
,
tabs
)
val
adapter
=
MessageFragAdapter
(
childFragmentManager
,
fragments
,
tabs
)
vpFragmentMoney
.
setAdapter
(
adapter
)
vpFragmentMoney
.
setAdapter
(
adapter
)
xtFragmentMoney
.
setxTabDisplayNum
(
tabs
.
size
)
xtFragmentMoney
.
setupWithViewPager
(
vpFragmentMoney
)
xtFragmentMoney
.
setupWithViewPager
(
vpFragmentMoney
)
xtFragmentMoney
.
addOnTabSelectedListener
(
this
)
}
}
public
fun
selectVedio
()
{
fun
selectVedio
()
{
vpFragmentMoney
.
currentItem
=
0
vpFragmentMoney
.
currentItem
=
0
}
}
override
fun
onTabReselected
(
tab
:
XTabLayout
.
Tab
)
{
}
override
fun
onTabUnselected
(
tab
:
XTabLayout
.
Tab
)
{
}
override
fun
onTabSelected
(
tab
:
XTabLayout
.
Tab
)
{
// if (tab.position == 1 && !UserManager.getInstance().userIsLogin()) {
// readyGo(LoginActivity::class.java)
// vpFragmentMoney.currentItem = if (curPosition == 1) 0 else curPosition
// return
// }
curPosition
=
tab
.
position
}
}
}
\ No newline at end of file
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
46e96719
...
@@ -18,9 +18,11 @@ import cn.sharesdk.wechat.friends.Wechat
...
@@ -18,9 +18,11 @@ import cn.sharesdk.wechat.friends.Wechat
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.BuildConfig
import
com.mints.goodmoney.R
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.VedioAdingManager
import
com.mints.goodmoney.ad.
video.
VedioAdingManager
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.BxmManager
import
com.mints.goodmoney.manager.LiebaoManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.manager.UserManager
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.model.*
import
com.mints.goodmoney.mvp.presenters.MyPresenter
import
com.mints.goodmoney.mvp.presenters.MyPresenter
...
@@ -90,6 +92,11 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
...
@@ -90,6 +92,11 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getUserHallBaseMsg
()
myPresenter
.
getUserHallBaseMsg
()
// 登录成功的用户初始化鱼丸盒子
if
(
userManager
.
userIsLogin
())
{
baseApplication
.
initYwSdk
()
}
}
else
{
}
else
{
// 游客登录
// 游客登录
myPresenter
.
userLogin
()
myPresenter
.
userLogin
()
...
@@ -146,6 +153,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
...
@@ -146,6 +153,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override
fun
onDestroy
()
{
override
fun
onDestroy
()
{
super
.
onDestroy
()
super
.
onDestroy
()
BxmManager
.
onDestory
()
myPresenter
.
detachView
()
myPresenter
.
detachView
()
}
}
...
@@ -158,7 +166,10 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
...
@@ -158,7 +166,10 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
}
myPresenter
.
getSignInHomePageMsg
()
myPresenter
.
getSignInHomePageMsg
()
if
(!
bannerFlag
)
{
myPresenter
.
myHotActivity
()
myPresenter
.
myHotActivity
()
}
myPresenter
.
getHallBaseMsg
()
userConfig
=
data
userConfig
=
data
handleRecyData
()
handleRecyData
()
...
@@ -215,6 +226,29 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
...
@@ -215,6 +226,29 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
override
fun
userLoginSuc
()
{
override
fun
userLoginSuc
()
{
myPresenter
.
getUserHallBaseMsg
()
myPresenter
.
getUserHallBaseMsg
()
myPresenter
.
getHallBaseMsg
()
}
override
fun
getHallBaseMsgSuc
(
data
:
UserTaskMsgBean
)
{
if
(
activity
==
null
||
activity
!!
.
isFinishing
)
{
return
}
// 新人福利
if
(
data
.
userMsg
.
firstGiveCoin
>
0
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
data
.
userMsg
.
firstGiveCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_NEW_USER
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
else
{
// 离线收益
if
(
data
.
offlineBean
.
offlineIncome
>
0
)
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
data
.
offlineBean
.
offlineIncome
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_OFFLINE_DOUBLE
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
...
@@ -357,7 +391,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
...
@@ -357,7 +391,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
item_title_avatar
.
setImageResource
(
R
.
mipmap
.
ic_my
)
item_title_avatar
.
setImageResource
(
R
.
mipmap
.
ic_my
)
}
}
if
(
BuildConfig
.
DEBUG
)
{
if
(
BuildConfig
.
DEBUG
)
{
item_title_i
d
.
text
=
"测试环境->"
+
item_title_id
.
text
.
toString
()
item_title_i
nvitecode
.
text
=
"-"
+
item_title_invitecode
.
text
}
}
val
userGold
=
if
(
userConfig
==
null
)
{
val
userGold
=
if
(
userConfig
==
null
)
{
...
@@ -584,6 +618,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
...
@@ -584,6 +618,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo
(
EraseActivity
::
class
.
java
)
readyGo
(
EraseActivity
::
class
.
java
)
}
}
Constant
.
HOT_ACTIVITY_BXM
->
{
Constant
.
HOT_ACTIVITY_BXM
->
{
// 消费变现猫事件
}
}
else
->
{
else
->
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/widgets/refresh/CustomRefreshLayout.java
View file @
46e96719
...
@@ -19,7 +19,7 @@ import android.view.animation.Interpolator;
...
@@ -19,7 +19,7 @@ import android.view.animation.Interpolator;
import
android.view.animation.Transformation
;
import
android.view.animation.Transformation
;
import
android.widget.AbsListView
;
import
android.widget.AbsListView
;
import
androidx.swiperefreshlayout.widget.SwipeRefreshLayout
;
//
import androidx.swiperefreshlayout.widget.SwipeRefreshLayout;
/**
/**
* NOTE: the class based on the {@link SwipeRefreshLayout} source code
* NOTE: the class based on the {@link SwipeRefreshLayout} source code
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/ForegroundOrBackground.java
View file @
46e96719
...
@@ -17,6 +17,9 @@ import java.lang.ref.WeakReference;
...
@@ -17,6 +17,9 @@ import java.lang.ref.WeakReference;
* 判断app在前台还是在后台
* 判断app在前台还是在后台
*/
*/
public
class
ForegroundOrBackground
implements
Application
.
ActivityLifecycleCallbacks
{
public
class
ForegroundOrBackground
implements
Application
.
ActivityLifecycleCallbacks
{
private
long
leaveTime
=
0
;
//应用切后台时间
private
static
ForegroundOrBackground
instance
;
private
static
ForegroundOrBackground
instance
;
public
int
count
=
0
;
public
int
count
=
0
;
...
@@ -56,7 +59,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -56,7 +59,7 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
if
(
vup
==
null
)
{
if
(
vup
==
null
)
{
vup
=
new
VersionUpdatePresenter
();
vup
=
new
VersionUpdatePresenter
();
}
}
if
(
reference
==
null
)
{
if
(
reference
==
null
)
{
reference
=
new
WeakReference
<>(
activity
);
reference
=
new
WeakReference
<>(
activity
);
}
}
vup
.
updateVersion
(
reference
.
get
());
vup
.
updateVersion
(
reference
.
get
());
...
@@ -73,17 +76,21 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -73,17 +76,21 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
if
(
TextUtils
.
equals
(
simpleName
,
"SplashYlhActivity"
)
||
if
(
TextUtils
.
equals
(
simpleName
,
"SplashYlhActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"GuideActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"GuideActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"AwardActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"AwardActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"DrawcashActivity"
)
)
{
TextUtils
.
equals
(
simpleName
,
"DrawcashActivity"
))
{
count
++;
count
++;
return
;
return
;
}
}
// if (count == 0) {
if
(
count
==
0
)
{
// if(intent==null){
// LogUtil.d("ForegroundOrBackground", System.currentTimeMillis() - leaveTime + " onActivityStarted");
// intent = new Intent(activity, SplashADActivity.class);
// 30秒后打开应用 显示开屏广告
// }
if
(
System
.
currentTimeMillis
()
-
leaveTime
>=
30000
)
{
// activity.startActivity(intent);
if
(
intent
==
null
)
{
// }
intent
=
new
Intent
(
activity
,
SplashADActivity
.
class
);
}
activity
.
startActivity
(
intent
);
}
}
count
++;
count
++;
}
}
...
@@ -92,6 +99,16 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
...
@@ -92,6 +99,16 @@ public class ForegroundOrBackground implements Application.ActivityLifecycleCall
count
--;
count
--;
if
(
count
==
0
)
{
if
(
count
==
0
)
{
leaveTime
=
System
.
currentTimeMillis
();
String
simpleName
=
activity
.
getClass
().
getSimpleName
();
if
(
TextUtils
.
equals
(
simpleName
,
"SplashYlhActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"GuideActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"AwardActivity"
)
||
TextUtils
.
equals
(
simpleName
,
"DrawcashActivity"
))
{
count
++;
return
;
}
TrackManager
.
getInstance
().
offline
();
TrackManager
.
getInstance
().
offline
();
}
}
}
}
...
...
GoodMoney/app/src/main/java/com/mints/library/base/BaseAppCompatActivity.java
View file @
46e96719
...
@@ -24,6 +24,7 @@ import com.mints.library.net.netstatus.NetStateReceiver;
...
@@ -24,6 +24,7 @@ import com.mints.library.net.netstatus.NetStateReceiver;
import
com.mints.library.net.netstatus.NetUtils
;
import
com.mints.library.net.netstatus.NetUtils
;
import
com.mints.library.utils.CommonUtils
;
import
com.mints.library.utils.CommonUtils
;
import
com.readystatesoftware.systembartint.SystemBarTintManager
;
import
com.readystatesoftware.systembartint.SystemBarTintManager
;
import
com.tendcloud.tenddata.TCAgent
;
import
com.umeng.analytics.MobclickAgent
;
import
com.umeng.analytics.MobclickAgent
;
/**
/**
...
@@ -161,7 +162,7 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
...
@@ -161,7 +162,7 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
super
.
onResume
();
super
.
onResume
();
// talkingData页面留存
// talkingData页面留存
//
TCAgent.onPageStart(this, getClass().getSimpleName());
TCAgent
.
onPageStart
(
this
,
getClass
().
getSimpleName
());
// 友盟
// 友盟
MobclickAgent
.
onResume
(
this
);
MobclickAgent
.
onResume
(
this
);
...
@@ -172,7 +173,7 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
...
@@ -172,7 +173,7 @@ public abstract class BaseAppCompatActivity extends TransitionActivity {
super
.
onPause
();
super
.
onPause
();
// talkingData页面留存
// talkingData页面留存
//
TCAgent.onPageEnd(this, getClass().getSimpleName());
TCAgent
.
onPageEnd
(
this
,
getClass
().
getSimpleName
());
// 友盟
// 友盟
MobclickAgent
.
onPause
(
this
);
MobclickAgent
.
onPause
(
this
);
...
...
GoodMoney/app/src/main/res/layout/activity_liebao_game.xml
View file @
46e96719
...
@@ -8,6 +8,21 @@
...
@@ -8,6 +8,21 @@
<include
layout=
"@layout/header_layout"
/>
<include
layout=
"@layout/header_layout"
/>
<TextView
android:id=
"@+id/tvGameHint"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/my_color_gray"
android:drawableLeft=
"@mipmap/ic_voice"
android:drawablePadding=
"10pt"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"10dp"
android:textSize=
"14sp"
/>
<androidx.core.widget.NestedScrollView
<androidx.core.widget.NestedScrollView
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_height=
"match_parent"
...
@@ -24,21 +39,6 @@
...
@@ -24,21 +39,6 @@
android:descendantFocusability=
"blocksDescendants"
android:descendantFocusability=
"blocksDescendants"
android:orientation=
"vertical"
>
android:orientation=
"vertical"
>
<TextView
android:id=
"@+id/tvGameHint"
android:visibility=
"gone"
android:layout_width=
"match_parent"
android:layout_height=
"wrap_content"
android:background=
"@color/my_color_gray"
android:drawableLeft=
"@mipmap/ic_voice"
android:drawablePadding=
"10pt"
android:gravity=
"center_vertical"
android:paddingLeft=
"10dp"
android:paddingTop=
"10dp"
android:paddingRight=
"5dp"
android:paddingBottom=
"10dp"
android:textSize=
"14sp"
/>
<RelativeLayout
<RelativeLayout
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
android:layout_height=
"match_parent"
>
...
...
GoodMoney/app/src/main/res/layout/fragment_main_dh.xml
0 → 100644
View file @
46e96719
<?xml version="1.0" encoding="utf-8"?>
<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_height=
"match_parent"
android:background=
"@color/white"
android:orientation=
"vertical"
>
<ImageView
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:src=
"@mipmap/ic_launcher"
/>
</LinearLayout>
GoodMoney/app/src/main/res/layout/fragment_main_money.xml
View file @
46e96719
...
@@ -10,7 +10,6 @@
...
@@ -10,7 +10,6 @@
android:id=
"@+id/xtFragmentMoney"
android:id=
"@+id/xtFragmentMoney"
android:layout_width=
"wrap_content"
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:layout_height=
"wrap_content"
app:xTabDisplayNum=
"2"
android:layout_marginTop=
"20dp"
android:layout_marginTop=
"20dp"
app:xTabIndicatorColor=
"#F28335"
app:xTabIndicatorColor=
"#F28335"
app:xTabIndicatorHeight=
"4dp"
app:xTabIndicatorHeight=
"4dp"
...
...
GoodMoney/app/src/main/res/layout/fragment_main_zy.xml
View file @
46e96719
...
@@ -13,13 +13,16 @@
...
@@ -13,13 +13,16 @@
android:layout_weight=
"1"
></FrameLayout>
android:layout_weight=
"1"
></FrameLayout>
<TextView
<TextView
android:visibility=
"gone"
android:id=
"@+id/tvZhangContent"
android:id=
"@+id/tvZhangContent"
android:layout_width=
"match_parent"
android:layout_width=
"match_parent"
android:gravity=
"center"
android:layout_height=
"40dp"
android:textSize=
"16sp"
android:background=
"@color/my_color_gray"
android:textColor=
"@color/black"
android:drawableLeft=
"@mipmap/ic_voice"
android:layout_height=
"40dp"
></TextView>
android:drawablePadding=
"5dp"
android:paddingLeft=
"14dp"
android:gravity=
"center_vertical"
android:textSize=
"14sp"
android:visibility=
"gone"
></TextView>
</LinearLayout>
</LinearLayout>
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