Commit 36ad682f authored by mengcuiguang's avatar mengcuiguang

1.0.8珊瑚上线

parent c0cee586
...@@ -27,8 +27,10 @@ import com.mints.highgold.manager.MiitHelper; ...@@ -27,8 +27,10 @@ import com.mints.highgold.manager.MiitHelper;
import com.mints.highgold.manager.TTAdManagerHolder; import com.mints.highgold.manager.TTAdManagerHolder;
import com.mints.highgold.manager.UserManager; import com.mints.highgold.manager.UserManager;
import com.mints.highgold.net.LoanService; import com.mints.highgold.net.LoanService;
import com.mints.highgold.ui.widgets.BannerView;
import com.mints.highgold.utils.DevicesUtil; import com.mints.highgold.utils.DevicesUtil;
import com.mints.highgold.utils.ForegroundOrBackground; import com.mints.highgold.utils.ForegroundOrBackground;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.RudenessScreenHelper; import com.mints.highgold.utils.RudenessScreenHelper;
import com.mints.highgold.utils.rxutil.CommonRxTask; import com.mints.highgold.utils.rxutil.CommonRxTask;
import com.mints.highgold.utils.rxutil.RxjavaUtil; import com.mints.highgold.utils.rxutil.RxjavaUtil;
...@@ -65,6 +67,8 @@ import rx.schedulers.Schedulers; ...@@ -65,6 +67,8 @@ import rx.schedulers.Schedulers;
*/ */
public class MintsApplication extends MultiDexApplication { public class MintsApplication extends MultiDexApplication {
private static final String TAG = MintsApplication.class.getSimpleName();
private static Context mContext; private static Context mContext;
private static LocalBroadcastManager mLocalBroadcatManager; private static LocalBroadcastManager mLocalBroadcatManager;
...@@ -137,6 +141,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -137,6 +141,7 @@ public class MintsApplication extends MultiDexApplication {
JLibrary.InitEntry(base); JLibrary.InitEntry(base);
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
LogUtil.e(e);
} }
} }
...@@ -230,6 +235,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -230,6 +235,7 @@ public class MintsApplication extends MultiDexApplication {
miitHelper.getDeviceIds(getApplicationContext()); miitHelper.getDeviceIds(getApplicationContext());
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
LogUtil.e(e);
} }
} }
...@@ -323,10 +329,10 @@ public class MintsApplication extends MultiDexApplication { ...@@ -323,10 +329,10 @@ public class MintsApplication extends MultiDexApplication {
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
LogUtil.e(e);
} }
System.out.println("mcg __ oaid:" + oaid); LogUtil.d(TAG, "oaid:" + oaid);
YwSDK.Companion.init(this, appSecret, appid, userID, "1", oaid); YwSDK.Companion.init(this, appSecret, appid, userID, "1", oaid);
} }
...@@ -414,19 +420,18 @@ public class MintsApplication extends MultiDexApplication { ...@@ -414,19 +420,18 @@ public class MintsApplication extends MultiDexApplication {
shanhuFlag = TMSDKContext.init(this, new AbsTMSConfig() { shanhuFlag = TMSDKContext.init(this, new AbsTMSConfig() {
@Override @Override
public String getServerAddress() { public String getServerAddress() {
if (BuildConfig.DEBUG) { // if (BuildConfig.DEBUG) {
return "mazutest.3g.qq.com"; // 测试环境 // return "mazutest.3g.qq.com"; // 测试环境
} else { // }
return "mazu.3g.qq.com"; // 正式环境 return "mazu.3g.qq.com"; // 正式环境
} }
}
}); });
/** /**
* 初始化后才能调用! * 初始化后才能调用!
* setAutoConnectionSwitch()影响渠道号上报这个自动联网项是否运行。请不要一直设置为false,影响激活量和活跃量统计,后台会关注并停止相关服务,请在过工信部测试允许联网后,设置回true * setAutoConnectionSwitch()影响渠道号上报这个自动联网项是否运行。请不要一直设置为false,影响激活量和活跃量统计,后台会关注并停止相关服务,请在过工信部测试允许联网后,设置回true
*/ */
ShanHuAD.init(TMSDKContext.getApplicationContext(), new H5Browser(), TMSDKContext.getCoinProductId()); ShanHuAD.init(TMSDKContext.getApplicationContext(), new H5Browser(), TMSDKContext.getCoinProductId());
System.out.println("mcg __ shanhuFlag:" + shanhuFlag); LogUtil.d(TAG, "shanhuFlag:" + shanhuFlag);
} }
/** /**
...@@ -509,6 +514,7 @@ public class MintsApplication extends MultiDexApplication { ...@@ -509,6 +514,7 @@ public class MintsApplication extends MultiDexApplication {
} }
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
LogUtil.e(e);
} }
return null; return null;
} }
......
...@@ -23,6 +23,7 @@ import com.mints.highgold.manager.UserManager; ...@@ -23,6 +23,7 @@ import com.mints.highgold.manager.UserManager;
import com.mints.highgold.mvp.presenters.MintegralVedioAdPresenter; import com.mints.highgold.mvp.presenters.MintegralVedioAdPresenter;
import com.mints.highgold.mvp.views.MintegralVedioAdManagerView; import com.mints.highgold.mvp.views.MintegralVedioAdManagerView;
import com.mints.highgold.ui.widgets.LoadingDialog; import com.mints.highgold.ui.widgets.LoadingDialog;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.ToastUtil; import com.mints.highgold.utils.ToastUtil;
import java.util.HashMap; import java.util.HashMap;
...@@ -32,6 +33,8 @@ import java.util.HashMap; ...@@ -32,6 +33,8 @@ import java.util.HashMap;
*/ */
public class MintegralVedioAdManager implements MintegralVedioAdManagerView { public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
private static final String TAG = MintegralVedioAdManager.class.getSimpleName();
private static MintegralVedioAdManager _inst; private static MintegralVedioAdManager _inst;
private MintegralVedioAdPresenter mintegralVedioAdPresenter; private MintegralVedioAdPresenter mintegralVedioAdPresenter;
...@@ -176,7 +179,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -176,7 +179,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
@Override @Override
public void onVideoLoadFail(String errorMsg) { public void onVideoLoadFail(String errorMsg) {
System.out.println("mcg __ onVideoLoadFail:" + errorMsg); LogUtil.d(TAG, "onVideoLoadFail:" + errorMsg);
if (mintegralVedioAdListener != null) { if (mintegralVedioAdListener != null) {
mintegralVedioAdListener.mintegralVedioAdFail(); mintegralVedioAdListener.mintegralVedioAdFail();
} }
...@@ -186,7 +189,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -186,7 +189,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
@Override @Override
public void onShowFail(String errorMsg) { public void onShowFail(String errorMsg) {
System.out.println("mcg __ onShowFail errorMsg:" + errorMsg); LogUtil.d(TAG, "onShowFail:" + errorMsg);
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ONE, "999998", errorMsg); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ONE, "999998", errorMsg);
if (mintegralVedioAdListener != null) { if (mintegralVedioAdListener != null) {
mintegralVedioAdListener.mintegralVedioAdFail(); mintegralVedioAdListener.mintegralVedioAdFail();
...@@ -212,8 +215,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -212,8 +215,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
} }
LogUtil.d(TAG, "onAdClose isCompleteView::" + isCompleteView);
System.out.println("mcg __ onAdClose isCompleteView:" + isCompleteView);
} }
@Override @Override
......
...@@ -8,6 +8,7 @@ import com.mints.highgold.common.AppConfig; ...@@ -8,6 +8,7 @@ import com.mints.highgold.common.AppConfig;
import com.mints.highgold.common.Constant; import com.mints.highgold.common.Constant;
import com.mints.highgold.mvp.model.VedioAdingBean; import com.mints.highgold.mvp.model.VedioAdingBean;
import com.mints.highgold.mvp.model.WeightBean; import com.mints.highgold.mvp.model.WeightBean;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.ToastUtil; import com.mints.highgold.utils.ToastUtil;
import com.mints.library.utils.json.JsonUtil; import com.mints.library.utils.json.JsonUtil;
...@@ -20,6 +21,8 @@ import java.util.Random; ...@@ -20,6 +21,8 @@ import java.util.Random;
*/ */
public class VedioAdingManager { public class VedioAdingManager {
private static final String TAG = VedioAdingManager.class.getSimpleName();
public static final int SECOND = 60; public static final int SECOND = 60;
private static VedioAdingManager _inst; private static VedioAdingManager _inst;
...@@ -77,7 +80,7 @@ public class VedioAdingManager { ...@@ -77,7 +80,7 @@ public class VedioAdingManager {
/** /**
* 初始化广告权重 * 初始化广告权重
*/ */
public void initAdWeight(int csjVedioWeight, int ylhWeight, int csjFullWeight, int hytechVedioWeight, int mintegralWeight) { public void initAdWeight(int csjVedioWeight, int ylhWeight, int csjFullWeight, int hytechVedioWeight, int mintegralWeight, int shanhuWeight) {
this.csjVedioWeight = csjVedioWeight; this.csjVedioWeight = csjVedioWeight;
this.ylhWeight = ylhWeight; this.ylhWeight = ylhWeight;
this.csjFullWeight = csjFullWeight; this.csjFullWeight = csjFullWeight;
...@@ -113,14 +116,16 @@ public class VedioAdingManager { ...@@ -113,14 +116,16 @@ 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.csjFullAdCount > 0) {
nextAdType = Constant.CSJ_FULL_AD;
} else if (AppConfig.hytechVedioAdCount > 0) {
nextAdType = Constant.HYTECH_VEDIO_AD;
} else if (AppConfig.mintegralAdCount > 0) {
nextAdType = Constant.MINTEGRAL_VEDIO_AD;
} else if (AppConfig.ylhAdCount > 0) { } else if (AppConfig.ylhAdCount > 0) {
nextAdType = Constant.YLH_VEDIO_AD; nextAdType = Constant.YLH_VEDIO_AD;
} else if (AppConfig.mintegralAdCount > 0) {
nextAdType = Constant.MINTEGRAL_VEDIO_AD;
} else if (AppConfig.shanhuAdCount > 0) {
nextAdType = Constant.SHANHU_VEDIO_AD;
} else if (AppConfig.hytechVedioAdCount > 0) {
nextAdType = Constant.HYTECH_VEDIO_AD;
} else if (AppConfig.csjFullAdCount > 0) {
nextAdType = Constant.CSJ_FULL_AD;
} }
return nextAdType; return nextAdType;
} }
...@@ -131,7 +136,8 @@ public class VedioAdingManager { ...@@ -131,7 +136,8 @@ public class VedioAdingManager {
private String getVedioAdType() { private String getVedioAdType() {
// 根据权重获取广告类型 // 根据权重获取广告类型
String adType = getRandomWeight(); String adType = getRandomWeight();
System.out.println("mcg __ 权重结果返回的广告类型:" + adType);
LogUtil.d(TAG, "权重结果返回的广告类型:" + adType);
return adType; return adType;
} }
...@@ -150,50 +156,48 @@ public class VedioAdingManager { ...@@ -150,50 +156,48 @@ public class VedioAdingManager {
if (AppConfig.csjVedioAdCount > 0) { if (AppConfig.csjVedioAdCount > 0) {
weightList.add(new WeightBean(csjVedioWeight, Constant.CSJ_VEDIO_AD)); weightList.add(new WeightBean(csjVedioWeight, Constant.CSJ_VEDIO_AD));
weight = weight + csjVedioWeight; weight = weight + csjVedioWeight;
System.out.print("mcg __ 权重值:csjVedioWeight:" + csjVedioWeight);
LogUtil.d(TAG, "权重值:csjVedioWeight:" + csjVedioWeight);
} }
if (AppConfig.csjFullAdCount > 0) { if (AppConfig.ylhAdCount > 0) {
weightList.add(new WeightBean(csjFullWeight, Constant.CSJ_FULL_AD)); weightList.add(new WeightBean(ylhWeight, Constant.YLH_VEDIO_AD));
weight = weight + csjFullWeight; weight = weight + ylhWeight;
System.out.print(" mcg __ 权重值:csjFullWeight:" + csjFullWeight); LogUtil.d(TAG, "权重值:ylhWeight:" + ylhWeight);
}
if (AppConfig.mintegralAdCount > 0) {
weightList.add(new WeightBean(mintegralWeight, Constant.MINTEGRAL_VEDIO_AD));
weight = weight + mintegralWeight;
LogUtil.d(TAG, "权重值:mintegralWeight:" + mintegralWeight);
} }
if (AppConfig.shanhuAdCount > 0) { if (AppConfig.shanhuAdCount > 0) {
weightList.add(new WeightBean(shanhuWeight, Constant.SHANHU_VEDIO_AD)); weightList.add(new WeightBean(shanhuWeight, Constant.SHANHU_VEDIO_AD));
weight = weight + shanhuWeight; weight = weight + shanhuWeight;
System.out.print(" mcg __ 权重值:shanhuWeight:" + shanhuWeight); LogUtil.d(TAG, "权重值:shanhuWeight:" + shanhuWeight);
} }
if (AppConfig.hytechVedioAdCount > 0) { if (AppConfig.hytechVedioAdCount > 0) {
weightList.add(new WeightBean(hytechVedioWeight, Constant.HYTECH_VEDIO_AD)); weightList.add(new WeightBean(hytechVedioWeight, Constant.HYTECH_VEDIO_AD));
weight = weight + hytechVedioWeight; weight = weight + hytechVedioWeight;
System.out.print(" mcg __ 权重值:hytechVedioWeight:" + hytechVedioWeight); LogUtil.d(TAG, "权重值:hytechVedioWeight:" + hytechVedioWeight);
}
if (AppConfig.mintegralAdCount > 0) {
weightList.add(new WeightBean(mintegralWeight, Constant.MINTEGRAL_VEDIO_AD));
weight = weight + mintegralWeight;
System.out.print(" mcg __ 权重值:mintegralWeight:" + mintegralWeight);
} }
if (AppConfig.ylhAdCount > 0) { if (AppConfig.csjFullAdCount > 0) {
weightList.add(new WeightBean(ylhWeight, Constant.YLH_VEDIO_AD)); weightList.add(new WeightBean(csjFullWeight, Constant.CSJ_FULL_AD));
weight = weight + ylhWeight; weight = weight + csjFullWeight;
System.out.println(" mcg __ 权重值:ylhWeight:" + ylhWeight); LogUtil.d(TAG, "权重值:csjFullWeight:" + csjFullWeight);
} }
// 权重随机 // 权重随机
if (weightList != null && weightList.size() > 0 && weight > 0) { if (weightList != null && weightList.size() > 0 && weight > 0) {
// for (WeightBean weightBean : weightList) { // for (WeightBean weightBean : weightList) {
// weight += weightBean.getWeight(); // weight += weightBean.getWeight();
// } // }
LogUtil.d(TAG, "1、权重总值:" + weight);
System.out.print("mcg __ 1、权重总值:" + weight);
Random r = new Random(); Random r = new Random();
int randomWeight = r.nextInt(weight) + 1; int randomWeight = r.nextInt(weight) + 1;
LogUtil.d(TAG, "2、权重随机值:" + randomWeight);
System.out.print(" 2、权重随机值:" + randomWeight);
for (WeightBean weightBean : weightList) { for (WeightBean weightBean : weightList) {
randomWeight -= weightBean.getWeight(); randomWeight -= weightBean.getWeight();
if (randomWeight <= 0) { if (randomWeight <= 0) {
System.out.println(" 3、权重结果:" + weightBean.getType()); LogUtil.d(TAG, "3、权重结果:" + weightBean.getType());
return weightBean.getType(); return weightBean.getType();
} }
} }
...@@ -221,9 +225,10 @@ public class VedioAdingManager { ...@@ -221,9 +225,10 @@ public class VedioAdingManager {
int csjFullAdCount = AppConfig.csjFullAdCount; int csjFullAdCount = AppConfig.csjFullAdCount;
int hytechVedioAdCount = AppConfig.hytechVedioAdCount; int hytechVedioAdCount = AppConfig.hytechVedioAdCount;
int mintegralAdCount = AppConfig.mintegralAdCount; int mintegralAdCount = AppConfig.mintegralAdCount;
int shanhuAdCount = AppConfig.shanhuAdCount;
if (csjFullAdCount <= 0 && ylhAdCount <= 0 && if (csjFullAdCount <= 0 && ylhAdCount <= 0 &&
csjVedioAdCount <= 0 && hytechVedioAdCount <= 0 && csjVedioAdCount <= 0 && hytechVedioAdCount <= 0 &&
mintegralAdCount <= 0) { mintegralAdCount <= 0 && shanhuAdCount <= 0) {
// showToast("今日视频已看完,请明天再来吧"); // showToast("今日视频已看完,请明天再来吧");
return true; return true;
} }
...@@ -479,7 +484,7 @@ public class VedioAdingManager { ...@@ -479,7 +484,7 @@ public class VedioAdingManager {
isVedioAdDownload = true; isVedioAdDownload = true;
} }
}); });
}else if (TextUtils.equals(vedioAdType, Constant.SHANHU_VEDIO_AD)) { } else if (TextUtils.equals(vedioAdType, Constant.SHANHU_VEDIO_AD)) {
// 珊瑚激励视频 // 珊瑚激励视频
if (shanhuVedioAdManager == null) { if (shanhuVedioAdManager == null) {
if (activity == null) { if (activity == null) {
......
...@@ -11,16 +11,20 @@ import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd; ...@@ -11,16 +11,20 @@ import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
import com.mintegral.msdk.interstitialvideo.out.InterstitialVideoListener; import com.mintegral.msdk.interstitialvideo.out.InterstitialVideoListener;
import com.mintegral.msdk.interstitialvideo.out.MTGInterstitialVideoHandler; import com.mintegral.msdk.interstitialvideo.out.MTGInterstitialVideoHandler;
import com.mintegral.msdk.videocommon.download.NetStateOnReceive; import com.mintegral.msdk.videocommon.download.NetStateOnReceive;
import com.mints.highgold.MintsApplication;
import com.mints.highgold.common.AppConfig; import com.mints.highgold.common.AppConfig;
import com.mints.highgold.manager.MintegralManager; import com.mints.highgold.manager.MintegralManager;
import com.mints.highgold.manager.TTAdManagerHolder; import com.mints.highgold.manager.TTAdManagerHolder;
import com.mints.highgold.manager.TTNativeExpressManager; import com.mints.highgold.manager.TTNativeExpressManager;
import com.mints.highgold.utils.LogUtil;
/** /**
* Mintegral插屏视频 * Mintegral插屏视频
*/ */
public class MintegralInscreenVedioAdManager { public class MintegralInscreenVedioAdManager {
private static final String TAG = MintegralInscreenVedioAdManager.class.getSimpleName();
private static MintegralInscreenVedioAdManager _inst; private static MintegralInscreenVedioAdManager _inst;
private Activity activity; private Activity activity;
...@@ -63,7 +67,7 @@ public class MintegralInscreenVedioAdManager { ...@@ -63,7 +67,7 @@ public class MintegralInscreenVedioAdManager {
} else { } else {
AppConfig.isMintegralInscreenFlag = false; AppConfig.isMintegralInscreenFlag = false;
loadCsjFullAd(); loadCsjFullAd();
System.out.println("mcg __ MintegralInscreenVedioAdManager onVideoLoadFail noReady:"); LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadFail noReady:");
} }
} }
...@@ -82,7 +86,7 @@ public class MintegralInscreenVedioAdManager { ...@@ -82,7 +86,7 @@ public class MintegralInscreenVedioAdManager {
mMtgInterstitalVideoHandler.setInterstitialVideoListener(new InterstitialVideoListener() { mMtgInterstitalVideoHandler.setInterstitialVideoListener(new InterstitialVideoListener() {
@Override @Override
public void onLoadSuccess(String unitId) { public void onLoadSuccess(String unitId) {
System.out.println("mcg __ MintegralInscreenVedioAdManager onLoadSuccess"); LogUtil.d(TAG, "MintegralInscreenVedioAdManager onLoadSuccess");
AppConfig.isMintegralInscreenFlag = true; AppConfig.isMintegralInscreenFlag = true;
} }
...@@ -90,19 +94,19 @@ public class MintegralInscreenVedioAdManager { ...@@ -90,19 +94,19 @@ public class MintegralInscreenVedioAdManager {
@Override @Override
public void onVideoLoadSuccess(String unitId) { public void onVideoLoadSuccess(String unitId) {
AppConfig.isMintegralInscreenFlag = true; AppConfig.isMintegralInscreenFlag = true;
System.out.println("mcg __ MintegralInscreenVedioAdManager onVideoLoadSuccess"); LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadSuccess");
} }
@Override @Override
public void onVideoLoadFail(String errorMsg) { public void onVideoLoadFail(String errorMsg) {
AppConfig.isMintegralInscreenFlag = false; AppConfig.isMintegralInscreenFlag = false;
System.out.println("mcg __ MintegralInscreenVedioAdManager onVideoLoadFail errorMsg:" + errorMsg); LogUtil.d(TAG, "MintegralInscreenVedioAdManager onVideoLoadFail errorMsg:" + errorMsg);
} }
@Override @Override
public void onShowFail(String errorMsg) { public void onShowFail(String errorMsg) {
AppConfig.isMintegralInscreenFlag = false; AppConfig.isMintegralInscreenFlag = false;
System.out.println("mcg __ MintegralInscreenVedioAdManager onShowFail errorMsg:" + errorMsg); LogUtil.d(TAG, "MintegralInscreenVedioAdManager onShowFail errorMsg:" + errorMsg);
} }
@Override @Override
......
...@@ -189,7 +189,7 @@ public interface Constant { ...@@ -189,7 +189,7 @@ public interface Constant {
String AD_SOURCE_CSJFULL = "CSJFULL"; String AD_SOURCE_CSJFULL = "CSJFULL";
String AD_SOURCE_MINTEGRAL = "MINTEGRAL"; String AD_SOURCE_MINTEGRAL = "MINTEGRAL";
String AD_SOURCE_HYTECH = "HYTECH";//东方网 String AD_SOURCE_HYTECH = "HYTECH";//东方网
String AD_SOURCE_SHANHU = "SHANHU";//珊瑚 String AD_SOURCE_SHANHU = "CORAL";//珊瑚
// 页面 // 页面
int PAGE_ONE = 1; int PAGE_ONE = 1;
......
...@@ -12,6 +12,7 @@ import com.amap.api.location.AMapLocationListener; ...@@ -12,6 +12,7 @@ import com.amap.api.location.AMapLocationListener;
import com.mints.highgold.MintsApplication; import com.mints.highgold.MintsApplication;
import com.mints.highgold.common.Constant; import com.mints.highgold.common.Constant;
import com.mints.highgold.mvp.model.LocationBean; import com.mints.highgold.mvp.model.LocationBean;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.SPUtil; import com.mints.highgold.utils.SPUtil;
import com.mints.library.utils.json.JsonUtil; import com.mints.library.utils.json.JsonUtil;
...@@ -25,6 +26,8 @@ import java.lang.ref.WeakReference; ...@@ -25,6 +26,8 @@ import java.lang.ref.WeakReference;
*/ */
public class AmapLocationManager { public class AmapLocationManager {
private static final String TAG = AmapLocationManager.class.getSimpleName();
private static volatile AmapLocationManager _inst; private static volatile AmapLocationManager _inst;
private Context c; private Context c;
...@@ -207,12 +210,12 @@ public class AmapLocationManager { ...@@ -207,12 +210,12 @@ public class AmapLocationManager {
// dlch.put(Constant.LOCATION_DATA, lb); // dlch.put(Constant.LOCATION_DATA, lb);
if(lb!=null){ if(lb!=null){
spUtil.putString(Constant.LOCATION_DATA, JsonUtil.toJson(lb)); spUtil.putString(Constant.LOCATION_DATA, JsonUtil.toJson(lb));
System.out.println("mcg__ location-->" + JsonUtil.toJson(lb)); LogUtil.d(TAG, "location-->" + JsonUtil.toJson(lb));
} }
} else { } else {
System.out.println("mcg__ location--> 异常"); LogUtil.d(TAG, "location--> 异常" );
} }
// else if (loc != null && loc.getErrorCode() == 12) { // else if (loc != null && loc.getErrorCode() == 12) {
......
...@@ -61,18 +61,15 @@ ...@@ -61,18 +61,15 @@
// AdManager.getInstance(context).init(activity, APPID, UserManager.getInstance().getUserID(), APPKEY, cimei, new CommonCallBack() { // AdManager.getInstance(context).init(activity, APPID, UserManager.getInstance().getUserID(), APPKEY, cimei, new CommonCallBack() {
// @Override // @Override
// public void onSuccess(String s) { // public void onSuccess(String s) {
// System.out.println("mcg __ 愉悦推:onSuccess -->"+s);
// //
// } // }
// //
// @Override // @Override
// public void onFailure(String s) { // public void onFailure(String s) {
// System.out.println("mcg __ 愉悦推:onFailure -->"+s);
// } // }
// //
// @Override // @Override
// public void onFailure() { // public void onFailure() {
// System.out.println("mcg __ 愉悦推:onFailure end");
// } // }
// }); // });
// } // }
......
...@@ -72,12 +72,14 @@ public class UserTaskMsgBean implements Serializable { ...@@ -72,12 +72,14 @@ public class UserTaskMsgBean implements Serializable {
private int vedioplan_liyan_vedio_rate; private int vedioplan_liyan_vedio_rate;
private int vedioplan_hytech_vedio_rate; private int vedioplan_hytech_vedio_rate;
private int vedioplan_mintegral_vedio_rate; private int vedioplan_mintegral_vedio_rate;
private int vedioplan_coral_vedio_rate;
private int vedioplan_csj_vedio_surplus; private int vedioplan_csj_vedio_surplus;
private int vedioplan_liyan_vedio_surplus; private int vedioplan_liyan_vedio_surplus;
private int vedioplan_lyh_vedio_surplus; private int vedioplan_lyh_vedio_surplus;
private int vedioplan_csj_full_screen_video_surplus; private int vedioplan_csj_full_screen_video_surplus;
private int vedioplan_hytech_vedio_surplus; private int vedioplan_hytech_vedio_surplus;
private int vedioplan_mintegral_vedio_surplus; private int vedioplan_mintegral_vedio_surplus;
private int vedioplan_coral_vedio_surplus;
public int getVedioplan_hytech_vedio_rate() { public int getVedioplan_hytech_vedio_rate() {
return vedioplan_hytech_vedio_rate; return vedioplan_hytech_vedio_rate;
...@@ -391,4 +393,20 @@ public class UserTaskMsgBean implements Serializable { ...@@ -391,4 +393,20 @@ public class UserTaskMsgBean implements Serializable {
public String getNiceUrl() { public String getNiceUrl() {
return niceUrl; return niceUrl;
} }
public int getVedioplan_coral_vedio_rate() {
return vedioplan_coral_vedio_rate;
}
public void setVedioplan_coral_vedio_rate(int vedioplan_coral_vedio_rate) {
this.vedioplan_coral_vedio_rate = vedioplan_coral_vedio_rate;
}
public int getVedioplan_coral_vedio_surplus() {
return vedioplan_coral_vedio_surplus;
}
public void setVedioplan_coral_vedio_surplus(int vedioplan_coral_vedio_surplus) {
this.vedioplan_coral_vedio_surplus = vedioplan_coral_vedio_surplus;
}
} }
package com.mints.highgold.mvp.presenters;
import android.app.Activity;
import com.mints.highgold.MintsApplication;
import com.mints.highgold.mvp.model.BaseResponse;
import com.mints.highgold.mvp.views.MintegralVedioAdManagerView;
import com.mints.highgold.mvp.views.ShanhuVedioAdManagerView;
import com.mints.highgold.net.LoanService;
import com.mints.library.net.neterror.BaseSubscriber;
import com.mints.library.net.neterror.Throwable;
import java.util.HashMap;
import rx.Subscription;
import rx.android.schedulers.AndroidSchedulers;
public class ShanhuVedioAdPresenter extends BasePresenter<ShanhuVedioAdManagerView> {
private MintsApplication loanApplication;
private LoanService loanService;
private Subscription subscription;
public void reportAddCoinMsg(Activity activity, HashMap<String, Object> vo) {
if (activity == null)
return;
loanApplication = (MintsApplication) activity.getApplication();
loanService = loanApplication.getLoanService();
subscription = loanService.reportAddCoinMsg(vo)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(loanApplication.defaultSubscribeScheduler())
.subscribe(new BaseSubscriber<BaseResponse<Object>>() {
@Override
public void onCompleted() {
}
@Override
public void onError(Throwable e) {
// view.checkLYContextSuc(false);
}
@Override
public void onNext(BaseResponse<Object> baseResponse) {
}
});
}
public void dispose() {
loanService = null;
loanApplication = null;
if (subscription != null && !subscription.isUnsubscribed()) {
subscription.unsubscribe();
}
}
}
...@@ -158,7 +158,7 @@ public class VersionUpdatePresenter { ...@@ -158,7 +158,7 @@ public class VersionUpdatePresenter {
if (granted) { if (granted) {
appFileUrl = bean.getUrl(); appFileUrl = bean.getUrl();
} else { } else {
appFileUrl = "https://mints-gs.oss-cn-beijing.aliyuncs.com/pkg/mints.apk"; appFileUrl = "";
} }
View v_details = View.inflate(activity, R.layout.view_dialog_update, null); View v_details = View.inflate(activity, R.layout.view_dialog_update, null);
......
package com.mints.highgold.mvp.views;
public interface ShanhuVedioAdManagerView extends BaseView {
}
...@@ -214,7 +214,6 @@ public class EraseActivity extends BaseActivity ...@@ -214,7 +214,6 @@ public class EraseActivity extends BaseActivity
blEarseWebview.registerHandler("erasegetChannelCardMsg", new BridgeHandler() { blEarseWebview.registerHandler("erasegetChannelCardMsg", new BridgeHandler() {
@Override @Override
public void handler(String data, CallBackFunction function) { public void handler(String data, CallBackFunction function) {
System.out.println("mcg getChannelCardMsg Js:-->>" + data);
//{"title":"40金币","coin":40,"key":"t4"} //{"title":"40金币","coin":40,"key":"t4"}
TurntableBean turntableBean = JsonUtil.parseJson(data, TurntableBean.class); TurntableBean turntableBean = JsonUtil.parseJson(data, TurntableBean.class);
...@@ -234,7 +233,6 @@ public class EraseActivity extends BaseActivity ...@@ -234,7 +233,6 @@ public class EraseActivity extends BaseActivity
readyGoForResult(AwardActivity.class, ERASE_REQUEST_CODE, bundle); readyGoForResult(AwardActivity.class, ERASE_REQUEST_CODE, bundle);
} }
} }
// System.out.println("getNum-->" + androidCallJsGetFinishcount());
} }
}); });
blEarseWebview.setDefaultHandler(new DefaultHandler() { blEarseWebview.setDefaultHandler(new DefaultHandler() {
......
...@@ -350,13 +350,13 @@ public class HytechVedioActivity extends BaseActivity ...@@ -350,13 +350,13 @@ public class HytechVedioActivity extends BaseActivity
* 点击的开始位置 * 点击的开始位置
*/ */
case MotionEvent.ACTION_DOWN: case MotionEvent.ACTION_DOWN:
System.out.println("mcg__ 起始位置:(" + event.getX() + "," + event.getY()); // System.out.println("mcg__ 起始位置:(" + event.getX() + "," + event.getY());
break; break;
/** /**
* 离开屏幕的位置 * 离开屏幕的位置
*/ */
case MotionEvent.ACTION_UP: case MotionEvent.ACTION_UP:
System.out.println("mcg__ 结束位置:(" + event.getX() + "," + event.getY()); // System.out.println("mcg__ 结束位置:(" + event.getX() + "," + event.getY());
break; break;
default: default:
break; break;
......
...@@ -114,11 +114,6 @@ public class MainActivity extends BaseActivity implements MainView { ...@@ -114,11 +114,6 @@ public class MainActivity extends BaseActivity implements MainView {
tabIvLoan.setSelected(true); tabIvLoan.setSelected(true);
tabTvLoan.setSelected(true); tabTvLoan.setSelected(true);
} }
// System.out.println("mcg __ test:"+NetUtils.getDomain("http://api.mints-id.com/pro-gs-api/"));
// HytechVedioAdManager.getInstance(this).loanHytechAd(0,"","");
// mainPresenter = new MainPresenter();
// mainPresenter.attachView(this);
} }
@Override @Override
......
...@@ -437,7 +437,6 @@ public class RedboxActivity extends BaseActivity implements RedboxView { ...@@ -437,7 +437,6 @@ public class RedboxActivity extends BaseActivity implements RedboxView {
timer.setOnCountDownTimerListener(new OnCountDownTimerListener() { timer.setOnCountDownTimerListener(new OnCountDownTimerListener() {
@Override @Override
public void onTick(long millisUntilFinished) { public void onTick(long millisUntilFinished) {
// System.out.println("mcg __ redbox -->" + TimeRender.ms2HMS((int) (millisUntilFinished)));
if (!RedboxActivity.this.isFinishing()) { if (!RedboxActivity.this.isFinishing()) {
if (tvredBox != null) { if (tvredBox != null) {
......
...@@ -213,7 +213,6 @@ public class TurntableActivity extends BaseActivity ...@@ -213,7 +213,6 @@ public class TurntableActivity extends BaseActivity
blTurntableWebview.registerHandler("getTurnResult", new BridgeHandler() { blTurntableWebview.registerHandler("getTurnResult", new BridgeHandler() {
@Override @Override
public void handler(String data, CallBackFunction function) { public void handler(String data, CallBackFunction function) {
// System.out.println("mcg turn Js:-->>" + data);
//{"title":"40金币","coin":40,"key":"t4"} //{"title":"40金币","coin":40,"key":"t4"}
TurntableBean turntableBean = JsonUtil.parseJson(data, TurntableBean.class); TurntableBean turntableBean = JsonUtil.parseJson(data, TurntableBean.class);
...@@ -232,7 +231,6 @@ public class TurntableActivity extends BaseActivity ...@@ -232,7 +231,6 @@ public class TurntableActivity extends BaseActivity
bundle.putString(Constant.MAIN_EXTRA_ID, turntableBeanKey); bundle.putString(Constant.MAIN_EXTRA_ID, turntableBeanKey);
readyGoForResult(AwardActivity.class, TURNTABLE_REQUEST_CODE, bundle); readyGoForResult(AwardActivity.class, TURNTABLE_REQUEST_CODE, bundle);
} }
// System.out.println("getNum-->" + androidCallJsGetFinishcount());
} }
}); });
blTurntableWebview.setDefaultHandler(new DefaultHandler() { blTurntableWebview.setDefaultHandler(new DefaultHandler() {
...@@ -390,8 +388,6 @@ public class TurntableActivity extends BaseActivity ...@@ -390,8 +388,6 @@ public class TurntableActivity extends BaseActivity
@Override @Override
public void onADClick() {//激励视频广告被点击 public void onADClick() {//激励视频广告被点击
// Map<String, String> map = rewardVideoAD.getExts(); // Map<String, String> map = rewardVideoAD.getExts();
// String clickUrl = map.get("clickUrl");
// System.out.println("mcg __ clickUrl:" + clickUrl);
} }
@Override @Override
......
...@@ -121,7 +121,6 @@ public class WebActivity extends BaseActivity { ...@@ -121,7 +121,6 @@ public class WebActivity extends BaseActivity {
mBrowserLayout.getWebView().setWebViewClient(new WebViewClient() { mBrowserLayout.getWebView().setWebViewClient(new WebViewClient() {
@Override @Override
public boolean shouldOverrideUrlLoading(WebView view, String url) { public boolean shouldOverrideUrlLoading(WebView view, String url) {
// System.out.println("mcg __ url:"+url);
if (url.contains(".apk") || url.contains("pgyer")) { if (url.contains(".apk") || url.contains("pgyer")) {
Uri uri = Uri.parse(url); Uri uri = Uri.parse(url);
......
...@@ -60,6 +60,7 @@ import com.mints.highgold.ui.widgets.WaterView; ...@@ -60,6 +60,7 @@ import com.mints.highgold.ui.widgets.WaterView;
import com.mints.highgold.ui.widgets.countdowntimer.CountDownTimerSupport; import com.mints.highgold.ui.widgets.countdowntimer.CountDownTimerSupport;
import com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener; import com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener;
import com.mints.highgold.ui.widgets.refresh.CustomRefreshLayout; import com.mints.highgold.ui.widgets.refresh.CustomRefreshLayout;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.SPUtil; import com.mints.highgold.utils.SPUtil;
import com.mints.highgold.utils.SpanUtils; import com.mints.highgold.utils.SpanUtils;
import com.mints.highgold.utils.rxutil.CommonRxTask; import com.mints.highgold.utils.rxutil.CommonRxTask;
...@@ -96,11 +97,11 @@ public class MainFragment extends BaseFragment ...@@ -96,11 +97,11 @@ public class MainFragment extends BaseFragment
IGameAdCallback, IGameAdCallback,
IGameExitInfoCallback { IGameExitInfoCallback {
private static final String TAG = MainFragment.class.getSimpleName();
public static final String AIP_GAME_URL = "api/game/add";//退出游戏、游戏关卡回调 public static final String AIP_GAME_URL = "api/game/add";//退出游戏、游戏关卡回调
public static final String STASTICIS_GAME_URL = "stasticis/game/add";//点击游戏 public static final String STASTICIS_GAME_URL = "stasticis/game/add";//点击游戏
private static final String TAG = GameFragment.class.getSimpleName();
@Bind(R.id.fl_main_ttbanner) @Bind(R.id.fl_main_ttbanner)
FrameLayout flMainTtbanner; FrameLayout flMainTtbanner;
@Bind(R.id.main_main_crl_refresh) @Bind(R.id.main_main_crl_refresh)
...@@ -479,27 +480,29 @@ public class MainFragment extends BaseFragment ...@@ -479,27 +480,29 @@ public class MainFragment extends BaseFragment
// data.setVedioplan_lyh_vedio_rate(0); // data.setVedioplan_lyh_vedio_rate(0);
// data.setVedioplan_csj_full_screen_video_rate(0); // data.setVedioplan_csj_full_screen_video_rate(0);
// data.setVedioplan_hytech_vedio_rate(0); // data.setVedioplan_hytech_vedio_rate(0);
// data.setVedioplan_mintegral_vedio_rate(5); // data.setVedioplan_mintegral_vedio_rate(0);
// data.setVedioplan_coral_vedio_rate(5);
// //
// data.setVedioplan_csj_vedio_surplus(0); // data.setVedioplan_csj_vedio_surplus(0);
// data.setVedioplan_lyh_vedio_surplus(0); // data.setVedioplan_lyh_vedio_surplus(0);
// data.setVedioplan_csj_full_screen_video_surplus(0); // data.setVedioplan_csj_full_screen_video_surplus(0);
// data.setVedioplan_hytech_vedio_surplus(0); // data.setVedioplan_hytech_vedio_surplus(0);
// data.setVedioplan_mintegral_vedio_surplus(20); // data.setVedioplan_mintegral_vedio_surplus(0);
// data.setVedioplan_coral_vedio_surplus(20);
// 设置随机广告权重 // 设置随机广告权重
if (vedioAdingManager != null) { if (vedioAdingManager != null) {
vedioAdingManager.initAdWeight(data.getVedioplan_csj_vedio_rate(), data.getVedioplan_lyh_vedio_rate(), data.getVedioplan_csj_full_screen_video_rate(), data.getVedioplan_hytech_vedio_rate(), data.getVedioplan_mintegral_vedio_rate()); vedioAdingManager.initAdWeight(data.getVedioplan_csj_vedio_rate(), data.getVedioplan_lyh_vedio_rate(), data.getVedioplan_csj_full_screen_video_rate(), data.getVedioplan_hytech_vedio_rate(), data.getVedioplan_mintegral_vedio_rate(),data.getVedioplan_coral_vedio_rate());
} }
System.out.println("mcg __ 首页权重值:csjVedioWeight:" + data.getVedioplan_csj_vedio_rate() + " ylhWeight:" + data.getVedioplan_lyh_vedio_rate() + " csjFullWeight:" + data.getVedioplan_csj_full_screen_video_rate() + " hytechVedioAdWeight:" + data.getVedioplan_hytech_vedio_rate() + " mintegralVedioAdWeight:" + data.getVedioplan_mintegral_vedio_rate()); LogUtil.d(TAG, "首页权重值:csjVedioWeight:" + data.getVedioplan_csj_vedio_rate() + " ylhWeight:" + data.getVedioplan_lyh_vedio_rate() + " csjFullWeight:" + data.getVedioplan_csj_full_screen_video_rate() + " hytechVedioAdWeight:" + data.getVedioplan_hytech_vedio_rate() + " mintegralVedioAdWeight:" + data.getVedioplan_mintegral_vedio_rate()+ " shanhuVedioAdWeight:" + data.getVedioplan_coral_vedio_rate());
// 广告完成数 // 广告完成数
AppConfig.csjVedioAdCount = data.getVedioplan_csj_vedio_surplus(); AppConfig.csjVedioAdCount = data.getVedioplan_csj_vedio_surplus();
AppConfig.ylhAdCount = data.getVedioplan_lyh_vedio_surplus(); AppConfig.ylhAdCount = data.getVedioplan_lyh_vedio_surplus();
AppConfig.csjFullAdCount = data.getVedioplan_csj_full_screen_video_surplus(); AppConfig.csjFullAdCount = data.getVedioplan_csj_full_screen_video_surplus();
AppConfig.hytechVedioAdCount = data.getVedioplan_hytech_vedio_surplus(); AppConfig.hytechVedioAdCount = data.getVedioplan_hytech_vedio_surplus();
AppConfig.mintegralAdCount = data.getVedioplan_mintegral_vedio_surplus(); AppConfig.mintegralAdCount = data.getVedioplan_mintegral_vedio_surplus();
System.out.println("mcg __ 首页广告完成数:csjVedioAdCount:" + data.getVedioplan_csj_vedio_surplus() + " ylhAdCount:" + data.getVedioplan_lyh_vedio_surplus() + " csjFullAdCount:" + data.getVedioplan_csj_full_screen_video_surplus() + " hytechVedioAdCount:" + data.getVedioplan_hytech_vedio_surplus() + " mintegralVedioAdCount:" + data.getVedioplan_mintegral_vedio_surplus()); AppConfig.shanhuAdCount = data.getVedioplan_coral_vedio_surplus();
LogUtil.d(TAG, "首页广告完成数:csjVedioAdCount:" + data.getVedioplan_csj_vedio_surplus() + " ylhAdCount:" + data.getVedioplan_lyh_vedio_surplus() + " csjFullAdCount:" + data.getVedioplan_csj_full_screen_video_surplus() + " hytechVedioAdCount:" + data.getVedioplan_hytech_vedio_surplus() + " mintegralVedioAdCount:" + data.getVedioplan_mintegral_vedio_surplus()+ " shanhuVedioAdCount:" + data.getVedioplan_coral_vedio_surplus());
AppConfig.yilanVedioTime = data.getRedPacketSecond(); AppConfig.yilanVedioTime = data.getRedPacketSecond();
userManager.setAdShowFlag(data.isAdFlag()); userManager.setAdShowFlag(data.isAdFlag());
...@@ -823,7 +826,6 @@ public class MainFragment extends BaseFragment ...@@ -823,7 +826,6 @@ public class MainFragment extends BaseFragment
vo.put("pkg", Constant.MINTS_PKG_NAME); vo.put("pkg", Constant.MINTS_PKG_NAME);
loanPresenter.gameAdd(STASTICIS_GAME_URL, eventTypeClick, vo); loanPresenter.gameAdd(STASTICIS_GAME_URL, eventTypeClick, vo);
} }
Log.d(TAG, "cmgamesdk_mainF_gameClickCallback_默认游戏中心页面,点击游戏试,触发回调----" + gameID + "----" + gameName);
// } // }
} }
...@@ -856,7 +858,6 @@ public class MainFragment extends BaseFragment ...@@ -856,7 +858,6 @@ public class MainFragment extends BaseFragment
} }
Log.d(TAG, "cmgamesdk_mainF_gamePlayTimeCallback—mainfragment_点击游戏右上角或物理返回键,退出游戏时触发回调,并返回游戏时长----" + "play game :" + gameID + "playTimeInSeconds : " + playTimeInSeconds);
// } // }
} }
...@@ -873,7 +874,6 @@ public class MainFragment extends BaseFragment ...@@ -873,7 +874,6 @@ public class MainFragment extends BaseFragment
@Override @Override
public void onGameAdAction(String gameId, int adType, int adAction) { public void onGameAdAction(String gameId, int adType, int adAction) {
// if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_LOAN) { // if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_LOAN) {
Log.d(TAG, "cmgamesdk_mainF_onGameAdAction_广告曝光/点击回调----" + "onGameAdAction gameID: " + gameID + " adType: " + adType + " adAction: " + adAction);
if (userConfig != null) { if (userConfig != null) {
if (adAction != 1) { if (adAction != 1) {
HashMap<String, Object> vo = new HashMap<>(); HashMap<String, Object> vo = new HashMap<>();
...@@ -921,7 +921,6 @@ public class MainFragment extends BaseFragment ...@@ -921,7 +921,6 @@ public class MainFragment extends BaseFragment
vo.put("pkg", Constant.MINTS_PKG_NAME); vo.put("pkg", Constant.MINTS_PKG_NAME);
loanPresenter.gameAdd(AIP_GAME_URL, Constant.EVENT_TYPE_GAMEINFO, vo); loanPresenter.gameAdd(AIP_GAME_URL, Constant.EVENT_TYPE_GAMEINFO, vo);
} }
Log.d(TAG, "cmgamesdk_mainF_gameExitInfoCallback_返回游戏数据(json格式),如:每玩一关,返回关卡数----" + "gameExitInfoCallback: " + gameExitInfo);
// } // }
} }
...@@ -1372,7 +1371,7 @@ public class MainFragment extends BaseFragment ...@@ -1372,7 +1371,7 @@ public class MainFragment extends BaseFragment
public void vedioAdingListenerError(String adType) { public void vedioAdingListenerError(String adType) {
showToast("加载超时,请休息一下"); showToast("加载超时,请休息一下");
hideLoading(); hideLoading();
System.out.println("mcg __ VedioAdingManager: vedioAdingListenerError--adType:" + adType); LogUtil.d(TAG, "VedioAdingManager: vedioAdingListenerError--adType:" + adType);
// showToast("视频异常,请重试"); // showToast("视频异常,请重试");
} }
...@@ -1387,21 +1386,19 @@ public class MainFragment extends BaseFragment ...@@ -1387,21 +1386,19 @@ public class MainFragment extends BaseFragment
public void vedioAdingListenerError(String adType) { public void vedioAdingListenerError(String adType) {
showToast("加载超时,请休息一下"); showToast("加载超时,请休息一下");
hideLoading(); hideLoading();
LogUtil.d(TAG, "内部 vedioAdingListenerError adType:" + adType);
System.out.println("mcg __ 内部 vedioAdingListenerError adType:" + adType);
} }
@Override @Override
public void vedioAdingListenerFail(String adType) { public void vedioAdingListenerFail(String adType) {
hideLoading(); hideLoading();
showToast("视频加载异常,请重试!"); showToast("视频加载异常,请重试!");
LogUtil.d(TAG, "内部 vedioAdingListenerFail adType:" + adType);
System.out.println("mcg __ 内部 vedioAdingListenerFail adType:" + adType);
} }
@Override @Override
public void vedioAdingListenerSuccess(String adType) { public void vedioAdingListenerSuccess(String adType) {
System.out.println("mcg __ 内部 vedioAdingListenerSuccess adType:" + adType); LogUtil.d(TAG, "内部 vedioAdingListenerSuccess adType:" + adType);
hideLoading(); hideLoading();
vedioAdingSuccess(adType, carrierType); vedioAdingSuccess(adType, carrierType);
...@@ -1414,7 +1411,7 @@ public class MainFragment extends BaseFragment ...@@ -1414,7 +1411,7 @@ public class MainFragment extends BaseFragment
public void vedioAdingListenerSuccess(String adType) { public void vedioAdingListenerSuccess(String adType) {
hideLoading(); hideLoading();
// showToast("成功了"); // showToast("成功了");
System.out.println("mcg __ VedioAdingManager: vedioAdingListenerSuccess --adType:" + adType + " --- 是否点击下载isVedioAdDownload=" + vedioAdingManager.isVedioAdDownload()); LogUtil.d(TAG, "VedioAdingManager: vedioAdingListenerSuccess --adType:" + adType + " --- 是否点击下载isVedioAdDownload=" + vedioAdingManager.isVedioAdDownload());
vedioAdingSuccess(adType, carrierType); vedioAdingSuccess(adType, carrierType);
} }
...@@ -1432,12 +1429,15 @@ public class MainFragment extends BaseFragment ...@@ -1432,12 +1429,15 @@ public class MainFragment extends BaseFragment
if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD) || if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD) ||
TextUtils.equals(adType, Constant.CSJ_VEDIO_AD) || TextUtils.equals(adType, Constant.CSJ_VEDIO_AD) ||
TextUtils.equals(adType, Constant.CSJ_FULL_AD) || TextUtils.equals(adType, Constant.CSJ_FULL_AD) ||
TextUtils.equals(adType, Constant.SHANHU_VEDIO_AD) ||
TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) { TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) {
if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD)) { if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD)) {
AD_SOURCE = Constant.AD_SOURCE_YLH; AD_SOURCE = Constant.AD_SOURCE_YLH;
} else if (TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) { } else if (TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) {
AD_SOURCE = Constant.AD_SOURCE_MINTEGRAL; AD_SOURCE = Constant.AD_SOURCE_MINTEGRAL;
} else if (TextUtils.equals(adType, Constant.SHANHU_VEDIO_AD)) {
AD_SOURCE = Constant.AD_SOURCE_SHANHU;
} else { } else {
AD_SOURCE = Constant.AD_SOURCE_CSJ; AD_SOURCE = Constant.AD_SOURCE_CSJ;
} }
......
...@@ -57,6 +57,7 @@ import com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener; ...@@ -57,6 +57,7 @@ import com.mints.highgold.ui.widgets.countdowntimer.OnCountDownTimerListener;
import com.mints.highgold.ui.widgets.refresh.CustomRefreshLayout; import com.mints.highgold.ui.widgets.refresh.CustomRefreshLayout;
import com.mints.highgold.utils.AppPackageUsageUtils; import com.mints.highgold.utils.AppPackageUsageUtils;
import com.mints.highgold.utils.ImageUtil; import com.mints.highgold.utils.ImageUtil;
import com.mints.highgold.utils.LogUtil;
import com.mints.highgold.utils.MD5; import com.mints.highgold.utils.MD5;
import com.mints.highgold.utils.SPUtil; import com.mints.highgold.utils.SPUtil;
import com.mints.highgold.utils.SpanUtils; import com.mints.highgold.utils.SpanUtils;
...@@ -92,6 +93,8 @@ import cn.sharesdk.wechat.friends.Wechat; ...@@ -92,6 +93,8 @@ import cn.sharesdk.wechat.friends.Wechat;
public class VersusFragment extends BaseFragment public class VersusFragment extends BaseFragment
implements VersusView, CustomRefreshLayout.OnRefreshListener, PlatformActionListener, OnLoginListener { implements VersusView, CustomRefreshLayout.OnRefreshListener, PlatformActionListener, OnLoginListener {
private static final String TAG = VersusFragment.class.getSimpleName();
@Bind(R.id.main_versus_crl_refresh) @Bind(R.id.main_versus_crl_refresh)
SmartRefreshLayout mainVersusCrlRefresh; SmartRefreshLayout mainVersusCrlRefresh;
@Bind(R.id.tv_versus_video_gold) @Bind(R.id.tv_versus_video_gold)
...@@ -1343,8 +1346,6 @@ public class VersusFragment extends BaseFragment ...@@ -1343,8 +1346,6 @@ public class VersusFragment extends BaseFragment
@Override @Override
public void onTick(long millisUntilFinished) { public void onTick(long millisUntilFinished) {
if (getActivity() != null && !getActivity().isFinishing()) { if (getActivity() != null && !getActivity().isFinishing()) {
// System.out.println("mcg __ versus health type:" + type);
if (type == 1) { if (type == 1) {
llVersusBreath.setVisibility(View.GONE); llVersusBreath.setVisibility(View.GONE);
viewVersusBreath.setVisibility(View.GONE); viewVersusBreath.setVisibility(View.GONE);
...@@ -1388,8 +1389,6 @@ public class VersusFragment extends BaseFragment ...@@ -1388,8 +1389,6 @@ public class VersusFragment extends BaseFragment
@Override @Override
public void onFinish() { public void onFinish() {
if (getActivity() != null && !getActivity().isFinishing()) { if (getActivity() != null && !getActivity().isFinishing()) {
// System.out.println("mcg __ versus onFinish type:" + type);
if (type == 1) { if (type == 1) {
tvVersusBreath.setText("立即领取"); tvVersusBreath.setText("立即领取");
tvVersusBreath.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold)); tvVersusBreath.setBackground(getResources().getDrawable(R.drawable.shape_tv_gold));
...@@ -2183,7 +2182,7 @@ public class VersusFragment extends BaseFragment ...@@ -2183,7 +2182,7 @@ public class VersusFragment extends BaseFragment
@Override @Override
public void vedioAdingListenerError(String adType) { public void vedioAdingListenerError(String adType) {
hideLoading(); hideLoading();
System.out.println("mcg __ VedioAdingManager: vedioAdingListenerError--adType:" + adType); LogUtil.d(TAG, "VedioAdingManager: vedioAdingListenerError--adType:" + adType);
// showToast("视频异常,请重试"); // showToast("视频异常,请重试");
} }
...@@ -2191,7 +2190,7 @@ public class VersusFragment extends BaseFragment ...@@ -2191,7 +2190,7 @@ public class VersusFragment extends BaseFragment
@Override @Override
public void vedioAdingListenerFail(String adType) { public void vedioAdingListenerFail(String adType) {
// showToast("人工添加,第一次加载失败"); // showToast("人工添加,第一次加载失败");
System.out.println("mcg __ Versus VedioAdingManager: vedioAdingListenerFail"); LogUtil.d(TAG, "Versus VedioAdingManager: vedioAdingListenerFail");
// hideLoading(); // hideLoading();
vedioAdingManager.loadFailAding(bean); vedioAdingManager.loadFailAding(bean);
...@@ -2200,21 +2199,19 @@ public class VersusFragment extends BaseFragment ...@@ -2200,21 +2199,19 @@ public class VersusFragment extends BaseFragment
public void vedioAdingListenerError(String adType) { public void vedioAdingListenerError(String adType) {
showToast("加载超时,请休息一下"); showToast("加载超时,请休息一下");
hideLoading(); hideLoading();
LogUtil.d(TAG, "内部 vedioAdingListenerError adType:" + adType);
System.out.println("mcg __ 内部 vedioAdingListenerError adType:" + adType);
} }
@Override @Override
public void vedioAdingListenerFail(String adType) { public void vedioAdingListenerFail(String adType) {
hideLoading(); hideLoading();
showToast("视频加载异常,请重试!"); showToast("视频加载异常,请重试!");
LogUtil.d(TAG, "内部 vedioAdingListenerFail adType:" + adType);
System.out.println("mcg __ 内部 vedioAdingListenerFail adType:" + adType);
} }
@Override @Override
public void vedioAdingListenerSuccess(String adType) { public void vedioAdingListenerSuccess(String adType) {
System.out.println("mcg __ 内部 vedioAdingListenerSuccess adType:" + adType); LogUtil.d(TAG, "内部 vedioAdingListenerSuccess adType:" + adType);
hideLoading(); hideLoading();
vedioAdingSuccess(adType, carrierType); vedioAdingSuccess(adType, carrierType);
...@@ -2227,7 +2224,7 @@ public class VersusFragment extends BaseFragment ...@@ -2227,7 +2224,7 @@ public class VersusFragment extends BaseFragment
public void vedioAdingListenerSuccess(String adType) { public void vedioAdingListenerSuccess(String adType) {
hideLoading(); hideLoading();
// showToast("成功了"); // showToast("成功了");
System.out.println("mcg __ Versus VedioAdingManager: vedioAdingListenerSuccess --- 是否点击下载isVedioAdDownload=" + vedioAdingManager.isVedioAdDownload()); LogUtil.d(TAG, "Versus VedioAdingManager: vedioAdingListenerSuccess --- 是否点击下载isVedioAdDownload=" + vedioAdingManager.isVedioAdDownload());
vedioAdingSuccess(adType, carrierType); vedioAdingSuccess(adType, carrierType);
} }
...@@ -2245,12 +2242,15 @@ public class VersusFragment extends BaseFragment ...@@ -2245,12 +2242,15 @@ public class VersusFragment extends BaseFragment
if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD) || if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD) ||
TextUtils.equals(adType, Constant.CSJ_VEDIO_AD) || TextUtils.equals(adType, Constant.CSJ_VEDIO_AD) ||
TextUtils.equals(adType, Constant.CSJ_FULL_AD) || TextUtils.equals(adType, Constant.CSJ_FULL_AD) ||
TextUtils.equals(adType, Constant.SHANHU_VEDIO_AD) ||
TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) { TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) {
if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD)) { if (TextUtils.equals(adType, Constant.YLH_VEDIO_AD)) {
AD_SOURCE = Constant.AD_SOURCE_YLH; AD_SOURCE = Constant.AD_SOURCE_YLH;
} else if (TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) { } else if (TextUtils.equals(adType, Constant.MINTEGRAL_VEDIO_AD)) {
AD_SOURCE = Constant.AD_SOURCE_MINTEGRAL; AD_SOURCE = Constant.AD_SOURCE_MINTEGRAL;
} else if (TextUtils.equals(adType, Constant.SHANHU_VEDIO_AD)) {
AD_SOURCE = Constant.AD_SOURCE_SHANHU;
} else { } else {
AD_SOURCE = Constant.AD_SOURCE_CSJ; AD_SOURCE = Constant.AD_SOURCE_CSJ;
} }
......
...@@ -3,6 +3,7 @@ package com.mints.highgold.ui.fragment; ...@@ -3,6 +3,7 @@ package com.mints.highgold.ui.fragment;
import android.support.v4.app.FragmentTransaction; import android.support.v4.app.FragmentTransaction;
import android.text.TextUtils; import android.text.TextUtils;
import com.mints.highgold.MintsApplication;
import com.mints.highgold.R; import com.mints.highgold.R;
import com.mints.highgold.ad.inscreen.InsertScreenAdManager; import com.mints.highgold.ad.inscreen.InsertScreenAdManager;
import com.mints.highgold.common.AppConfig; import com.mints.highgold.common.AppConfig;
...@@ -10,6 +11,7 @@ import com.mints.highgold.mvp.presenters.YilanVedioPresenter; ...@@ -10,6 +11,7 @@ import com.mints.highgold.mvp.presenters.YilanVedioPresenter;
import com.mints.highgold.mvp.views.YilanVedioView; import com.mints.highgold.mvp.views.YilanVedioView;
import com.mints.highgold.ui.fragment.base.BaseFragment; import com.mints.highgold.ui.fragment.base.BaseFragment;
import com.mints.highgold.ui.widgets.CountDownVedioView; import com.mints.highgold.ui.widgets.CountDownVedioView;
import com.mints.highgold.utils.LogUtil;
import com.yilan.sdk.player.UserCallback; import com.yilan.sdk.player.UserCallback;
import com.yilan.sdk.player.entity.PlayData; import com.yilan.sdk.player.entity.PlayData;
import com.yilan.sdk.player.utils.Constant; import com.yilan.sdk.player.utils.Constant;
...@@ -31,6 +33,8 @@ import butterknife.Bind; ...@@ -31,6 +33,8 @@ import butterknife.Bind;
public class YilanVedioFragment extends BaseFragment public class YilanVedioFragment extends BaseFragment
implements YilanVedioView, AdVideoCallback { implements YilanVedioView, AdVideoCallback {
private static final String TAG = YilanVedioFragment.class.getSimpleName();
@Bind(R.id.cdvv_fragment_yilan_time) @Bind(R.id.cdvv_fragment_yilan_time)
CountDownVedioView cdvvYilanTime; CountDownVedioView cdvvYilanTime;
private LittleVideoFragment littleVideoFragment; private LittleVideoFragment littleVideoFragment;
...@@ -71,7 +75,6 @@ public class YilanVedioFragment extends BaseFragment ...@@ -71,7 +75,6 @@ public class YilanVedioFragment extends BaseFragment
onResume(); onResume();
} }
super.onHiddenChanged(hidden); super.onHiddenChanged(hidden);
// System.out.println("mcg __ onHiddenChanged");
} }
@Override @Override
...@@ -122,7 +125,6 @@ public class YilanVedioFragment extends BaseFragment ...@@ -122,7 +125,6 @@ public class YilanVedioFragment extends BaseFragment
@Override @Override
public void setUserVisibleHint(boolean isVisibleToUser) { public void setUserVisibleHint(boolean isVisibleToUser) {
super.setUserVisibleHint(isVisibleToUser); super.setUserVisibleHint(isVisibleToUser);
// System.out.println("mcg __ setUserVisibleHint");
if (littleVideoFragment != null) { if (littleVideoFragment != null) {
littleVideoFragment.setUserVisibleHint(isVisibleToUser); littleVideoFragment.setUserVisibleHint(isVisibleToUser);
} }
...@@ -170,7 +172,7 @@ public class YilanVedioFragment extends BaseFragment ...@@ -170,7 +172,7 @@ public class YilanVedioFragment extends BaseFragment
*/ */
@Override @Override
public void onVideoError(int errorCode, AdEntity entity) { public void onVideoError(int errorCode, AdEntity entity) {
System.out.println("mcg __ onVideoError entity:" + entity + " errorCode:" + errorCode); LogUtil.d(TAG, "onVideoError entity:" + entity + " errorCode:" + errorCode);
} }
/** /**
...@@ -180,7 +182,7 @@ public class YilanVedioFragment extends BaseFragment ...@@ -180,7 +182,7 @@ public class YilanVedioFragment extends BaseFragment
*/ */
@Override @Override
public void onVideoAdStartPlay(AdEntity entity) { public void onVideoAdStartPlay(AdEntity entity) {
System.out.println("mcg __ onVideoAdStartPlay entity:" + entity); LogUtil.d(TAG, "onVideoAdStartPlay entity:" + entity);
} }
/** /**
......
...@@ -307,7 +307,6 @@ public class WaterView extends FrameLayout ...@@ -307,7 +307,6 @@ public class WaterView extends FrameLayout
// waterList.add(Integer.valueOf(tvFouroneWater.getText().toString())); // waterList.add(Integer.valueOf(tvFouroneWater.getText().toString()));
// } // }
// System.out.println("mcg __ waterList" + JsonUtil.toJson(waterList));
return waterList; return waterList;
} }
...@@ -423,7 +422,6 @@ public class WaterView extends FrameLayout ...@@ -423,7 +422,6 @@ public class WaterView extends FrameLayout
public void onTick(long millisUntilFinished) { public void onTick(long millisUntilFinished) {
if (activity != null && !activity.isFinishing()) { if (activity != null && !activity.isFinishing()) {
if (tvWaterDrinktime != null) { if (tvWaterDrinktime != null) {
// System.out.println("mcg __ 后喝水领金币" + TimeRender.ms2HMS((int) (millisUntilFinished)));
tvWaterDrinktime.setVisibility(VISIBLE); tvWaterDrinktime.setVisibility(VISIBLE);
tvWaterDrinktime.setText(TimeRender.ms2HMS((int) (millisUntilFinished)) + "后喝水领金币"); tvWaterDrinktime.setText(TimeRender.ms2HMS((int) (millisUntilFinished)) + "后喝水领金币");
} }
......
...@@ -85,20 +85,5 @@ public class AESUtils { ...@@ -85,20 +85,5 @@ public class AESUtils {
} }
public static void main(String[] args) throws Exception { public static void main(String[] args) throws Exception {
// String message = "123456wwe";
// String entryptedMsg = encrypt(message, key);
// System.out.println("encrypted message is below :");
// System.out.println("加密结果:" + entryptedMsg);
// String dexryptedmsg = "Dj4MYXI5X6gL3H+bBjAhspXibZVhO79bgzoIawpl/6NNJWsjTHKMJGLtTPmvInRmbK3ipi4NvxsU\n" + "FtSufnPbZCtpydpNldkXCJ3vNALju60=";
// String decryptedMsg = detrypt(dexryptedmsg, key);
// System.out.println("decrypted message is below :");
// System.out.println(MD5.GetMD5Code("meijie_2016").substring(8, 24));
System.out.println(detrypt("5EBue8TMfYS2P8YAZUyJUKnYvTVEblnJMwC00vC1yZHjvqq6Ws4TeaXQ+7l+iwdzoQNi2yJ9CLrG\n" +
"cfQlCjaAbr5gmLokexHida7yLofB7V5ItaxTGlXyxK3CH+Wr/lvbWKmP8YROCrtzrreqP8svuf0M\n" +
"AzKbOnPhoURvpfVS5di/dk3chtujIqC74xd5XpLJfHiXQadEX+12zq+IXa0xIWezTHjL6cJBTN6y\n" +
"xg5w6+ey7EYzEdJ118HaSTr1tLu7AkxguXJez9QxhB9nifRBvgl7tlY0oL20+yGGZ3WgR/CmWh9u\n" +
"PjEy0eB3NgmNd8SRmImXDYOQDMJqxa5AUMKjQkQ/NmrDLBdRO+9zy5Ujv7YL1KVoUmmxeH5EVPZR\n" +
"nV+E", "abcdnnnnnn123456"));
} }
} }
...@@ -191,7 +191,7 @@ public class FileUtils { ...@@ -191,7 +191,7 @@ public class FileUtils {
DecimalFormat df = new DecimalFormat("#.00"); DecimalFormat df = new DecimalFormat("#.00");
size = df.format((double) bt.length / 1048576) + "MB"; size = df.format((double) bt.length / 1048576) + "MB";
} else { } else {
System.out.println("没有从该连接获得内容"); // System.out.println("没有从该连接获得内容");
} }
inStream.close(); inStream.close();
outStream.close(); outStream.close();
......
...@@ -16,7 +16,6 @@ public class MD5 { ...@@ -16,7 +16,6 @@ public class MD5 {
// 返回形式为数字跟字符串 // 返回形式为数字跟字符串
private static String byteToArrayString(byte bByte) { private static String byteToArrayString(byte bByte) {
int iRet = bByte; int iRet = bByte;
// System.out.println("iRet="+iRet);
if (iRet < 0) { if (iRet < 0) {
iRet += 256; iRet += 256;
} }
...@@ -28,7 +27,6 @@ public class MD5 { ...@@ -28,7 +27,6 @@ public class MD5 {
// 返回形式只为数字 // 返回形式只为数字
private static String byteToNum(byte bByte) { private static String byteToNum(byte bByte) {
int iRet = bByte; int iRet = bByte;
System.out.println("iRet1=" + iRet);
if (iRet < 0) { if (iRet < 0) {
iRet += 256; iRet += 256;
} }
...@@ -58,7 +56,7 @@ public class MD5 { ...@@ -58,7 +56,7 @@ public class MD5 {
} }
public static void main(String[] args) { public static void main(String[] args) {
MD5 getMD5 = new MD5(); // MD5 getMD5 = new MD5();
System.out.println(getMD5.GetMD5Code("136111111111231231231231e807f1fcf82d132f9bb018ca6738a19f")); // System.out.println(getMD5.GetMD5Code("136111111111231231231231e807f1fcf82d132f9bb018ca6738a19f"));
} }
} }
\ No newline at end of file
...@@ -55,7 +55,6 @@ public final class Utils { ...@@ -55,7 +55,6 @@ public final class Utils {
public static void main(String[] args) { public static void main(String[] args) {
System.out.println((int) ((Math.random() * 9 + 1) * 100000));
} }
......
...@@ -30,10 +30,10 @@ public class OkHttpProgress { ...@@ -30,10 +30,10 @@ public class OkHttpProgress {
final ProgressListener progressListener = new ProgressListener() { final ProgressListener progressListener = new ProgressListener() {
@Override @Override
public void update(long bytesRead, long contentLength, boolean done) { public void update(long bytesRead, long contentLength, boolean done) {
System.out.println(bytesRead); // System.out.println(bytesRead);
System.out.println(contentLength); // System.out.println(contentLength);
System.out.println(done); // System.out.println(done);
System.out.format("%d%% done\n", (100 * bytesRead) / contentLength); // System.out.format("%d%% done\n", (100 * bytesRead) / contentLength);
} }
}; };
...@@ -63,7 +63,7 @@ public class OkHttpProgress { ...@@ -63,7 +63,7 @@ public class OkHttpProgress {
Response response = client.newCall(request).execute(); Response response = client.newCall(request).execute();
if (!response.isSuccessful()) throw new IOException("Unexpected code " + response); if (!response.isSuccessful()) throw new IOException("Unexpected code " + response);
System.out.println(response.body().string()); // System.out.println(response.body().string());
} }
public static void main(String... arg) throws Exception { public static void main(String... arg) throws Exception {
......
...@@ -148,7 +148,6 @@ public class SystemUtils { ...@@ -148,7 +148,6 @@ public class SystemUtils {
.getUriFor("screen_brightness"); .getUriFor("screen_brightness");
int nowScreenBri = getScreenBrightness(activity); int nowScreenBri = getScreenBrightness(activity);
nowScreenBri = nowScreenBri <= 225 ? nowScreenBri + 30 : 30; nowScreenBri = nowScreenBri <= 225 ? nowScreenBri + 30 : 30;
System.out.println("nowScreenBri==" + nowScreenBri);
android.provider.Settings.System.putInt(resolver, "screen_brightness", android.provider.Settings.System.putInt(resolver, "screen_brightness",
nowScreenBri); nowScreenBri);
resolver.notifyChange(uri, null); resolver.notifyChange(uri, null);
......
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