Commit 0344d2ff authored by mengcuiguang's avatar mengcuiguang

优化书城加载

parent 5190f2a5
......@@ -80,8 +80,7 @@ class InitAppService : IntentService("InitializeService") {
initJpush()
// 掌阅书城
ZhangyueManager.attachBaseContextIreader(this.application)
ZhangyueManager.onCreateIreader(this.application)
// ZhangyueManager.onCreateIreader(this.application)
// 变现猫
initBxm(this.application)
......
......@@ -18,6 +18,7 @@ import com.mints.goodmoney.manager.TtCsjAdManager;
import com.mints.goodmoney.manager.UserManager;
import com.mints.goodmoney.manager.YlVideoManager;
import com.mints.goodmoney.manager.YlhAdManager;
import com.mints.goodmoney.manager.ZhangyueManager;
import com.mints.goodmoney.net.LoanService;
import com.mints.goodmoney.utils.ForegroundOrBackground;
import com.mints.goodmoney.utils.LogUtil;
......
......@@ -2,6 +2,7 @@ package com.mints.goodmoney.manager
import android.app.Application
import com.ireader.ireadersdk.IreaderApi
import java.lang.Exception
/**
* 描述:掌阅书城
......@@ -12,10 +13,11 @@ object ZhangyueManager {
private const val APPID = "10054"
fun onCreateIreader(application: Application) {
IreaderApi.onCreate(application, APPID)
}
fun attachBaseContextIreader(application: Application) {
IreaderApi.attachBaseContext(application)
try {
IreaderApi.attachBaseContext(application)
IreaderApi.onCreate(application, APPID)
} catch (e: Exception) {
e.printStackTrace()
}
}
}
\ No newline at end of file
......@@ -12,6 +12,7 @@ import com.mints.goodmoney.R
import com.mints.goodmoney.ad.video.VedioAdingManager
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.ZhangyueManager
import com.mints.goodmoney.mvp.views.MainView
import com.mints.goodmoney.ui.activitys.base.BaseActivity
import com.mints.goodmoney.ui.fragment.*
......@@ -38,6 +39,9 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun getContentViewLayoutID() = R.layout.activity_main
override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication)
if (moneyFragment == null) {
moneyFragment = MoneyFragment()
}
......
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