Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
A
android_goodmoney
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
android
android_goodmoney
Commits
5bd38d28
Commit
5bd38d28
authored
Mar 03, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加蘑菇星球
parent
1e4580a5
Changes
9
Show whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
140 additions
and
3 deletions
+140
-3
build.gradle
GoodMoney/app/build.gradle
+9
-2
moku-planet-api-native-sdk-1.1.10.aar
GoodMoney/app/libs/moku-planet-api-native-sdk-1.1.10.aar
+0
-0
proguard-rules.pro
GoodMoney/app/proguard-rules.pro
+26
-1
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+3
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+1
-0
MokuManager.kt
.../src/main/java/com/mints/goodmoney/manager/MokuManager.kt
+72
-0
MainActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
+2
-0
MainMyAdapter.kt
...main/java/com/mints/goodmoney/ui/adapter/MainMyAdapter.kt
+3
-0
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+24
-0
No files found.
GoodMoney/app/build.gradle
View file @
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'
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
GoodMoney/app/libs/moku-planet-api-native-sdk-1.1.10.aar
0 → 100755
View file @
5bd38d28
File added
GoodMoney/app/proguard-rules.pro
View file @
5bd38d28
...
...
@@ -664,3 +664,28 @@
# -dontwarn com.ksad.
*
*
# -dontwarn aegon.chrome.
*
*
# ======================= 快手 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
GoodMoney/app/src/main/AndroidManifest.xml
View file @
5bd38d28
...
...
@@ -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"
/>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
5bd38d28
...
...
@@ -199,6 +199,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"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/MokuManager.kt
0 → 100644
View file @
5bd38d28
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
()
}
}
}
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/MainActivity.kt
View file @
5bd38d28
...
...
@@ -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
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/MainMyAdapter.kt
View file @
5bd38d28
...
...
@@ -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
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
5bd38d28
...
...
@@ -16,6 +16,7 @@ import androidx.recyclerview.widget.DividerItemDecoration
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
...
...
@@ -762,6 +763,9 @@ class MyFragment : BaseFragment(),
}
}
}
MainMyAdapter
.
TO_MOKU
->
{
gotoMoku
()
}
}
}
}
...
...
@@ -965,6 +969,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
()
...
...
@@ -1080,6 +1087,10 @@ class MyFragment : BaseFragment(),
// 聚乐云初始化
SceneManager
.
initScene
()
SceneManager
.
signIn
(
requireActivity
())
if
(!
TextUtils
.
isEmpty
(
MintsApplication
.
OAID
))
{
MokuManager
.
initOaid
(
MintsApplication
.
OAID
)
}
}
private
fun
initView
()
{
...
...
@@ -1343,4 +1354,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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment