Commit f2fcf593 authored by mengcuiguang's avatar mengcuiguang

代码优化

parent 1e4c5250
...@@ -31,7 +31,7 @@ ...@@ -31,7 +31,7 @@
<uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" /> <uses-permission android:name="android.permission.CHANGE_NETWORK_STATE" />
<application <application
android:name="com.mints.highgold.MintsApplication" android:name=".MintsApplication"
android:allowBackup="true" android:allowBackup="true"
android:icon="@mipmap/ic_launcher" android:icon="@mipmap/ic_launcher"
android:label="@string/app_name" android:label="@string/app_name"
...@@ -40,33 +40,12 @@ ...@@ -40,33 +40,12 @@
android:theme="@style/CustomAppTheme" android:theme="@style/CustomAppTheme"
android:usesCleartextTraffic="true" android:usesCleartextTraffic="true"
tools:ignore="GoogleAppIndexingWarning"> tools:ignore="GoogleAppIndexingWarning">
<activity android:name="com.mints.highgold.ui.activitys.HytechVedioActivity"></activity> <activity android:name=".ui.activitys.Aboutas2Activity"></activity>
<activity android:name="com.mints.highgold.ui.activitys.YilanVedioActivity" />
<activity android:name="com.mints.highgold.ui.activitys.NewsWebviewActivity" />
<activity
android:name="com.mints.highgold.ui.activitys.WxLoginActivity"
android:launchMode="singleTop" />
<activity android:name="com.mints.highgold.ui.activitys.BaiduVedioActivity" />
<activity android:name="com.mints.highgold.ui.activitys.ExchangeActivity" />
<activity android:name="com.mints.highgold.ui.activitys.InvitecodeActivity" />
<activity android:name="com.mints.highgold.ui.activitys.FriendsNewActivity" />
<activity android:name="com.mints.highgold.ui.activitys.NewyearActivity" />
<activity android:name="com.mints.highgold.ui.activitys.RedboxActivity" /> <!-- 这是为了解决 TTAdSdk 需要使用 http client 在 Android 9.0 会 class not found 而加的配置 -->
<uses-library <uses-library
android:name="org.apache.http.legacy" android:name="org.apache.http.legacy"
android:required="false" /> android:required="false" />
<activity
android:name="com.mints.highgold.ui.activitys.AwardActivity"
android:screenOrientation="portrait" />
<activity android:name="com.mints.highgold.ui.activitys.WhatGoldActivity" />
<activity android:name="com.mints.highgold.ui.activitys.SettingActivity" />
<activity android:name="com.mints.highgold.ui.activitys.PhoneActivity" />
<activity android:name="com.mints.highgold.ui.activitys.EraseActivity" />
<activity
android:name="com.mints.highgold.ui.activitys.WebActivity"
android:windowSoftInputMode="adjustResize" />
<activity android:name="com.mints.highgold.ui.activitys.TurntableActivity" /> <!-- 设置支持屏幕的最大横纵比 -->
<meta-data <meta-data
android:name="android.max_aspect" android:name="android.max_aspect"
android:value="2.4" /> <!-- 适配小米(xiaomi)刘海屏 --> android:value="2.4" /> <!-- 适配小米(xiaomi)刘海屏 -->
...@@ -90,19 +69,16 @@ ...@@ -90,19 +69,16 @@
android:value="${SHARE_KEY}" /> android:value="${SHARE_KEY}" />
<meta-data <meta-data
android:name="Mob-AppSecret" android:name="Mob-AppSecret"
android:value="${SHARE_SECRET}" /> android:value="${SHARE_SECRET}" /> <!-- 推啊appkey -->
<!-- 推啊appkey -->
<meta-data <meta-data
android:name="TUIA_APPKEY" android:name="TUIA_APPKEY"
android:value="3JqPn4Kc11qYkuT5jX8nuJSKHJTv" /> android:value="3JqPn4Kc11qYkuT5jX8nuJSKHJTv" />
<meta-data <meta-data
android:name="TUIA_APPSECRET" android:name="TUIA_APPSECRET"
android:value="3XThiZCoXgsHmfqKTMH3R9erQ4qdqCGBrJLLKp9" /> android:value="3XThiZCoXgsHmfqKTMH3R9erQ4qdqCGBrJLLKp9" />
<activity <activity
android:name="com.mints.highgold.ui.activitys.SplashActivity" android:name=".ui.activitys.SplashActivity"
android:configChanges="keyboard|orientation|screenSize" android:configChanges="keyboard|orientation|screenSize"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/Theme.ADSplash" android:theme="@style/Theme.ADSplash"
...@@ -113,48 +89,69 @@ ...@@ -113,48 +89,69 @@
<category android:name="android.intent.category.LAUNCHER" /> <category android:name="android.intent.category.LAUNCHER" />
</intent-filter> </intent-filter>
</activity> </activity>
<activity android:name="com.mints.highgold.ui.activitys.GuideActivity" /> <activity android:name=".ui.activitys.GuideActivity" />
<activity <activity
android:name="com.mints.highgold.ui.activitys.MainActivity" android:name=".ui.activitys.MainActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:launchMode="singleTask" android:launchMode="singleTask"
android:screenOrientation="portrait" android:screenOrientation="portrait"
android:theme="@style/AppTheme.NoneTranslucent" /> android:theme="@style/AppTheme.NoneTranslucent" />
<activity android:name="com.mints.highgold.ui.activitys.AboutasActivity" /> <activity android:name=".ui.activitys.AboutasActivity" />
<activity <activity
android:name="com.mints.highgold.ui.activitys.TTSplashActivity" android:name=".ui.activitys.TTSplashActivity"
android:configChanges="keyboard|orientation|screenSize" android:configChanges="keyboard|orientation|screenSize"
android:launchMode="singleTop" android:launchMode="singleTop"
android:theme="@style/Theme.ADSplash" android:theme="@style/Theme.ADSplash"
android:windowSoftInputMode="adjustPan|stateHidden" /> android:windowSoftInputMode="adjustPan|stateHidden" />
<activity android:name="com.mints.highgold.ui.activitys.FeekbackActivity" /> <activity android:name=".ui.activitys.FeekbackActivity" />
<activity android:name="com.mints.highgold.ui.activitys.IncomeRecordActivity" /> <activity android:name=".ui.activitys.IncomeRecordActivity" />
<activity android:name="com.mints.highgold.ui.activitys.DrawcashRecordActivity" /> <activity android:name=".ui.activitys.DrawcashRecordActivity" />
<activity android:name="com.mints.highgold.ui.activitys.FriendsRecordActivity" /> <activity android:name=".ui.activitys.FriendsRecordActivity" />
<activity android:name="com.mints.highgold.ui.activitys.AlipayBindActivity" /> <activity android:name=".ui.activitys.AlipayBindActivity" />
<activity android:name="com.mints.highgold.ui.activitys.AccountActivity" /> <activity android:name=".ui.activitys.AccountActivity" />
<activity android:name="com.mints.highgold.ui.activitys.FriendsActivity" /> <activity android:name=".ui.activitys.FriendsActivity" />
<activity android:name="com.mints.highgold.ui.activitys.DrinkTeaActivity" /> <activity android:name=".ui.activitys.DrinkTeaActivity" />
<activity <activity
android:name="com.mints.highgold.ui.activitys.TryVedioActivity" android:name=".ui.activitys.TryVedioActivity"
android:configChanges="orientation|screenSize|keyboardHidden" /> android:configChanges="orientation|screenSize|keyboardHidden" />
<activity android:name="com.mints.highgold.ui.activitys.TryTaskDetailActivity" /> <activity android:name=".ui.activitys.TryTaskDetailActivity" />
<activity android:name="com.mints.highgold.ui.activitys.TryTaskActivity" /> <activity android:name=".ui.activitys.TryTaskActivity" />
<activity android:name="com.mints.highgold.ui.activitys.DrawcashActivity" /> <activity android:name=".ui.activitys.DrawcashActivity" />
<activity android:name="com.mints.highgold.ui.activitys.GoldTryActivity" /> <activity android:name=".ui.activitys.GoldTryActivity" />
<activity <activity
android:name="com.mints.library.base.BaseWebActivity" android:name="com.mints.library.base.BaseWebActivity"
android:theme="@style/AppTheme.NoneTranslucent" /> android:theme="@style/AppTheme.NoneTranslucent" />
<activity <activity
android:name="com.mints.highgold.ui.activitys.LoginActivity" android:name=".ui.activitys.LoginActivity"
android:configChanges="orientation|screenSize|keyboardHidden" /> android:configChanges="orientation|screenSize|keyboardHidden" />
<activity <activity
android:name="com.mints.highgold.ui.activitys.DrinkClockActivity" android:name=".ui.activitys.DrinkClockActivity"
android:configChanges="keyboard|orientation|screenSize" /> android:configChanges="keyboard|orientation|screenSize" />
<activity android:name="com.mints.highgold.ui.activitys.GoldRecordActivity" /> <activity android:name=".ui.activitys.GoldRecordActivity" />
<activity android:name=".ui.activitys.HytechVedioActivity" />
<activity android:name=".ui.activitys.NewsWebviewActivity" />
<activity
android:name=".ui.activitys.WxLoginActivity"
android:launchMode="singleTop" />
<activity android:name=".ui.activitys.BaiduVedioActivity" />
<activity android:name=".ui.activitys.ExchangeActivity" />
<activity android:name=".ui.activitys.InvitecodeActivity" />
<activity android:name=".ui.activitys.FriendsNewActivity" />
<activity android:name=".ui.activitys.NewyearActivity" />
<activity android:name=".ui.activitys.RedboxActivity" /> <!-- 这是为了解决 TTAdSdk 需要使用 http client 在 Android 9.0 会 class not found 而加的配置 -->
<activity
android:name=".ui.activitys.AwardActivity"
android:screenOrientation="portrait" />
<activity android:name=".ui.activitys.WhatGoldActivity" />
<activity android:name=".ui.activitys.SettingActivity" />
<activity android:name=".ui.activitys.PhoneActivity" />
<activity android:name=".ui.activitys.EraseActivity" />
<activity
android:name=".ui.activitys.WebActivity"
android:windowSoftInputMode="adjustResize" />
<activity android:name=".ui.activitys.TurntableActivity" /> <!-- 设置支持屏幕的最大横纵比 -->
<service <service
android:name="com.mints.highgold.service.UpdateService" android:name=".service.UpdateService"
android:exported="true" /> <!-- ShareSDK start --> android:exported="true" /> <!-- ShareSDK start -->
<activity <activity
android:name="com.mob.tools.MobUIShell" android:name="com.mob.tools.MobUIShell"
...@@ -185,7 +182,7 @@ ...@@ -185,7 +182,7 @@
android:exported="true" android:exported="true"
android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <!-- JPUSH 用户自定义的广播接收器 --> android:theme="@android:style/Theme.Translucent.NoTitleBar" /> <!-- JPUSH 用户自定义的广播接收器 -->
<receiver <receiver
android:name="com.mints.highgold.service.JpushReceiver" android:name=".service.JpushReceiver"
android:enabled="true" android:enabled="true"
android:exported="false"> android:exported="false">
<intent-filter> <intent-filter>
...@@ -254,32 +251,33 @@ ...@@ -254,32 +251,33 @@
<provider <provider
android:name="com.bytedance.sdk.openadsdk.multipro.TTMultiProvider" android:name="com.bytedance.sdk.openadsdk.multipro.TTMultiProvider"
android:authorities="${applicationId}.TTMultiProvider" android:authorities="${applicationId}.TTMultiProvider"
android:exported="false" /> android:exported="false" /> <!-- Mintegral广告 -->
<!-- Mintegral广告 -->
<activity <activity
android:name="com.mintegral.msdk.activity.MTGCommonActivity" android:name="com.mintegral.msdk.activity.MTGCommonActivity"
android:configChanges="keyboard|orientation" android:configChanges="keyboard|orientation"
android:screenOrientation="portrait"
android:exported="false" android:exported="false"
android:theme="@android:style/Theme.Translucent.NoTitleBar"> android:screenOrientation="portrait"
</activity> android:theme="@android:style/Theme.Translucent.NoTitleBar"></activity>
<activity <activity
android:name="com.mintegral.msdk.reward.player.MTGRewardVideoActivity" android:name="com.mintegral.msdk.reward.player.MTGRewardVideoActivity"
android:configChanges="orientation|keyboardHidden|screenSize" android:configChanges="orientation|keyboardHidden|screenSize"
android:exported="false" android:exported="false"
android:theme="@style/mintegral_transparent_theme" /> android:theme="@style/mintegral_transparent_theme" />
<receiver android:name="com.mintegral.msdk.click.AppReceiver" >
<receiver android:name="com.mintegral.msdk.click.AppReceiver">
<intent-filter> <intent-filter>
<action android:name="android.intent.action.PACKAGE_ADDED" /> <action android:name="android.intent.action.PACKAGE_ADDED" />
<data android:scheme="package" /> <data android:scheme="package" />
</intent-filter> </intent-filter>
</receiver> </receiver>
<service android:name="com.mintegral.msdk.shell.MTGService" >
<service android:name="com.mintegral.msdk.shell.MTGService">
<intent-filter> <intent-filter>
<action android:name="com.mintegral.msdk.download.action" /> <action android:name="com.mintegral.msdk.download.action" />
</intent-filter> </intent-filter>
</service> </service>
<provider <provider
android:name="com.mintegral.msdk.base.utils.MTGFileProvider" android:name="com.mintegral.msdk.base.utils.MTGFileProvider"
android:authorities="${applicationId}.mtgFileProvider" android:authorities="${applicationId}.mtgFileProvider"
...@@ -287,7 +285,7 @@ ...@@ -287,7 +285,7 @@
android:grantUriPermissions="true"> android:grantUriPermissions="true">
<meta-data <meta-data
android:name="android.support.FILE_PROVIDER_PATHS" android:name="android.support.FILE_PROVIDER_PATHS"
android:resource="@xml/provider_paths"/> android:resource="@xml/provider_paths" />
</provider> </provider>
</application> </application>
......
...@@ -81,7 +81,6 @@ public class MintsApplication extends MultiDexApplication { ...@@ -81,7 +81,6 @@ public class MintsApplication extends MultiDexApplication {
private MiitHelper.AppIdsUpdater appIdsUpdater = new MiitHelper.AppIdsUpdater() { private MiitHelper.AppIdsUpdater appIdsUpdater = new MiitHelper.AppIdsUpdater() {
@Override @Override
public void OnIdsAvalid(@NonNull String ids) { public void OnIdsAvalid(@NonNull String ids) {
// System.out.println("mcg __ ++++++ids: " + ids);
oaid = ids; oaid = ids;
} }
}; };
...@@ -225,8 +224,6 @@ public class MintsApplication extends MultiDexApplication { ...@@ -225,8 +224,6 @@ public class MintsApplication extends MultiDexApplication {
*/ */
public void initUm(Context context) { public void initUm(Context context) {
// System.out.println("mcg __ init um");
/** /**
* 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。 * 参数4:设备类型,必须参数,传参数为UMConfigure.DEVICE_TYPE_PHONE则表示手机;传参数为UMConfigure.DEVICE_TYPE_BOX则表示盒子;默认为手机。
* 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。 * 参数5:Push推送业务的secret,需要集成Push功能时必须传入Push的secret,否则传空。
......
...@@ -68,6 +68,10 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView { ...@@ -68,6 +68,10 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView {
} }
public void destory() { public void destory() {
if (mttFullVideoAd != null) {
mttFullVideoAd.setFullScreenVideoAdInteractionListener(null);
}
if (csjFullVedioAdPresenter != null) { if (csjFullVedioAdPresenter != null) {
csjFullVedioAdPresenter.dispose(); csjFullVedioAdPresenter.dispose();
csjFullVedioAdPresenter.detachView(); csjFullVedioAdPresenter.detachView();
...@@ -114,6 +118,10 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView { ...@@ -114,6 +118,10 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView {
break; break;
} }
if (mttFullVideoAd != null) {
mttFullVideoAd.setFullScreenVideoAdInteractionListener(null);
}
AdSlot adSlot = new AdSlot.Builder() AdSlot adSlot = new AdSlot.Builder()
.setCodeId(codeId) .setCodeId(codeId)
.setSupportDeepLink(true) .setSupportDeepLink(true)
...@@ -145,7 +153,6 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView { ...@@ -145,7 +153,6 @@ public class CsjFullVedioAdManager implements LyVedioAdManagerView {
@Override @Override
public void onAdVideoBarClick() { public void onAdVideoBarClick() {
// System.out.println("mcg __ csjfull onAdVideoBarClick");
if (isClickScreen) { if (isClickScreen) {
// 防止重复 // 防止重复
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_FOUR, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_FOUR, "", "");
......
...@@ -76,6 +76,10 @@ public class CsjVedioAdManager implements LyVedioAdManagerView { ...@@ -76,6 +76,10 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
} }
public void destory() { public void destory() {
if (mttRewardVideoAd != null) {
mttRewardVideoAd.setRewardAdInteractionListener(null);
}
if (csjVedioAdPresenter != null) { if (csjVedioAdPresenter != null) {
csjVedioAdPresenter.dispose(); csjVedioAdPresenter.dispose();
csjVedioAdPresenter.detachView(); csjVedioAdPresenter.detachView();
...@@ -151,6 +155,10 @@ public class CsjVedioAdManager implements LyVedioAdManagerView { ...@@ -151,6 +155,10 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
String userID = userManager.getUserID(); String userID = userManager.getUserID();
String tid = MD5.GetMD5Code(String.valueOf(System.currentTimeMillis()) + userID); String tid = MD5.GetMD5Code(String.valueOf(System.currentTimeMillis()) + userID);
if (mttRewardVideoAd != null) {
mttRewardVideoAd.setRewardAdInteractionListener(null);
}
//step4:创建广告请求参数AdSlot,具体参数含义参考文档 //step4:创建广告请求参数AdSlot,具体参数含义参考文档
AdSlot adSlot = new AdSlot.Builder() AdSlot adSlot = new AdSlot.Builder()
.setCodeId(codeId) .setCodeId(codeId)
...@@ -226,7 +234,7 @@ public class CsjVedioAdManager implements LyVedioAdManagerView { ...@@ -226,7 +234,7 @@ public class CsjVedioAdManager implements LyVedioAdManagerView {
csjVedioAdListener.csjVedioDownload(); csjVedioAdListener.csjVedioDownload();
} }
} }
}catch (Exception e){ } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
if (csjVedioAdListener != null) { if (csjVedioAdListener != null) {
......
...@@ -17,8 +17,10 @@ import com.mints.highgold.MintsApplication; ...@@ -17,8 +17,10 @@ import com.mints.highgold.MintsApplication;
import com.mints.highgold.R; import com.mints.highgold.R;
import com.mints.highgold.common.Constant; import com.mints.highgold.common.Constant;
import com.mints.highgold.manager.MintegralManager; import com.mints.highgold.manager.MintegralManager;
import com.mints.highgold.manager.TTAdManagerHolder;
import com.mints.highgold.manager.TrackManager; import com.mints.highgold.manager.TrackManager;
import com.mints.highgold.manager.UserManager; import com.mints.highgold.manager.UserManager;
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.ToastUtil; import com.mints.highgold.utils.ToastUtil;
...@@ -32,7 +34,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -32,7 +34,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
private static MintegralVedioAdManager _inst; private static MintegralVedioAdManager _inst;
// private MintegralVedioAdPresenter mintegralVedioAdPresenter; private MintegralVedioAdPresenter mintegralVedioAdPresenter;
private MintegralVedioAdListener mintegralVedioAdListener; private MintegralVedioAdListener mintegralVedioAdListener;
Activity activity; Activity activity;
...@@ -40,16 +42,11 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -40,16 +42,11 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
private int curCoin; private int curCoin;
private String extraId; private String extraId;
private int downloadCoin = 10;
private String carrierType = "";
private MTGRewardVideoHandler mMTGRewardVideoHandler; private MTGRewardVideoHandler mMTGRewardVideoHandler;
private NetStateOnReceive mNetStateOnReceive; private NetStateOnReceive mNetStateOnReceive;
private Dialog mDialog; private String mRewardId;
private String mRewardId = MintegralManager.MINTEGRAL_AD_VEDIO_MOREDIALOG; private String mRewardUnitId;
private String mRewardUnitId = MintegralManager.MINTEGRAL_AD_VEDIO_MOREDIALOG_UNITID;
private String mUserId;
private boolean isClickScreen = true; // 是否点击屏幕跳转广告 private boolean isClickScreen = true; // 是否点击屏幕跳转广告
...@@ -70,22 +67,17 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -70,22 +67,17 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
private void init(Activity activity) { private void init(Activity activity) {
this.activity = activity; this.activity = activity;
mUserId = UserManager.getInstance().getUserID(); mintegralVedioAdPresenter = new MintegralVedioAdPresenter();
initHandler(); mintegralVedioAdPresenter.attachView(this);
// mintegralVedioAdPresenter = new MintegralVedioAdPresenter();
// mintegralVedioAdPresenter.attachView(this);
} }
public void destory() { public void destory() {
// if (mintegralVedioAdPresenter != null) { if (mintegralVedioAdPresenter != null) {
// mintegralVedioAdPresenter.dispose(); mintegralVedioAdPresenter.dispose();
// mintegralVedioAdPresenter.detachView(); mintegralVedioAdPresenter.detachView();
// } }
try { try {
// if (mDialog != null) {
// mDialog = null;
// }
if (mNetStateOnReceive != null && activity != null) { if (mNetStateOnReceive != null && activity != null) {
activity.unregisterReceiver(mNetStateOnReceive); activity.unregisterReceiver(mNetStateOnReceive);
} }
...@@ -107,21 +99,20 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -107,21 +99,20 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
showToast("界面加载超时,请重新加载"); showToast("界面加载超时,请重新加载");
return; return;
} }
isClickScreen = true; isClickScreen = true;
this.downloadCoin = downloadCoin;
this.carrierType = carrierType;
this.curCoin = curCoin; this.curCoin = curCoin;
this.extraId = extraId; this.extraId = extraId;
initHandler(carrierType);
if (mMTGRewardVideoHandler != null) { if (mMTGRewardVideoHandler != null) {
mMTGRewardVideoHandler.load(); mMTGRewardVideoHandler.load();
} }
} }
private void initHandler() { private void initHandler(String carrierType) {
if (activity == null) return; if (activity == null) return;
try { try {
...@@ -133,21 +124,50 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -133,21 +124,50 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
activity.registerReceiver(mNetStateOnReceive, filter); activity.registerReceiver(mNetStateOnReceive, filter);
} }
if (mMTGRewardVideoHandler == null) { switch (carrierType) {
case Constant.CARRIER_DAILY_VIDEO:// 首页看视频
mRewardId = MintegralManager.MINTEGRAL_AD_VEDIO_MAIN;
mRewardUnitId = MintegralManager.MINTEGRAL_AD_VEDIO_MAIN_UNITID;
break;
case Constant.CARRIER_VERSUS_VIDEO:// 任务赚视频
mRewardId = MintegralManager.MINTEGRAL_AD_VEDIO_CHANGE;
mRewardUnitId = MintegralManager.MINTEGRAL_AD_VEDIO_CHANGE_UNITID;
break;
case Constant.CARRIER_ONLINE_INCOME_DOUBLE:// 在线收益翻倍
case Constant.CARRIER_HOMEWATER_BUBBLE:// 喝水
mRewardId = MintegralManager.MINTEGRAL_AD_VEDIO_POP;
mRewardUnitId = MintegralManager.MINTEGRAL_AD_VEDIO_POP_UNITID;
break;
case Constant.CARRIER_REDENVELOPE_DOUBLE:// 红包翻倍奖励
case Constant.CARRIER_REDENVELOPE:// 红包奖励
mRewardId = MintegralManager.MINTEGRAL_AD_VEDIO_REDBOX;
mRewardUnitId = MintegralManager.MINTEGRAL_AD_VEDIO_REDBOX_UNITID;
break;
default:
mRewardId = MintegralManager.MINTEGRAL_AD_VEDIO_POP;
mRewardUnitId = MintegralManager.MINTEGRAL_AD_VEDIO_POP_UNITID;
break;
}
// 重置
if (mMTGRewardVideoHandler != null) {
mMTGRewardVideoHandler.setRewardVideoListener(null);
}
mMTGRewardVideoHandler = new MTGRewardVideoHandler(activity, mRewardUnitId); mMTGRewardVideoHandler = new MTGRewardVideoHandler(activity, mRewardUnitId);
mMTGRewardVideoHandler.setRewardVideoListener(new RewardVideoListener() { mMTGRewardVideoHandler.setRewardVideoListener(new RewardVideoListener() {
@Override @Override
public void onLoadSuccess(String unitId) { public void onLoadSuccess(String unitId) {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ZERO, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ZERO, "", "");
} }
@Override @Override
public void onVideoLoadSuccess(String unitId) { public void onVideoLoadSuccess(String unitId) {
if (mMTGRewardVideoHandler.isReady()) { if (mMTGRewardVideoHandler.isReady()) {
mMTGRewardVideoHandler.show(mRewardId, mUserId); mMTGRewardVideoHandler.show(mRewardId, "");
} else { } else {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ONE, "999997", "Ready Fail"); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ONE, "999997", "Ready Fail");
if (mintegralVedioAdListener != null) { if (mintegralVedioAdListener != null) {
mintegralVedioAdListener.mintegralVedioAdFail(); mintegralVedioAdListener.mintegralVedioAdFail();
} }
...@@ -160,14 +180,14 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -160,14 +180,14 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
if (mintegralVedioAdListener != null) { if (mintegralVedioAdListener != null) {
mintegralVedioAdListener.mintegralVedioAdFail(); mintegralVedioAdListener.mintegralVedioAdFail();
} }
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ONE, "999999", errorMsg); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_ONE, "999999", errorMsg);
} }
@Override @Override
public void onShowFail(String errorMsg) { public void onShowFail(String errorMsg) {
System.out.println("mcg __ onShowFail"); System.out.println("mcg __ onShowFail errorMsg:" + 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();
} }
...@@ -179,16 +199,16 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -179,16 +199,16 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
@Override @Override
public void onAdClose(boolean isCompleteView, String RewardName, float RewardAmout) { public void onAdClose(boolean isCompleteView, String RewardName, float RewardAmout) {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_THREE, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_THREE, "", "");
if (isCompleteView) { if (isCompleteView) {
if (mintegralVedioAdListener != null) { if (mintegralVedioAdListener != null) {
mintegralVedioAdListener.mintegralVedioAdAdSuccess(); mintegralVedioAdListener.mintegralVedioAdAdSuccess();
} }
// if (activity != null) { if (activity != null) {
// mintegralVedioAdPresenter.reportAddCoinMsg(activity, getAdMapVO(carrierType)); mintegralVedioAdPresenter.reportAddCoinMsg(activity, getAdMapVO(carrierType));
// } }
} }
...@@ -198,7 +218,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -198,7 +218,7 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
@Override @Override
public void onVideoAdClicked(String unitId) { public void onVideoAdClicked(String unitId) {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_TWO, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_MINTEGRAL, Constant.EVENT_TYPE_TWO, "", "");
if (isClickScreen) { if (isClickScreen) {
// 防止重复 // 防止重复
...@@ -220,29 +240,11 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView { ...@@ -220,29 +240,11 @@ public class MintegralVedioAdManager implements MintegralVedioAdManagerView {
} }
}); });
}
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
} }
} }
private void showDialog(String RewardName, float RewardAmout) {
if (activity == null) return;
try {
mDialog = new Dialog(activity);
View view = View.inflate(activity, R.layout.dialog_reward, null);
TextView tvRewardName = (TextView) view.findViewById(R.id.tv_rewardName);
TextView tvRewardAmout = (TextView) view.findViewById(R.id.tv_RewardAmout);
tvRewardName.setText(RewardName + "");
tvRewardAmout.setText(RewardAmout + "");
mDialog.setContentView(view);
mDialog.show();
} catch (Throwable t) {
t.printStackTrace();
}
}
/** /**
* 显示加载进度条(自定义message) * 显示加载进度条(自定义message)
* *
......
...@@ -36,8 +36,8 @@ public class VedioAdingManager { ...@@ -36,8 +36,8 @@ public class VedioAdingManager {
private int mintegralWeight; private int mintegralWeight;
private ArrayList<Integer> weightList; private ArrayList<Integer> weightList;
private boolean isVedioAdDownload = false;// 是否点击广告下载 true-点击
private Activity activity; private Activity activity;
private boolean isVedioAdDownload = false;// 是否点击广告下载 true-点击
public static VedioAdingManager getInstance(Activity activity) { public static VedioAdingManager getInstance(Activity activity) {
if (_inst != null) { if (_inst != null) {
...@@ -47,7 +47,6 @@ public class VedioAdingManager { ...@@ -47,7 +47,6 @@ public class VedioAdingManager {
return _inst; return _inst;
} }
} }
private VedioAdingManager(Activity activity) { private VedioAdingManager(Activity activity) {
init(activity); init(activity);
return; return;
...@@ -133,7 +132,6 @@ public class VedioAdingManager { ...@@ -133,7 +132,6 @@ public class VedioAdingManager {
*/ */
private String getRandomWeightAdtype() { private String getRandomWeightAdtype() {
String adType = ""; String adType = "";
// int randomWeight = getRandomWeight(weightList);
int randomWeight = getRandomWeight(); int randomWeight = getRandomWeight();
if (randomWeight == ylhWeight) { if (randomWeight == ylhWeight) {
adType = Constant.YLH_VEDIO_AD; adType = Constant.YLH_VEDIO_AD;
...@@ -308,6 +306,9 @@ public class VedioAdingManager { ...@@ -308,6 +306,9 @@ public class VedioAdingManager {
ylhVedioAdManager = YlhVedioAdManager.getInstance(activity); ylhVedioAdManager = YlhVedioAdManager.getInstance(activity);
} }
// 重置监听
ylhVedioAdManager.setYlhVedioAdListener(null);
ylhVedioAdManager.loanYlhAd(bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId()); ylhVedioAdManager.loanYlhAd(bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
ylhVedioAdManager.setYlhVedioAdListener(new YlhVedioAdManager.YlhVedioAdListener() { ylhVedioAdManager.setYlhVedioAdListener(new YlhVedioAdManager.YlhVedioAdListener() {
@Override @Override
...@@ -344,6 +345,9 @@ public class VedioAdingManager { ...@@ -344,6 +345,9 @@ public class VedioAdingManager {
csjFullVedioAdManager = CsjFullVedioAdManager.getInstance(activity); csjFullVedioAdManager = CsjFullVedioAdManager.getInstance(activity);
} }
// 重置监听
csjFullVedioAdManager.setCsjFullVedioAdListener(null);
csjFullVedioAdManager.loadCsjFullAd(bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId()); csjFullVedioAdManager.loadCsjFullAd(bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
csjFullVedioAdManager.setCsjFullVedioAdListener(new CsjFullVedioAdManager.CsjFullVedioAdListener() { csjFullVedioAdManager.setCsjFullVedioAdListener(new CsjFullVedioAdManager.CsjFullVedioAdListener() {
@Override @Override
...@@ -380,6 +384,9 @@ public class VedioAdingManager { ...@@ -380,6 +384,9 @@ public class VedioAdingManager {
csjVedioAdManager = CsjVedioAdManager.getInstance(activity); csjVedioAdManager = CsjVedioAdManager.getInstance(activity);
} }
// 重置监听
csjVedioAdManager.setCsjVedioAdListener(null);
csjVedioAdManager.loadCsjAd(bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId()); csjVedioAdManager.loadCsjAd(bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
csjVedioAdManager.setCsjVedioAdListener(new CsjVedioAdManager.CsjVedioAdListener() { csjVedioAdManager.setCsjVedioAdListener(new CsjVedioAdManager.CsjVedioAdListener() {
@Override @Override
...@@ -416,6 +423,8 @@ public class VedioAdingManager { ...@@ -416,6 +423,8 @@ public class VedioAdingManager {
hytechVedioAdManager = HytechVedioAdManager.getInstance(activity); hytechVedioAdManager = HytechVedioAdManager.getInstance(activity);
} }
// 重置监听
hytechVedioAdManager.setHytechVedioAdListener(null);
hytechVedioAdManager.loanHytechAd(bean.getDownloadCoin(), bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId()); hytechVedioAdManager.loanHytechAd(bean.getDownloadCoin(), bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
hytechVedioAdManager.setHytechVedioAdListener(new HytechVedioAdManager.HytechVedioAdListener() { hytechVedioAdManager.setHytechVedioAdListener(new HytechVedioAdManager.HytechVedioAdListener() {
...@@ -448,6 +457,9 @@ public class VedioAdingManager { ...@@ -448,6 +457,9 @@ public class VedioAdingManager {
mintegralVedioAdManager = MintegralVedioAdManager.getInstance(activity); mintegralVedioAdManager = MintegralVedioAdManager.getInstance(activity);
} }
// 重置监听
mintegralVedioAdManager.setMintegralVedioAdListener(null);
mintegralVedioAdManager.loadMintegralAd(bean.getDownloadCoin(), bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId()); mintegralVedioAdManager.loadMintegralAd(bean.getDownloadCoin(), bean.getCurCoin(), bean.getCarrierType(), bean.getExtraId());
mintegralVedioAdManager.setMintegralVedioAdListener(new MintegralVedioAdManager.MintegralVedioAdListener() { mintegralVedioAdManager.setMintegralVedioAdListener(new MintegralVedioAdManager.MintegralVedioAdListener() {
@Override @Override
......
...@@ -104,6 +104,10 @@ public class YlhVedioAdManager implements LyVedioAdManagerView { ...@@ -104,6 +104,10 @@ public class YlhVedioAdManager implements LyVedioAdManagerView {
break; break;
} }
if (rewardVideoAD != null) {
rewardVideoAD = null;
}
rewardVideoAD = new RewardVideoAD(activity, YlhAdManager.YLH_AD_VEDIO_APPID, ylhPostId, new RewardVideoADListener() { rewardVideoAD = new RewardVideoAD(activity, YlhAdManager.YLH_AD_VEDIO_APPID, ylhPostId, new RewardVideoADListener() {
@Override @Override
public void onADLoad() {//广告加载成功,可在此回调后进行广告展示,此时广告过期时间确定,可通过RewardVideoAD.getExpireTimestamp()获取 public void onADLoad() {//广告加载成功,可在此回调后进行广告展示,此时广告过期时间确定,可通过RewardVideoAD.getExpireTimestamp()获取
...@@ -169,7 +173,6 @@ public class YlhVedioAdManager implements LyVedioAdManagerView { ...@@ -169,7 +173,6 @@ public class YlhVedioAdManager implements LyVedioAdManagerView {
TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_FOUR, "", ""); TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_YLH, Constant.EVENT_TYPE_FOUR, "", "");
isClickScreen = false; isClickScreen = false;
} }
System.out.println("mcg ylh 点击");
if (ylhVedioAdListener != null) { if (ylhVedioAdListener != null) {
ylhVedioAdListener.ylhVedioAdDownload(); ylhVedioAdListener.ylhVedioAdDownload();
} }
......
...@@ -288,19 +288,16 @@ public class InsertScreenAdManager { ...@@ -288,19 +288,16 @@ public class InsertScreenAdManager {
mTMItAd.setAdListener(new FoxListener() { mTMItAd.setAdListener(new FoxListener() {
@Override @Override
public void onReceiveAd() { public void onReceiveAd() {
System.out.println("mcg __ onReceiveAd");
AppConfig.interactionAdType = 0; AppConfig.interactionAdType = 0;
} }
@Override @Override
public void onFailedToReceiveAd() { public void onFailedToReceiveAd() {
System.out.println("mcg __ onFailedToReceiveAd");
AppConfig.interactionAdType = 0; AppConfig.interactionAdType = 0;
} }
@Override @Override
public void onLoadFailed() { public void onLoadFailed() {
System.out.println("mcg __ onLoadFailed");
AppConfig.interactionAdType = 0; AppConfig.interactionAdType = 0;
} }
......
...@@ -135,9 +135,6 @@ public class AlipayManager { ...@@ -135,9 +135,6 @@ public class AlipayManager {
msg.obj = result; msg.obj = result;
if (mHandler != null) { if (mHandler != null) {
mHandler.sendMessage(msg); mHandler.sendMessage(msg);
System.out.println("mcg alipay send");
} else {
System.out.println("mcg alipay fail");
} }
} }
}; };
......
...@@ -6,10 +6,15 @@ package com.mints.highgold.manager; ...@@ -6,10 +6,15 @@ package com.mints.highgold.manager;
public class MintegralManager { public class MintegralManager {
/*激励视频*/ /*激励视频*/
public static final String MINTEGRAL_AD_VEDIO_MOREDIALOG = "194665";// 高额版_Android_喝水_0422 签到、气泡、离线弹框 public static final String MINTEGRAL_AD_VEDIO_POP = "194665";// 高额版_Android_首页气泡_0512
public static final String MINTEGRAL_AD_VEDIO_CHANGE = "199876";// 高额版_Android_任务赚视频_0512
public static final String MINTEGRAL_AD_VEDIO_REDBOX = "199874";// 高额版_Android_抢红包_0512
public static final String MINTEGRAL_AD_VEDIO_MAIN = "199872";// 高额版_Android_首页试玩_0512
/*激励视频 UNITID*/ /*激励视频 UNITID*/
public static final String MINTEGRAL_AD_VEDIO_MOREDIALOG_UNITID = "249880";// 高额版_Android_喝水_0422 签到、气泡、离线弹框 public static final String MINTEGRAL_AD_VEDIO_POP_UNITID = "249880";// 高额版_Android_首页气泡_0512
public static final String MINTEGRAL_AD_VEDIO_CHANGE_UNITID = "253901";// 高额版_Android_任务赚视频_0512
public static final String MINTEGRAL_AD_VEDIO_REDBOX_UNITID = "253899";// 高额版_Android_抢红包_0512
public static final String MINTEGRAL_AD_VEDIO_MAIN_UNITID = "253897";// 高额版_Android_首页试玩_0512
} }
...@@ -70,11 +70,13 @@ public class UserTaskMsgBean implements Serializable { ...@@ -70,11 +70,13 @@ public class UserTaskMsgBean implements Serializable {
private int vedioplan_lyh_vedio_rate; private int vedioplan_lyh_vedio_rate;
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_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;
public int getVedioplan_hytech_vedio_rate() { public int getVedioplan_hytech_vedio_rate() {
return vedioplan_hytech_vedio_rate; return vedioplan_hytech_vedio_rate;
...@@ -328,4 +330,60 @@ public class UserTaskMsgBean implements Serializable { ...@@ -328,4 +330,60 @@ public class UserTaskMsgBean implements Serializable {
public String getAppIp() { public String getAppIp() {
return appIp; return appIp;
} }
public void setVedioplan_csj_vedio_rate(int vedioplan_csj_vedio_rate) {
this.vedioplan_csj_vedio_rate = vedioplan_csj_vedio_rate;
}
public void setVedioplan_csj_full_screen_video_rate(int vedioplan_csj_full_screen_video_rate) {
this.vedioplan_csj_full_screen_video_rate = vedioplan_csj_full_screen_video_rate;
}
public void setVedioplan_lyh_vedio_rate(int vedioplan_lyh_vedio_rate) {
this.vedioplan_lyh_vedio_rate = vedioplan_lyh_vedio_rate;
}
public void setVedioplan_liyan_vedio_rate(int vedioplan_liyan_vedio_rate) {
this.vedioplan_liyan_vedio_rate = vedioplan_liyan_vedio_rate;
}
public void setVedioplan_hytech_vedio_rate(int vedioplan_hytech_vedio_rate) {
this.vedioplan_hytech_vedio_rate = vedioplan_hytech_vedio_rate;
}
public void setVedioplan_csj_vedio_surplus(int vedioplan_csj_vedio_surplus) {
this.vedioplan_csj_vedio_surplus = vedioplan_csj_vedio_surplus;
}
public void setVedioplan_liyan_vedio_surplus(int vedioplan_liyan_vedio_surplus) {
this.vedioplan_liyan_vedio_surplus = vedioplan_liyan_vedio_surplus;
}
public void setVedioplan_lyh_vedio_surplus(int vedioplan_lyh_vedio_surplus) {
this.vedioplan_lyh_vedio_surplus = vedioplan_lyh_vedio_surplus;
}
public void setVedioplan_csj_full_screen_video_surplus(int vedioplan_csj_full_screen_video_surplus) {
this.vedioplan_csj_full_screen_video_surplus = vedioplan_csj_full_screen_video_surplus;
}
public void setVedioplan_hytech_vedio_surplus(int vedioplan_hytech_vedio_surplus) {
this.vedioplan_hytech_vedio_surplus = vedioplan_hytech_vedio_surplus;
}
public int getVedioplan_mintegral_vedio_rate() {
return vedioplan_mintegral_vedio_rate;
}
public void setVedioplan_mintegral_vedio_rate(int vedioplan_mintegral_vedio_rate) {
this.vedioplan_mintegral_vedio_rate = vedioplan_mintegral_vedio_rate;
}
public int getVedioplan_mintegral_vedio_surplus() {
return vedioplan_mintegral_vedio_surplus;
}
public void setVedioplan_mintegral_vedio_surplus(int vedioplan_mintegral_vedio_surplus) {
this.vedioplan_mintegral_vedio_surplus = vedioplan_mintegral_vedio_surplus;
}
} }
package com.mints.highgold.ui.activitys
import android.os.Bundle
import com.mints.highgold.BuildConfig
import com.mints.highgold.R
import com.mints.highgold.ui.activitys.base.BaseActivity
import com.mints.library.base.BaseWebActivity
import com.mints.library.utils.nodoubleclick.AntiShake
import kotlinx.android.synthetic.main.activity_aboutas.*
import kotlinx.android.synthetic.main.header_activity.*
/**
* 描述:关于我们
* 作者:孟崔广
* 时间:2020/5/12 15:53
* 邮箱:mengcga@163.com
*/
class Aboutas2Activity : BaseActivity() {
override fun getContentViewLayoutID(): Int {
return R.layout.activity_aboutas
}
override fun initViewsAndEvents() {
tv_activity_title?.setText("关于我们")
initListener()
}
override fun isApplyKitKatTranslucency(): Boolean {
return false
}
private fun initListener() {
iv_aboutas_icon?.setOnLongClickListener {
if (BuildConfig.DEBUG) readyGo(ExchangeActivity::class.java)
true
}
tv_activity_back.setOnClickListener {
finish()
}
tv_aboutas_service.setOnClickListener {
val bundle = Bundle()
bundle.putString(BaseWebActivity.BUNDLE_KEY_TITLE, "服务协议")
bundle.putString(BaseWebActivity.BUNDLE_KEY_URL, BuildConfig.MainIp + "high/register.html")
readyGo(BaseWebActivity::class.java, bundle)
}
tv_aboutas_policy.setOnClickListener {
val bundle = Bundle()
bundle.putString(BaseWebActivity.BUNDLE_KEY_TITLE, "隐私政策")
bundle.putString(BaseWebActivity.BUNDLE_KEY_URL, BuildConfig.MainIp + "personal.html")
readyGo(BaseWebActivity::class.java, bundle)
}
}
}
...@@ -325,8 +325,6 @@ public class AwardActivity extends BaseActivity implements AwardView { ...@@ -325,8 +325,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
@Override @Override
public void vedioAdingListenerError(String adType) { public void vedioAdingListenerError(String adType) {
hideLoading(); hideLoading();
System.out.println("mcg __ VedioAdingManager: vedioAdingListenerError--adType:" + adType);
// showToast("视频异常,请重试"); // showToast("视频异常,请重试");
} }
...@@ -334,7 +332,6 @@ public class AwardActivity extends BaseActivity implements AwardView { ...@@ -334,7 +332,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
public void vedioAdingListenerFail(String adType) { public void vedioAdingListenerFail(String adType) {
// showToast("人工添加,第一次加载失败"); // showToast("人工添加,第一次加载失败");
System.out.println("mcg __ VedioAdingManager: vedioAdingListenerFail");
// hideLoading(); // hideLoading();
vedioAdingManager.loadFailAding(bean); vedioAdingManager.loadFailAding(bean);
...@@ -344,7 +341,6 @@ public class AwardActivity extends BaseActivity implements AwardView { ...@@ -344,7 +341,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
showToast("加载超时,请休息一下"); showToast("加载超时,请休息一下");
hideLoading(); hideLoading();
System.out.println("mcg __ 内部 vedioAdingListenerError adType:" + adType);
} }
@Override @Override
...@@ -352,12 +348,10 @@ public class AwardActivity extends BaseActivity implements AwardView { ...@@ -352,12 +348,10 @@ public class AwardActivity extends BaseActivity implements AwardView {
hideLoading(); hideLoading();
showToast("视频加载异常,请重试!"); showToast("视频加载异常,请重试!");
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);
hideLoading(); hideLoading();
vedioAdingSuccess(adType); vedioAdingSuccess(adType);
...@@ -403,7 +397,6 @@ public class AwardActivity extends BaseActivity implements AwardView { ...@@ -403,7 +397,6 @@ public class AwardActivity extends BaseActivity implements AwardView {
public void vedioAdingListenerSuccess(String adType) { public void vedioAdingListenerSuccess(String adType) {
hideLoading(); hideLoading();
// showToast("成功了"); // showToast("成功了");
System.out.println("mcg __ VedioAdingManager: vedioAdingListenerSuccess --- 是否点击下载isVedioAdDownload=" + vedioAdingManager.isVedioAdDownload());
vedioAdingSuccess(adType); vedioAdingSuccess(adType);
} }
}); });
......
...@@ -163,8 +163,6 @@ public class RedboxActivity extends BaseActivity implements RedboxView { ...@@ -163,8 +163,6 @@ public class RedboxActivity extends BaseActivity implements RedboxView {
if (tvRedboxOne != null) { if (tvRedboxOne != null) {
if (AntiShake.check(tvRedboxOne.getId())) return; if (AntiShake.check(tvRedboxOne.getId())) return;
} }
System.out.println("mcg __ redbox onresume");
insertScreenAd.showInsertScreenAd(Constant.CARRIER_REDENVELOPE); insertScreenAd.showInsertScreenAd(Constant.CARRIER_REDENVELOPE);
redboxPresenter.getAllRedEnvelopeMsg(); redboxPresenter.getAllRedEnvelopeMsg();
} }
......
...@@ -121,7 +121,7 @@ public class WebActivity extends BaseActivity { ...@@ -121,7 +121,7 @@ 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); // 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);
......
package com.mints.highgold.ui.activitys;
import android.support.v4.app.FragmentTransaction;
import android.view.View;
import com.mints.highgold.R;
import com.mints.highgold.mvp.presenters.YilanVedioPresenter;
import com.mints.highgold.ui.activitys.base.BaseActivity;
import com.mints.highgold.ui.widgets.CountDownVedioView;
import com.mints.library.utils.nodoubleclick.AntiShake;
import com.yilan.sdk.player.UserCallback;
import com.yilan.sdk.player.entity.PlayData;
import com.yilan.sdk.player.utils.Constant;
import com.yilan.sdk.ui.ad.entity.AdEntity;
import com.yilan.sdk.ui.configs.AdVideoCallback;
import com.yilan.sdk.ui.configs.LittleVideoConfig;
import com.yilan.sdk.ui.littlevideo.LittleVideoFragment;
import butterknife.Bind;
import butterknife.OnClick;
public class YilanVedioActivity extends BaseActivity {
@Bind(R.id.cdvv_yilan_time)
CountDownVedioView cdvvYilanTime;
private LittleVideoFragment littleVideoFragment;
private YilanVedioPresenter yilanVedioPresenter;
@Override
protected int getContentViewLayoutID() {
return R.layout.activity_yilan_vedio;
}
@Override
protected void initViewsAndEvents() {
// yilanVedioPresenter = new YilanVedioPresenter();
// yilanVedioPresenter.attachView(this);
cdvvYilanTime.start();
showLittle();
}
@Override
protected boolean isApplyKitKatTranslucency() {
return false;
}
@Override
public void onDestroy() {
super.onDestroy();
// yilanVedioPresenter.detachView();
}
@OnClick({R.id.iv_activity_back})
public void onClick(View view) {
if (AntiShake.check(view.getId())) return;
switch (view.getId()) {
case R.id.iv_activity_back:
finish();
break;
}
}
private void showLittle() {
FragmentTransaction transaction = getSupportFragmentManager().beginTransaction();
if (littleVideoFragment == null) {
littleVideoFragment = LittleVideoFragment.newInstance();
transaction.add(R.id.yilan_frame_container, littleVideoFragment, LittleVideoFragment.class.getSimpleName());
littleVideoFragment.setUserCallBack(new UserCallback() {
@Override
public boolean event(int type, PlayData data, int playerHash) {
switch (type) {
case Constant.STATE_PREPARED:
break;
case Constant.STATE_ERROR:
break;
case Constant.STATE_PLAYING:
break;
case Constant.STATE_COMPLETE:
break;
case Constant.STATE_PAUSED:
break;
}
return false;
}
});
LittleVideoConfig.getInstance()
.setAdVideoCallback(new AdVideoCallback() {
@Override
public void onVideoLoad(AdEntity adEntity) {
}
@Override
public void onVideoError(int i, AdEntity adEntity) {
}
@Override
public void onVideoAdStartPlay(AdEntity adEntity) {
}
@Override
public void onVideoAdPaused(AdEntity adEntity) {
}
@Override
public void onVideoAdContinuePlay(AdEntity adEntity) {
}
@Override
public void onVideoAdComplete(AdEntity adEntity) {
}
});//设置视频广告回调
} else {
transaction.show(littleVideoFragment);
}
transaction.commitAllowingStateLoss();
}
}
...@@ -349,7 +349,6 @@ public class MainFragment extends BaseFragment ...@@ -349,7 +349,6 @@ public class MainFragment extends BaseFragment
switch (view.getId()) { switch (view.getId()) {
case R.id.tv_fragment_main_whatgold:// 如何赚金币 case R.id.tv_fragment_main_whatgold:// 如何赚金币
readyGo(WhatGoldActivity.class); readyGo(WhatGoldActivity.class);
// MintegralVedioAdManager.getInstance(getActivity()).loadMintegralAd(0,0,"","");
break; break;
case R.id.rl_fragment_main_redbox:// 红包 case R.id.rl_fragment_main_redbox:// 红包
readyGo(RedboxActivity.class); readyGo(RedboxActivity.class);
...@@ -432,7 +431,6 @@ public class MainFragment extends BaseFragment ...@@ -432,7 +431,6 @@ public class MainFragment extends BaseFragment
return; return;
} }
if (userConfig != null) { if (userConfig != null) {
dialogDrink(userConfig.getCoin(), waterBean.getCoin()); dialogDrink(userConfig.getCoin(), waterBean.getCoin());
} }
...@@ -465,31 +463,35 @@ public class MainFragment extends BaseFragment ...@@ -465,31 +463,35 @@ public class MainFragment extends BaseFragment
// 保存穿山甲激励视频ip // 保存穿山甲激励视频ip
spUtil.putString(Constant.CSJ_VEDIO_APPIP, data.getAppIp()); spUtil.putString(Constant.CSJ_VEDIO_APPIP, data.getAppIp());
//测试数据
// data.setVedioplan_csj_vedio_rate(0);
// data.setVedioplan_lyh_vedio_rate(0);
// data.setVedioplan_csj_full_screen_video_rate(0);
// data.setVedioplan_hytech_vedio_rate(0);
// data.setVedioplan_mintegral_vedio_rate(0);
//
// data.setVedioplan_csj_vedio_surplus(0);
// data.setVedioplan_lyh_vedio_surplus(0);
// data.setVedioplan_csj_full_screen_video_surplus(0);
// data.setVedioplan_hytech_vedio_surplus(0);
// data.setVedioplan_mintegral_vedio_surplus(0);
// 设置随机广告权重 // 设置随机广告权重
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(),0); 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(0, 0, 0,0, 1);
} }
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());
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());
// 广告完成数 // 广告完成数
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 = 0; 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.csjVedioAdCount = 0;
// AppConfig.ylhAdCount = 0;
// AppConfig.csjFullAdCount = 0;
// AppConfig.hytechVedioAdCount = 0;
// AppConfig.mintegralAdCount = 20;
AppConfig.yilanVedioTime = data.getRedPacketSecond(); AppConfig.yilanVedioTime = data.getRedPacketSecond();
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());
userManager.setAdShowFlag(data.isAdFlag()); userManager.setAdShowFlag(data.isAdFlag());
// 显示游戏文字 // 显示游戏文字
......
...@@ -24,6 +24,7 @@ import com.mints.highgold.mvp.model.BannerInfoBean; ...@@ -24,6 +24,7 @@ import com.mints.highgold.mvp.model.BannerInfoBean;
import com.mints.highgold.mvp.model.MyInfo; import com.mints.highgold.mvp.model.MyInfo;
import com.mints.highgold.mvp.presenters.MyPresenter; import com.mints.highgold.mvp.presenters.MyPresenter;
import com.mints.highgold.mvp.views.MyView; import com.mints.highgold.mvp.views.MyView;
import com.mints.highgold.ui.activitys.Aboutas2Activity;
import com.mints.highgold.ui.activitys.AboutasActivity; import com.mints.highgold.ui.activitys.AboutasActivity;
import com.mints.highgold.ui.activitys.DrawcashActivity; import com.mints.highgold.ui.activitys.DrawcashActivity;
import com.mints.highgold.ui.activitys.FeekbackActivity; import com.mints.highgold.ui.activitys.FeekbackActivity;
...@@ -226,6 +227,7 @@ public class MyFragment extends BaseFragment ...@@ -226,6 +227,7 @@ public class MyFragment extends BaseFragment
break; break;
case R.id.rl_my_aboutas: case R.id.rl_my_aboutas:
readyGo(AboutasActivity.class); readyGo(AboutasActivity.class);
// readyGo(Aboutas2Activity.class);
break; break;
case R.id.tv_my_invitecode_copy: case R.id.tv_my_invitecode_copy:
case R.id.tv_my_invitecode: case R.id.tv_my_invitecode:
......
<?xml version="1.0" encoding="utf-8"?>
<android.support.constraint.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
xmlns:app="http://schemas.android.com/apk/res-auto"
xmlns:tools="http://schemas.android.com/tools"
android:layout_width="match_parent"
android:layout_height="match_parent"
tools:context=".ui.activitys.Aboutas2Activity">
</android.support.constraint.ConstraintLayout>
\ No newline at end of file
...@@ -20,7 +20,6 @@ buildscript { ...@@ -20,7 +20,6 @@ buildscript {
dependencies { dependencies {
classpath 'com.android.tools.build:gradle:3.5.1' classpath 'com.android.tools.build:gradle:3.5.1'
classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version" classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
// TalkingDada 灵动事件 // TalkingDada 灵动事件
// classpath 'com.tendcloud:codeless-gradle-plugin:0.0.2' // classpath 'com.tendcloud:codeless-gradle-plugin:0.0.2'
} }
......
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