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
33daf374
Commit
33daf374
authored
Jan 07, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加微转风享
parent
b17d6bea
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
185 additions
and
14 deletions
+185
-14
build.gradle
GoodMoney/app/build.gradle
+8
-7
articlesdk-v1.0.6.202012121917-x.aar
GoodMoney/app/libs/articlesdk-v1.0.6.202012121917-x.aar
+0
-0
proguard-rules.pro
GoodMoney/app/proguard-rules.pro
+69
-1
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+1
-1
InitAppService.kt
...y/app/src/main/java/com/mints/goodmoney/InitAppService.kt
+12
-0
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+2
-0
MyInfo.java
...p/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
+9
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+1
-1
MainMyAdapter.kt
...main/java/com/mints/goodmoney/ui/adapter/MainMyAdapter.kt
+4
-1
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+61
-3
AppUtil.kt
...ey/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
+18
-0
No files found.
GoodMoney/app/build.gradle
View file @
33daf374
...
...
@@ -132,9 +132,9 @@ android {
dependencies
{
implementation
fileTree
(
include:
[
'*.jar'
],
dir:
'libs'
)
implementation
'androidx.appcompat:appcompat:1.2.0'
implementation
'androidx.constraintlayout:constraintlayout:
1.1.3
'
implementation
'androidx.recyclerview:recyclerview:1.
0
.0'
implementation
'com.google.android.material:material:1.
0.0
'
implementation
'androidx.constraintlayout:constraintlayout:
2.0.4
'
implementation
'androidx.recyclerview:recyclerview:1.
1
.0'
implementation
'com.google.android.material:material:1.
2.1
'
// 网络请求
implementation
'com.squareup.retrofit2:retrofit:2.7.1'
...
...
@@ -183,10 +183,9 @@ dependencies {
// 圆角库
implementation
'com.github.SheHuan:NiceImageView:1.0.5'
// 工具类
// gson
implementation
'com.google.code.gson:gson:2.8.
1
'
implementation
'com.google.code.gson:gson:2.8.
6
'
// BASE64Decoder
// implementation files('libs/sun.misc.BASE64Decoder.jar')
...
...
@@ -233,7 +232,6 @@ dependencies {
implementation
(
name:
'cmgame-sdk-tt3251-2.0.7'
,
ext:
'aar'
)
implementation
(
name:
'x5fit-2.0.7'
,
ext:
'aar'
)
implementation
(
name:
'gdtfit-2.0.7'
,
ext:
'aar'
)
// implementation files("libs/qq_x5.jar")
// 鱼丸盒子
implementation
(
name:
'xzzq_ywsdk_1.1.0'
,
ext:
'aar'
)
implementation
"org.jetbrains.kotlin:kotlin-stdlib-jdk7:1.4.0"
...
...
@@ -262,7 +260,10 @@ dependencies {
implementation
(
name:
'scenead-2.2'
,
ext:
'aar'
)
implementation
'com.just.agentweb:agentweb:4.1.2'
// 喜马拉雅 已集成
// 微转阅读
implementation
(
name:
'articlesdk-v1.0.6.202012121917-x'
,
ext:
'aar'
)
// testImplementation 'junit:junit:4.13'
// androidTestImplementation 'androidx.test.ext:junit:1.1.2'
...
...
GoodMoney/app/libs/articlesdk-v1.0.6.202012121917-x.aar
0 → 100644
View file @
33daf374
File added
GoodMoney/app/proguard-rules.pro
View file @
33daf374
...
...
@@ -571,4 +571,72 @@
-keep class tv.danmaku.ijk.media.player.
*
* {*; }
-dontwarn tv.danmaku.ijk.media.player.*
-keep interface tv.danmaku.ijk.media.player.
*
* { *; }
# ======================= JZVedio END ================
\ No newline at end of file
# ======================= JZVedio END ================
# ===================== 微转分享 START ================
-keep class com.xiangzi.*{*;}
-dontwarn com.xiangzi.
*
*
# x5浏览器混淆需要加
-dontwarn com.tencent.smtt.export.external.
*
*
-keep class com.tencent.smtt.export.external.
*
*{*;}
-keep class com.tencent.tbs.video.interfaces.IUserStateChangedListener {*;}
-keep class com.tencent.smtt.sdk.CacheManager {*;}
-keep class com.tencent.smtt.sdk.CookieManager {*;}
-keep class com.tencent.smtt.sdk.WebHistoryItem {*;}
-keep class com.tencent.smtt.sdk.WebViewDatabase {*;}
-keep class com.tencent.smtt.sdk.WebBackForwardList {*;}
-keep public class com.tencent.smtt.sdk.WebView {*;}
-keep public class com.tencent.smtt.sdk.WebView$HitTestResult{*;}
-keep public class com.tencent.smtt.sdk.WebView$WebViewTransport {*;}
-keep public class com.tencent.smtt.sdk.WebView$PictureListener {*;}
-keepattributes InnerClasses
-keep public enum com.tencent.smtt.sdk.WebSettings$
*
* {*;}
-keep public enum com.tencent.smtt.sdk.QbSdk$
*
* {*;}
-keep public class com.tencent.smtt.sdk.WebSettings {*;}
-keep public class com.tencent.smtt.sdk.ValueCallback{*;}
-keep public class com.tencent.smtt.sdk.WebViewClient {*;}
-keep public class com.tencent.smtt.sdk.DownloadListener {*;}
-keep public class com.tencent.smtt.sdk.WebChromeClient {*;}
-keep public class com.tencent.smtt.sdk.WebChromeClient$FileChooserParams {*;}
-keep class com.tencent.smtt.sdk.SystemWebChromeClient{*;}
# 1. extension interfaces should be apparent
-keep public class com.tencent.smtt.export.external.extension.interfaces.* {*;}
# 2. interfaces should be apparent
-keep public class com.tencent.smtt.export.external.interfaces.* {*;}
-keep public class com.tencent.smtt.sdk.WebViewCallbackClient {*;}
-keep public class com.tencent.smtt.sdk.WebStorage$QuotaUpdater {*;}
-keep public class com.tencent.smtt.sdk.WebIconDatabase {*;}
-keep public class com.tencent.smtt.sdk.WebStorage {*;}
-keep public class com.tencent.smtt.sdk.DownloadListener {*;}
-keep public class com.tencent.smtt.sdk.QbSdk {*;}
-keep public class com.tencent.smtt.sdk.QbSdk$PreInitCallback {*;}
-keep public class com.tencent.smtt.sdk.CookieSyncManager {*;}
-keep public class com.tencent.smtt.sdk.Tbs* {*;}
-keep public class com.tencent.smtt.utils.LogFileUtils {*;}
-keep public class com.tencent.smtt.utils.TbsLog {*;}
-keep public class com.tencent.smtt.utils.TbsLogClient {*;}
-keep public class com.tencent.smtt.sdk.CookieSyncManager {*;}
# Added for game demos
-keep public class com.tencent.smtt.sdk.TBSGamePlayer {*;}
-keep public class com.tencent.smtt.sdk.TBSGamePlayerClient* {*;}
-keep public class com.tencent.smtt.sdk.TBSGamePlayerClientExtension {*;}
-keep public class com.tencent.smtt.sdk.TBSGamePlayerService* {*;}
-keep public class com.tencent.smtt.utils.Apn {*;}
-keep class com.tencent.smtt.
*
* {*;}
# end
-keep public class com.tencent.smtt.export.external.extension.proxy.ProxyWebViewClientExtension {*;}
-keep class MTT.ThirdAppInfoNew {*;}
-keep class com.tencent.mtt.MttTraceEvent {*;}
# Game related
-keep public class com.tencent.smtt.gamesdk.* {*;}
-keep public class com.tencent.smtt.sdk.TBSGameBooter {*;}
-keep public class com.tencent.smtt.sdk.TBSGameBaseActivity {*;}
-keep public class com.tencent.smtt.sdk.TBSGameBaseActivityProxy {*;}
-keep public class com.tencent.smtt.gamesdk.internal.TBSGameServiceClient {*;}
# webView处理,项目中没有使用到webView忽略即可,webview与JS交互内部类不能混淆
-keepclassmembers class com.show.you.WebVerfiedActivity$MyHandler {*;}
-keepattributes *JavascriptInterface*
# ======================= 微转分享 END ================
\ No newline at end of file
GoodMoney/app/src/main/AndroidManifest.xml
View file @
33daf374
...
...
@@ -265,7 +265,7 @@
<receiver
android:name=
".service.PushMessageReceiver"
>
<intent-filter>
<action
android:name=
"cn.jpush.android.intent.RECEIVE_MESSAGE"
/>
<category
android:name=
"${applicationId}"
></category
>
<category
android:name=
"${applicationId}"
/
>
</intent-filter>
</receiver>
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/InitAppService.kt
View file @
33daf374
...
...
@@ -8,6 +8,8 @@ import cn.jpush.android.api.BasicPushNotificationBuilder
import
cn.jpush.android.api.JPushInterface
import
com.mints.goodmoney.manager.BxmManager.initBxm
import
com.mob.MobSDK
import
com.tencent.mm.opensdk.openapi.WXAPIFactory
import
com.xiangzi.articlesdk.XzArticleSdk
/**
* 子线程初始化SDK
...
...
@@ -59,8 +61,18 @@ class InitAppService : IntentService("InitializeService") {
// 变现猫
initBxm
(
this
.
application
)
// 微转分享
initWzShare
()
}
private
fun
initWzShare
()
{
val
iwxapi
=
WXAPIFactory
.
createWXAPI
(
this
,
"wxc8ac2985f6a805e2"
,
false
)
iwxapi
.
registerApp
(
"wxc8ac2985f6a805e2"
)
XzArticleSdk
.
get
().
init
(
MintsApplication
.
getContext
(),
iwxapi
,
"151"
,
"haozhuanqian"
)
}
/**
* 绑定jpush
*/
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
33daf374
...
...
@@ -128,6 +128,7 @@ object Constant {
const
val
CARRIER_XMLY_CHALLENGE
=
"XMLY_CHALLENGE"
//喜马拉雅听书
const
val
CARRIER_KUYINYUE_VEDIO
=
"KUYINYUE_VEDIO"
//酷音乐视频
const
val
CARRIER_HIGH_ACTIVITY
=
"HIGH_ACTIVITY"
//高额任务
const
val
CARRIER_SHARE_NEWS
=
"SHARE_NEWS"
//分享新闻
const
val
CHALLENGE_SHAREFRIEND
=
"CHALLENGE_SHAREFRIEND"
//邀请好友
...
...
@@ -178,6 +179,7 @@ object Constant {
const
val
HOT_ACTIVITY_BOOK
=
"readBook"
const
val
HOT_ACTIVITY_NEWS
=
"TO_RUISHI"
const
val
HOT_ACTIVITY_DHGAME
=
"dhGame"
const
val
HOT_ACTIVITY_SHARE
=
"share"
// 打开激活
const
val
FIRST_DEVICE_FLAG
=
"first_device_flag"
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
View file @
33daf374
...
...
@@ -202,6 +202,15 @@ public class MyInfo implements Serializable {
private
int
complete
;
private
int
status
=
0
;
private
int
coin
;
private
int
readCoin
;
public
int
getReadCoin
()
{
return
readCoin
;
}
public
void
setReadCoin
(
int
readCoin
)
{
this
.
readCoin
=
readCoin
;
}
public
int
getDoubleCoin
()
{
return
doubleCoin
;
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
33daf374
...
...
@@ -156,7 +156,7 @@ class AwardActivity : BaseActivity(), AwardView, View.OnClickListener {
Constant
.
CARRIER_HOMEVEDIO_CHALLENGE
,
Constant
.
CARRIER_MINIVEDIO_CHALLENGE
,
Constant
.
CARRIER_GAME_ONLINE
,
Constant
.
CARRIER_EATMEAL
,
Constant
.
CARRIER_RUISHINEWS_CHALLANGE
,
Constant
.
CARRIER_ZHANGYUE_CHALLENGE
,
Constant
.
CARRIER_XMLY_CHALLENGE
->
{
Constant
.
CARRIER_XMLY_CHALLENGE
,
Constant
.
CARRIER_SHARE_NEWS
->
{
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
carrierType
awardPresenter
.
reportAddCoinMsg
(
vo
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/adapter/MainMyAdapter.kt
View file @
33daf374
...
...
@@ -16,6 +16,9 @@ import com.mints.goodmoney.ui.adapter.listener.OnItemClickListener
class
MainMyAdapter
(
context
:
Context
,
taskData
:
MutableList
<
MyInfo
.
AutoListBean
>)
:
RecyclerView
.
Adapter
<
RecyclerView
.
ViewHolder
>()
{
companion
object
{
// 分享文章
const
val
TO_SHARE_NEWS
=
"TO_SHARE_NEWS"
// 跳转首页
const
val
APP_HiGH_ACTIVITY
=
"APP_HiGH_ACTIVITY"
...
...
@@ -100,7 +103,7 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
holder
.
itemTaskClick
.
setTextColor
(
Color
.
WHITE
)
}
2
->
{
if
(
taskBean
.
baseConfig
.
taskId
==
APP_SHAREFRIEND
)
{
if
(
taskBean
.
baseConfig
.
taskId
==
APP_SHAREFRIEND
||
taskBean
.
baseConfig
.
taskId
==
TO_SHARE_NEWS
)
{
holder
.
itemTaskClick
.
setBackgroundResource
(
R
.
drawable
.
shape_btn_orange
)
holder
.
itemTaskClick
.
setTextColor
(
mContext
.
resources
.
getColor
(
R
.
color
.
color_FB560C
))
}
else
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
33daf374
...
...
@@ -34,7 +34,10 @@ import com.mints.goodmoney.ui.widgets.CustomDialogAsApple
import
com.mints.goodmoney.ui.widgets.DialogListener
import
com.mints.goodmoney.ui.widgets.ShareDialog
import
com.mints.goodmoney.ui.widgets.seekbar.BubbleUtils
import
com.mints.goodmoney.utils.*
import
com.mints.goodmoney.utils.AppUtil
import
com.mints.goodmoney.utils.LogUtil
import
com.mints.goodmoney.utils.QQJumpUtil
import
com.mints.goodmoney.utils.SpanUtils
import
com.mints.library.net.netstatus.NetUtils
import
com.mints.library.utils.CommonUtils
import
com.mints.library.utils.GlideUtils
...
...
@@ -42,6 +45,9 @@ import com.mints.library.utils.nodoubleclick.AntiShake
import
com.scwang.smartrefresh.layout.api.RefreshLayout
import
com.scwang.smartrefresh.layout.listener.OnRefreshListener
import
com.tbruyelle.rxpermissions.RxPermissions
import
com.xiangzi.articlesdk.callback.IXzArticleSdkInitCallback
import
com.xiangzi.articlesdk.core.XzArticleCoreImpl
import
com.xiangzi.articlesdk.exception.XzSdkException
import
io.reactivex.disposables.Disposable
import
kotlinx.android.synthetic.main.fragment_main_my.*
import
kotlinx.android.synthetic.main.header_layout.*
...
...
@@ -90,6 +96,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
// 高额任务
private
var
disposable
:
Disposable
?
=
null
private
var
mCurrentPkg
:
String
?
=
null
private
var
mCarrierType
:
String
?
=
null
private
var
cdaa
:
CustomDialogAsApple
?
=
null
...
...
@@ -489,6 +496,26 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
}
}
// 跳转首页视频
MainMyAdapter
.
TO_SHARE_NEWS
->
{
if
(!
UserManager
.
getInstance
().
userIsLogin
())
{
readyGo
(
WxLoginActivity
::
class
.
java
)
return
}
when
(
taskBean
.
otherConfig
.
status
)
{
0
,
2
->
{
// 去分享文章
shareArticle
(
taskBean
.
otherConfig
.
readCoin
)
}
1
->
{
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
otherConfig
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_SHARE_NEWS
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
// 跳转首页视频
MainMyAdapter
.
TO_HOME
->
{
// if (taskBean.otherConfig != null) {
// when (taskBean.otherConfig.status) {
...
...
@@ -820,6 +847,9 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
TTPreLoadCarrierExpressManager
.
getInstance
().
loadTtFrameLayout
(
TtCsjAdManager
.
TT_AD_NATIVEEXPRESS_EAT
)
readyGo
(
FoodSubsidyActivity
::
class
.
java
)
}
Constant
.
HOT_ACTIVITY_SHARE
->
{
shareArticle
(
300
)
}
else
->
{
if
(!
TextUtils
.
isEmpty
(
hotBean
.
url
)
&&
!
TextUtils
.
isEmpty
(
hotBean
.
title
))
{
val
bundle
=
Bundle
()
...
...
@@ -895,7 +925,9 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
return
}
if
(
mCurrentPkg
!=
null
)
{
if
(
mCarrierType
!=
null
&&
mCarrierType
==
Constant
.
CARRIER_HIGH_ACTIVITY
)
{
mCarrierType
=
null
return
}
...
...
@@ -1061,6 +1093,31 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
LogUtil
.
d
(
TAG
,
"首页视频数:csjCount:${AppConfig.csjVedioAdCount} ylhCount:${AppConfig.ylhAdCount} sdhzCount:${AppConfig.wnVedioAdCount} flCount:${AppConfig.flVedioAdCount}"
)
}
/**
* 分享文章
*/
private
fun
shareArticle
(
coin
:
Int
)
{
if
(
XzArticleCoreImpl
.
get
().
initIsSuccess
())
{
XzArticleCoreImpl
.
get
().
openArticleListActivity
(
requireActivity
())
}
else
{
try
{
XzArticleCoreImpl
.
get
().
initUser
(
userManager
.
userID
,
coin
.
toString
(),
"金币"
,
object
:
IXzArticleSdkInitCallback
{
override
fun
initSuccess
()
{
shareArticle
(
coin
)
}
override
fun
initFailed
(
errMsg
:
String
)
{
LogUtil
.
d
(
errMsg
)
showToast
(
"初始化失败,请稍候重试~"
)
}
})
}
catch
(
e
:
XzSdkException
)
{
e
.
printStackTrace
()
}
}
}
private
fun
highVideoTint
(
taskBean
:
MyInfo
.
AutoListBean
)
{
cdaa
=
CustomDialogAsApple
(
context
,
object
:
DialogListener
()
{
override
fun
onClick
(
v
:
View
)
{
...
...
@@ -1074,6 +1131,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
R
.
id
.
dialog_btn_right
->
{
cdaa
!!
.
dismiss
()
mCarrierType
=
Constant
.
CARRIER_HIGH_ACTIVITY
vedioAdingManager
.
setIsHighWeight
(
true
)
awardVedio
(
taskBean
.
otherConfig
.
coin
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
...
...
@@ -1085,7 +1143,7 @@ class MyFragment : BaseFragment(), MyView, OnItemChildClickListener, OnRefreshLi
val
ssb
=
SpanUtils
()
.
append
(
"1.点击开始任务,观看广告时,点击广告中的下载APP区域\r\n"
+
"2.等待APP下载完成后,安装该APP\r\n"
+
"3.
打开并开启该APP,并进入APP停留
至少30秒"
+
"3.
通过好赚钱APP打开该APP并试玩
至少30秒"
+
"\n\n"
)
.
append
(
"说明:有些可能不是下载APP类型的广告,请关闭广告后重试"
).
setFontSize
(
BubbleUtils
.
dp2px
(
12
))
.
create
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/utils/AppUtil.kt
View file @
33daf374
package
com.mints.goodmoney.utils
import
android.app.ActivityManager
import
android.app.ActivityManager.RunningTaskInfo
import
android.app.Service
import
android.app.usage.UsageStats
import
android.app.usage.UsageStatsManager
...
...
@@ -127,4 +129,20 @@ object AppUtil {
return
-
1
}
fun
isAppRunning
(
paramContext
:
Context
,
paramString
:
String
):
Boolean
{
try
{
val
list
:
List
<*>
=
(
paramContext
.
getSystemService
(
"activity"
)
as
ActivityManager
).
getRunningTasks
(
100
)
if
(
list
.
size
<=
0
)
return
false
val
iterator
=
list
.
iterator
()
while
(
iterator
.
hasNext
())
{
val
bool
=
(
iterator
.
next
()
as
RunningTaskInfo
).
baseActivity
!!
.
packageName
==
paramString
if
(
bool
)
return
true
}
}
catch
(
exception
:
java
.
lang
.
Exception
)
{
exception
.
printStackTrace
()
}
return
false
}
}
\ 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