Commit 983f2ce3 authored by mengcuiguang's avatar mengcuiguang

添加穿山甲激励视频

parent b9f4fdbc
......@@ -187,8 +187,7 @@ dependencies {
// 工具类
// gson
implementation 'com.google.code.gson:gson:2.8.1'
// BASE64Decoder
// implementation files('libs/sun.misc.BASE64Decoder.jar')
// BASE64Decoder(已集成)
// 三方接入
// leakcanary
......@@ -210,8 +209,7 @@ dependencies {
implementation 'com.umeng.umsdk:common:9.1.0' // (必选)
implementation 'com.umeng.umsdk:asms:1.1.3' // asms包依赖(必选)
implementation 'com.umeng.umsdk:crash:0.0.4' // native crash包依赖(必选)
// TalkingDada
implementation files('libs/SaaS_AppAnalytics_Android_SDK_V4.0.36.jar')
// TalkingDada(已集成)
// 一览视频
implementation("com.yilan.sdk:ui:3.1.0.4") {
exclude group: 'com.yilan.sdk', module: 'toutiao'
......@@ -264,9 +262,6 @@ dependencies {
// 微转阅读
implementation (name:'articlesdk-v1.0.6.202012121917-x',ext:'aar')
//天卓SDK的珊瑚2.1组件
//快手SDK 2.6.5之后的版本,SDK有依赖appcompat-v7
// implementation 'com.android.support:appcompat-v7:28.0.0'
// implementation 'com.android.support:recyclerview-v7:28.0.0'
implementation(name: 'tzsdk_coral-2.1.0-20200807130815-release', ext: 'aar')
implementation(name: 'adapt-1.3.3', ext: 'aar')
implementation(name: 'commonbase-1.0.2', ext: 'aar')
......
//package com.mints.goodmoney.ad.vedio;
//
//import android.app.Activity;
//
//import com.bytedance.sdk.openadsdk.AdSlot;
//import com.bytedance.sdk.openadsdk.TTAdConstant;
//import com.bytedance.sdk.openadsdk.TTAdNative;
//import com.bytedance.sdk.openadsdk.TTFullScreenVideoAd;
//import com.mints.goodmoney.common.Constant;
//import com.mints.goodmoney.manager.TTNativeExpressManager;
//import com.mints.goodmoney.manager.TrackManager;
//import com.mints.goodmoney.manager.TtCsjAdManager;
//import com.mints.goodmoney.mvp.presenters.CsjFullVedioAdPresenter;
//import com.mints.goodmoney.mvp.views.VedioAdManagerView;
//
///**
// * 穿山甲全屏广告
// */
//public class CsjFullVedioAdManager extends BaseVedioAd implements VedioAdManagerView {
//
// private static CsjFullVedioAdManager _inst;
//
// private CsjFullVedioAdPresenter csjFullVedioAdPresenter;
// private CsjFullVedioAdListener csjFullVedioAdListener;
//
// Activity activity;
// private TTAdNative ttAdNative;
// private TTFullScreenVideoAd mttFullVideoAd;
//
// private boolean isClickScreen = true; // 是否点击屏幕跳转广告
//
// public static CsjFullVedioAdManager getInstance(Activity activity) {
// if (_inst != null) {
// return _inst;
// } else {
// _inst = new CsjFullVedioAdManager(activity);
// return _inst;
// }
// }
//
// private CsjFullVedioAdManager(Activity activity) {
// super(activity);
// init(activity);
// }
//
// private void init(Activity activity) {
// this.activity = activity;
//
// TTNativeExpressManager ttNativeExpressManager = new TTNativeExpressManager();
// ttAdNative = ttNativeExpressManager.initTTAd(false);
//
// csjFullVedioAdPresenter = new CsjFullVedioAdPresenter();
// csjFullVedioAdPresenter.attachView(this);
// }
//
// /**
// * 全屏广告
// *
// * @param carrierType
// */
// @SuppressWarnings("SameParameterValue")
// @Override
// public void loadAd(Activity activity,int curCoin, String carrierType, String extraId) {
// this.activity = activity;
// if (mttFullVideoAd != null) {
// mttFullVideoAd.setFullScreenVideoAdInteractionListener(null);
// }
// AdSlot adSlot = new AdSlot.Builder()
// .setCodeId(TtCsjAdManager.TT_AD_FULLVEDIO_ALL)
// .setSupportDeepLink(true)
// .setImageAcceptedSize(1080, 1920)
// .setOrientation(TTAdConstant.VERTICAL)
// .build();
// ttAdNative.loadFullScreenVideoAd(adSlot, new TTAdNative.FullScreenVideoAdListener() {
// @Override
// public void onError(int code, String message) {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, String.valueOf(code), message);
//
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdFail();
// }
// }
//
// @Override
// public void onFullScreenVideoAdLoad(TTFullScreenVideoAd ad) {
// mttFullVideoAd = ad;
// mttFullVideoAd.setFullScreenVideoAdInteractionListener(new TTFullScreenVideoAd.FullScreenVideoAdInteractionListener() {
//
// @Override
// public void onAdShow() {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ZERO, "", "");
// }
//
// @Override
// public void onAdVideoBarClick() {
// if (isClickScreen) {
// // 防止重复
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_FOUR, "", "");
// isClickScreen = false;
// }
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_TWO, "", "");
//
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioDownload();
// }
// }
//
// @Override
// public void onAdClose() {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_THREE, "", "");
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdSuccess();
// }
// if (activity != null) {
// csjFullVedioAdPresenter.reportAddCoinMsg(activity, getAdMapVO(carrierType, Constant.AD_SOURCE_CSJFULL, extraId, curCoin));
// }
// }
//
// @Override
// public void onVideoComplete() {
// }
//
// @Override
// public void onSkippedVideo() {
//
// }
//
// });
// }
//
// @Override
// public void onFullScreenVideoCached() {
// if (mttFullVideoAd != null) {
// //step6:在获取到广告后展示
// mttFullVideoAd.showFullScreenVideoAd(activity);
// mttFullVideoAd = null;
// } else {
// TrackManager.getInstance().addCallImp(Constant.AD_SOURCE_CSJFULL, Constant.EVENT_TYPE_ONE, "999999", "Cached Fail");
//
// if (csjFullVedioAdListener != null) {
// csjFullVedioAdListener.csjFullVedioAdFail();
// }
// }
// }
// });
// }
//
// @Override
// public void onDestory() {
// if (mttFullVideoAd != null) {
// mttFullVideoAd.setFullScreenVideoAdInteractionListener(null);
// }
//
// if (csjFullVedioAdPresenter != null) {
// csjFullVedioAdPresenter.dispose();
// csjFullVedioAdPresenter.detachView();
// }
// activity = null;
// }
//
// public void setCsjFullVedioAdListener(CsjFullVedioAdListener csjFullVedioAdListener) {
// this.csjFullVedioAdListener = csjFullVedioAdListener;
// }
//
// public interface CsjFullVedioAdListener {
// void csjFullVedioAdFail();
// void csjFullVedioAdSuccess();
// void csjFullVedioDownload();
// }
//}
......@@ -138,6 +138,8 @@ object Constant {
const val AD_SOURCE_YLH = "YLH"
const val AD_SOURCE_SDHZ = "SDHZ" //闪电盒子
const val AD_SOURCE_FL = "FL" //枫岚
const val AD_SOURCE_CSJFULL = "CSJFULL"
// 调用事件 0 成功 1失败 2点击 3-有效展示 4-去重
const val EVENT_TYPE_ZERO = "0"
......
......@@ -40,6 +40,8 @@ public class TtCsjAdManager {
public static String TT_AD_VEDIO_BIANXIANMAO = "945743459";// 变现猫
public static String TT_AD_VEDIO_HOMEVEDIO = "945744137";// 首页视频翻倍
public static String TT_AD_VEDIO_SMALLHOMEVEDIO = "945744186";// 短视频翻倍
/*全屏视频*/
public static String TT_AD_FULLVEDIO_ALL = "";// 通用
/*信息流*/
public static String TT_AD_NATIVEEXPRESS_XMLY = "945700753";//喜马拉雅信息流
public static String TT_AD_NATIVEEXPRESS_AWARD = "945562047";//信息流弹窗
......
package com.mints.goodmoney.mvp.presenters
import android.app.Activity
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.mvp.model.BaseResponse
import com.mints.goodmoney.mvp.views.VedioAdManagerView
import com.mints.library.net.neterror.BaseSubscriber
import com.mints.library.net.neterror.Throwable
import rx.Subscription
import rx.android.schedulers.AndroidSchedulers
import java.util.*
class CsjFullVedioAdPresenter : BasePresenter<VedioAdManagerView>() {
fun reportAddCoinMsg(activity: Activity?, vo: HashMap<String, Any>) {
if (activity == null) return
loanApplication = activity.application as MintsApplication
loanService = loanApplication.loanService
subscription = loanService.reportAddCoinMsg(vo)
.observeOn(AndroidSchedulers.mainThread())
.subscribeOn(loanApplication.defaultSubscribeScheduler())
.subscribe(object : BaseSubscriber<BaseResponse<Any>>() {
override fun onCompleted() {}
override fun onError(e: Throwable) {
}
override fun onNext(baseResponse: BaseResponse<Any>) {}
})
}
fun dispose() {
loanService = null
loanApplication = null
if (subscription != null && !subscription.isUnsubscribed()) {
subscription.unsubscribe()
}
}
}
\ No newline at end of file
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