Commit 46e96719 authored by mengcuiguang's avatar mengcuiguang

代码合并

parent 3c4cd3a4
...@@ -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'
......
...@@ -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"
......
...@@ -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)
......
...@@ -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();
}
}
}
/** /**
* 鱼丸盒子 * 鱼丸盒子
*/ */
......
//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
//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;
// }
// }
// });
// }
//}
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();
} }
......
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) {
......
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());
} }
......
...@@ -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
...@@ -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
...@@ -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(20); cmGameAppInfo.setExpressInterAdProbability(60);
// 功能默认开启,可使用如下方法来关闭 // 功能默认开启,可使用如下方法来关闭
// cmGameAppInfo.setShowLogin(false); // cmGameAppInfo.setShowLogin(false);
......
...@@ -25,7 +25,7 @@ public class MiitHelper implements IIdentifierListener { ...@@ -25,7 +25,7 @@ public class MiitHelper implements IIdentifierListener {
} }
public void getDeviceIds(Context cxt) { public void initDeviceIds(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);
......
...@@ -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();
} }
......
...@@ -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;
......
...@@ -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" //猎豹
/** /**
* 广告初始化 * 广告初始化
......
...@@ -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;
} }
......
...@@ -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
...@@ -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)
} }
...@@ -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()
......
...@@ -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() {
......
...@@ -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) {
......
...@@ -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()
......
...@@ -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()
} }
......
...@@ -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
......
...@@ -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
...@@ -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()
} }
......
...@@ -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()
} }
......
...@@ -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() {
......
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
...@@ -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()
} }
val vedioTime = 60 var vedioTime = ps.getInt(Constant.MAIN_VEDIO_TIME, 30)
cdvvYilanTime.setTime(vedioTime) cdvvYilanTime.setTime(vedioTime)
cdvvYilanTime.start() cdvvYilanTime.start()
} }
......
...@@ -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
...@@ -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_id.text = "测试环境->" + item_title_id.text.toString() item_title_invitecode.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()
......
...@@ -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
......
...@@ -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();
} }
} }
......
...@@ -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);
......
...@@ -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">
......
<?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>
...@@ -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"
......
...@@ -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>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment