Commit 7094a647 authored by mengcuiguang's avatar mengcuiguang

添加听读广告

parent ae631a04
......@@ -671,6 +671,10 @@
# ===================== 听读 START ================
-keep class com.chineseall.reader17ksdk.**{*;}
-keep class com.chineseall.reader.utils.**{*;}
......
......@@ -21,6 +21,11 @@ import com.chineseall.reader17ksdk.utils.book.ScreenUtils
* 邮箱:mengcga@163.com
*/
object ReaderManager {
private const val APP_ID = "1242"
private const val SECRET = "hzq"
private const val APP = "32"
private const val SUBAPP = "0"
private val csjAd by lazy { ReadToutiaoAD() }
private val ylhAd by lazy { ReadYlhAd() }
......@@ -31,7 +36,7 @@ object ReaderManager {
private var isCsjAd: Boolean = true
fun init(applicationContext: Application) {
install(applicationContext, "1242", "hzq@1242", "32", "0", object : AdProvider {
install(applicationContext, APP_ID, SECRET, APP, SUBAPP, object : AdProvider {
/**
* 阅读⻚弹窗广告确认按钮的点击回调-激励视频
* @param dialog
......@@ -78,17 +83,17 @@ object ReaderManager {
curVedioAd = ylhVedioAD
ylhAd.loadVideoAd(ActivityStackManager.getInstance().topActivity, receiver)
}
// isCsjAd = !isCsjAd
isCsjAd = !isCsjAd
}
})
}
private fun onAdDialogInvoke(function0: () -> Unit) {
when(curVedioAd){
csjVedioAD ->{
csjAd.showVideo(ActivityStackManager.getInstance().topActivity) {function0.invoke()}
when (curVedioAd) {
csjVedioAD -> {
csjAd.showVideo(ActivityStackManager.getInstance().topActivity) { function0.invoke() }
}
ylhVedioAD ->{
ylhVedioAD -> {
ylhAd.showVideo(ActivityStackManager.getInstance().topActivity) { function0.invoke() }
}
}
......
......@@ -19,6 +19,7 @@ import kotlinx.android.synthetic.main.header_layout.*
* 作者:孟崔广
* 时间:2020/12/10 12:39
*/
@AndroidEntryPoint
class WrapperActivity : BaseActivity(), View.OnClickListener {
private var wrapperType = Constant.WRAPPER_TYPE_NEWS
......
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