Commit 7094a647 authored by mengcuiguang's avatar mengcuiguang

添加听读广告

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