Commit 85e3430c authored by jyx's avatar jyx

更新喜马拉雅SDK

parent 21132bf0
......@@ -261,7 +261,9 @@ dependencies {
// 枫岚
implementation(name: 'mh-adsdk', ext: 'aar')
implementation(name: 'mh-adsdk-ext', ext: 'aar')
// 喜马拉雅 已集成
// 喜马拉雅
implementation(name: 'TingPhoneOpenSDK-8.0.2', ext: 'aar')
implementation(name: 'windAd-3.1.1', ext: 'aar')
// 微转阅读(接入h5方式)
//天卓SDK的珊瑚2.0组件
implementation(name: 'adapt-1.3.3', ext: 'aar')
......
File mode changed from 100755 to 100644
......@@ -31,7 +31,6 @@ import com.mints.flowbox.manager.MiitHelper;
import com.mints.flowbox.manager.ad.OwManager;
import com.mints.flowbox.manager.ad.TzManager;
import com.mints.flowbox.manager.ad.WnManager;
import com.mints.flowbox.manager.ad.XmManager;
import com.mints.flowbox.net.LoanService;
import com.mints.flowbox.ui.activitys.ScreenActivity;
import com.mints.flowbox.utils.ForegroundOrBackground;
......@@ -278,9 +277,6 @@ public class MintsApplication extends BaseApp {
// 天卓珊瑚
TzManager.INSTANCE.initTz(this);
// 喜马拉雅
XmManager.INSTANCE.init(this);
// 一览视频
YlVideoManager.INSTANCE.init(this);
......
......@@ -186,4 +186,9 @@ public class AppConfig {
* fake 省电应用数
*/
public static int fakeSaveBatteryCount = 0;
/**
* xmly 是否初始化
*/
public static boolean isXmlyInit = false;
}
......@@ -2,9 +2,11 @@ package com.mints.flowbox.manager.ad
import android.app.Application
import com.mints.flowbox.BuildConfig
import com.mints.flowbox.MintsApplication
import com.mints.flowbox.common.Constant
import com.ximalaya.ting.android.opensdk.constants.ConstantsOpenSdk
import com.ximalaya.ting.android.opensdk.datatrasfer.CommonRequest
import com.ximalaya.ting.android.opensdk.datatrasfer.DeviceInfoProviderDefault
import com.ximalaya.ting.android.opensdk.player.service.XmPlayerConfig
import com.ximalaya.ting.android.opensdk.util.BaseUtil
......@@ -24,7 +26,11 @@ object XmManager {
val ximalaya = CommonRequest.getInstanse()
ximalaya.setAppkey(APP_KEY)
ximalaya.setPackid(Constant.MINTS_PKG_NAME)
ximalaya.init(application, APP_SECRET)
ximalaya.init(application, APP_SECRET, object : DeviceInfoProviderDefault(application) {
override fun oaid(): String {
return MintsApplication.OAID
}
})
}
}
}
\ No newline at end of file
......@@ -111,6 +111,8 @@ class Increasespeed2Activity : BaseActivity(), View.OnClickListener {
override fun onDestroy() {
fl_ad?.removeAllViews()
// 预加载信息流
ExpressManager.loadExpress()
super.onDestroy()
}
......
......@@ -105,6 +105,13 @@ class IncreasespeedActivity : BaseActivity(), View.OnClickListener {
initExpress()
}
override fun onDestroy() {
// 预加载信息流
ExpressManager.loadExpress()
fl_ad?.removeAllViews()
super.onDestroy()
}
/**
* 初始化信息iyc
*/
......
......@@ -5,10 +5,12 @@ import androidx.fragment.app.Fragment
import androidx.fragment.app.FragmentManager
import androidx.fragment.app.FragmentTransaction
import com.androidkun.xtablayout.XTabLayout
import com.mints.flowbox.MintsApplication
import com.mints.flowbox.R
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.UserManager
import com.mints.flowbox.manager.ad.XmManager
import com.mints.flowbox.ui.activitys.MainActivity
import com.mints.flowbox.ui.fragment.base.BaseFragment
import kotlinx.android.synthetic.main.fragment_main_money.*
......@@ -35,6 +37,10 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
override fun getContentViewLayoutID() = R.layout.fragment_main_money
override fun initViewsAndEvents() {
if (!AppConfig.isXmlyInit) {
XmManager.init(MintsApplication.getContext())
}
initView()
}
......@@ -53,7 +59,6 @@ class MoneyFragment : BaseFragment(), XTabLayout.OnTabSelectedListener {
super.onHiddenChanged(hidden)
}
/** 刷新数据 **/
fun refreshData() {
if (AppConfig.fragmentClickFlag == Constant.FRAGMENT_CLICK_TWO) {
......
......@@ -18,6 +18,7 @@ import com.daimajia.androidanimations.library.Techniques
import com.daimajia.androidanimations.library.YoYo
import com.hjq.toast.ToastUtils
import com.mints.flowbox.R
import com.mints.flowbox.ad.express.ExpressManager
import com.mints.flowbox.common.AppConfig
import com.mints.flowbox.common.Constant
import com.mints.flowbox.manager.wifi.WifiStateManager
......@@ -78,6 +79,9 @@ class WifiFragment : BaseFragment(), View.OnClickListener, OnItemClickListener,
}
override fun initViewsAndEvents() {
// 预加载信息流
ExpressManager.loadExpress()
initRecy()
initView()
initListener()
......
......@@ -37,6 +37,7 @@ RELEASE_JPUSH_KEY=d9e939e7ec22a9e11dcfc345
android.useAndroidX=true
android.enableJetifier=true
android.useNewApkCreator=false
####### 保活相关 #######
# vvvvvv 下面不要动!!!!
......
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