Commit b93ab0c8 authored by jyx's avatar jyx

Merge branch 'dev_ad' of http://39.97.65.143:81/android/android_goodmoney into dev_ad

parents 7ccdbd65 5bd38d28
......@@ -233,7 +233,6 @@ dependencies {
implementation 'com.liulishuo.filedownloader:library:1.7.7'
implementation "org.greenrobot:eventbus:3.1.0-RC"
// 掌阅书城
// implementation(name: 'iReader-release-androidx-1.0.3.1_haozhuanqian', ext: 'aar')
implementation(name: 'iReader-release-1.0.1', ext: 'aar')
implementation 'com.alibaba:fastjson:1.2.11'
implementation 'androidx.annotation:annotation:1.0.0'
......@@ -268,9 +267,17 @@ dependencies {
implementation(name: 'tzsdk_reporter-3.0.0-20200807131516-release', ext: 'aar')
// 快手
implementation(name: 'kssdk-ad-3.3.6-publishRelease', ext: 'aar')
// 抖音滑动LayoutManager
implementation(name: 'LayoutManagerGroup', ext: 'aar')
// 蘑菇星球
implementation(name: 'moku-planet-api-native-sdk-1.1.10', ext: 'aar')
implementation "androidx.swiperefreshlayout:swiperefreshlayout:1.1.0"
implementation 'com.jakewharton.rxrelay2:rxrelay:2.1.1'
implementation 'io.reactivex.rxjava2:rxandroid:2.1.1'
implementation 'com.squareup.retrofit2:adapter-rxjava2:2.6.2'
implementation 'com.squareup.retrofit2:converter-scalars:2.6.2'
implementation 'com.squareup.retrofit2:converter-gson:2.6.2'
// 激励视频RTA
implementation(name: 'taskwake1.0', ext: 'aar')
......
......@@ -663,4 +663,29 @@
# -dontwarn com.kwad.**
# -dontwarn com.ksad.**
# -dontwarn aegon.chrome.**
# ======================= 快手 END ================
\ No newline at end of file
# ======================= 快手 END ================
# ===================== 蘑菇星球 START ================
-keep class com.fendasz.moku.planet.** { *; }
-keep class com.fendasz.moku.liulishuo.okdownload.** { *; }
-keep class com.bun.miitmdid.core.** {*;}
-keep class com.google.android.material.** {*;}
-keep class android.support.design.** {*;}
-keep class androidx.swiperefreshlayout.widget.** {*;}
-keep class android.support.v4.widget.** {*;}
##Glide
-dontwarn com.bumptech.glide.**
-keep class com.bumptech.glide.**{*;}
-keep public class * implements com.bumptech.glide.module.GlideModule
-keep public class * extends com.bumptech.glide.AppGlideModule
-keep public enum com.bumptech.glide.load.resource.bitmap.ImageHeaderParser$** {
**[] $VALUES;
public *;
}
# ======================= 蘑菇星球 END ================
\ No newline at end of file
......@@ -39,6 +39,9 @@
<uses-permission android:name="android.permission.SYSTEM_ALERT_WINDOW" />
<uses-permission android:name="com.mints.goodmoney.permission" />
<!-- 蘑菇星球 -->
<uses-permission android:name="android.permission.REQUEST_DELETE_PACKAGES"/>
<permission
android:name="com.mints.goodmoney.permission"
android:protectionLevel="normal" />
......
......@@ -201,6 +201,7 @@ object Constant {
const val HOT_ACTIVITY_SHARE_NEWS = "TO_SHARE_NEWS"
const val HOT_ACTIVITY_CPD = "TO_CPD"
const val HOT_ACTIVITY_CALLSHOW = "TO_CALLSHOW"
const val HOT_ACTIVITY_MOKU = "TO_MOKU"
// 打开激活
const val FIRST_DEVICE_FLAG = "first_device_flag"
......
package com.mints.goodmoney.manager
import android.app.Activity
import android.content.Context
import android.text.TextUtils
import com.fendasz.moku.planet.entity.StyleConfig
import com.fendasz.moku.planet.exception.MokuException
import com.fendasz.moku.planet.helper.MokuHelper
import com.mints.goodmoney.R
/**
* 描述:蘑菇星球
* 作者:孟崔广
*/
object MokuManager {
private const val APP_ID = "Y0jqdW3W"
private const val APP_KEY = "421ec06a6f1dbd75010f6f9e4d821cfe03e3a7a3"
fun init(activity: Activity) {
//初始化sdk
MokuHelper.initSdk(activity)
}
fun initOaid(oaid: String) {
//设置oaid
MokuHelper.initOaid(oaid)
}
fun gotoMoku(context: Context) {
val userId = UserManager.getInstance().userID
if (TextUtils.isEmpty(userId)) {
return
}
try {
//启动sdk
MokuHelper.startSdk(context, userId, APP_ID, APP_KEY)
} catch (e: MokuException) {
e.printStackTrace()
}
val styleConfig = StyleConfig()
//设置页面标题文字
styleConfig.titleText = "蘑菇星球"
//设置标题栏颜色
styleConfig.titleColor = context.getResources().getColor(R.color.green_morandi)
//设置状态栏颜色
styleConfig.statusBarColor = context.getResources().getColor(R.color.green_morandi)
//设置标题栏返回键颜色
styleConfig.titleBackColor = context.getResources().getColor(R.color.white)
//设置标题文字颜色
styleConfig.titleTextColor = context.getResources().getColor(R.color.white)
//设置选项框背景颜色
styleConfig.tabBackgroundColor = context.getResources().getColor(R.color.moku_gray_very_light)
//设置选项框指示器颜色
styleConfig.tabIndicatorColor = context.getResources().getColor(R.color.green_morandi)
//设置选项文字默认颜色
styleConfig.tabTextColor = context.getResources().getColor(R.color.green_morandi_light)
//设置选项文字选中颜色
styleConfig.tabSelectedTextColor = context.getResources().getColor(R.color.green_morandi)
//设置主题样式
MokuHelper.initStyleConfig(styleConfig)
try {
//跳转到蘑菇星球页面
MokuHelper.startMokuMainActivity(context)
} catch (e: MokuException) {
e.printStackTrace()
}
}
}
......@@ -15,6 +15,7 @@ import com.mints.goodmoney.ad.express.TTPreLoadCarrierExpressManager
import com.mints.goodmoney.ad.video.VideoAdingManager
import com.mints.goodmoney.common.AppConfig
import com.mints.goodmoney.common.Constant
import com.mints.goodmoney.manager.MokuManager
import com.mints.goodmoney.manager.SceneManager
import com.mints.goodmoney.manager.UserManager
import com.mints.goodmoney.manager.ZhangyueManager
......@@ -51,6 +52,7 @@ class MainActivity : BaseActivity(), MainView, View.OnClickListener {
override fun initViewsAndEvents() {
ZhangyueManager.onCreateIreader(baseApplication)
MokuManager.init(this)
showShortVedioLayout()
......
......@@ -60,6 +60,9 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
// 其他下载应用
const val TO_DOWNLOADS = "TO_DOWNLOADS"
// 蘑菇星球
const val TO_MOKU = "TO_MOKU"
}
private var mContext: Context = context
......
......@@ -19,6 +19,7 @@ import androidx.viewpager.widget.ViewPager
import com.component.dly.xzzq_ywsdk.YwSDK_WebActivity.Companion.open
import com.fly.scenemodule.SceneUtil
import com.mints.goodmoney.BuildConfig
import com.mints.goodmoney.MintsApplication
import com.mints.goodmoney.R
import com.mints.goodmoney.ad.banner.BannerManager
import com.mints.goodmoney.ad.express.PreLoadExpressManager
......@@ -813,6 +814,9 @@ class MyFragment : BaseFragment(),
}
}
}
MainMyAdapter.TO_MOKU -> {
gotoMoku()
}
}
}
}
......@@ -1016,6 +1020,9 @@ class MyFragment : BaseFragment(),
bundle.putInt(Constant.WRAPPER_TYPE, Constant.WRAPPER_TYPE_KYL)
readyGo(WrapperActivity::class.java, bundle)
}
Constant.HOT_ACTIVITY_MOKU -> {
gotoMoku()
}
else -> {
if (!TextUtils.isEmpty(hotBean.url) && !TextUtils.isEmpty(hotBean.title)) {
val bundle = Bundle()
......@@ -1131,6 +1138,10 @@ class MyFragment : BaseFragment(),
// 聚乐云初始化
SceneManager.initScene()
SceneManager.signIn(requireActivity())
if (!TextUtils.isEmpty(MintsApplication.OAID)) {
MokuManager.initOaid(MintsApplication.OAID)
}
}
private fun initView() {
......@@ -1398,4 +1409,17 @@ class MyFragment : BaseFragment(),
mReceiverBroadcastReceiver = null
}
}
fun gotoMoku() {
RxPermissions(requireActivity())
.request(Manifest.permission.READ_PHONE_STATE,
Manifest.permission.READ_EXTERNAL_STORAGE)
.subscribe { granted: Boolean ->
if (granted) {
MokuManager.gotoMoku(requireContext())
} else {
showMissingPermissionDialog("设备,存储")
}
}
}
}
\ 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