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
4e9750e7
Commit
4e9750e7
authored
Feb 06, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加牧场人生下载奖励
parent
b1311615
Changes
5
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
45 additions
and
8 deletions
+45
-8
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+7
-0
AppInstallService.java
...n/java/com/mints/goodmoney/service/AppInstallService.java
+2
-0
AwardActivity.kt
...in/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
+2
-2
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
+31
-6
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
4e9750e7
...
...
@@ -135,6 +135,7 @@ object Constant {
const
val
CARRIER_CPD
=
"CPD"
//珊瑚CPD下载试玩任务
const
val
CARRIER_CPD_SYD
=
"CPD_SYD"
//SYDCPD下载试玩任务
const
val
CARRIER_CPD_USEAPP
=
"CPD_USEAPP"
//积分墙体验试玩下载过的APP
const
val
CARRIER_MC_FIRSTDOWNLOAD
=
"MC_FIRSTDOWNLOAD"
// 牧场人生下载奖励
const
val
CHALLENGE_SHAREFRIEND
=
"CHALLENGE_SHAREFRIEND"
//邀请好友
...
...
@@ -242,4 +243,10 @@ object Constant {
// 外网IP地址
const
val
OUT_NET_IP
=
"out_net_ip"
// 外网IP地址
const
val
MCRS_PKG
=
"com.harvestmoon.android"
// 牧场人生下载链接
const
val
MCRS_DOWNLOAD_Url
=
"https://imtt.dd.qq.com/16891/apk/958ADFB4EAA1D4BF8CF5FAD63987EC25.apk?fsname=com.harvestmoon.android_1.0.0.0_1000.apk&csr=1bbd"
}
GoodMoney/app/src/main/java/com/mints/goodmoney/service/AppInstallService.java
View file @
4e9750e7
...
...
@@ -35,6 +35,8 @@ public class AppInstallService extends Service {
private
void
initReceiver
()
{
IntentFilter
intentFilter
=
new
IntentFilter
();
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_ADDED"
);
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_REPLACED"
);
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_REMOVED"
);
intentFilter
.
addDataScheme
(
"package"
);
registerReceiver
(
this
.
broadcastReceiver
,
intentFilter
);
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/AwardActivity.kt
View file @
4e9750e7
...
...
@@ -9,7 +9,6 @@ import android.os.Bundle
import
android.text.TextUtils
import
android.view.KeyEvent
import
android.view.View
import
android.widget.FrameLayout
import
androidx.core.content.ContextCompat
import
com.mints.goodmoney.R
import
com.mints.goodmoney.ad.express.PreLoadExpressManager
...
...
@@ -174,7 +173,8 @@ 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_SHARE_NEWS
->
{
Constant
.
CARRIER_XMLY_CHALLENGE
,
Constant
.
CARRIER_SHARE_NEWS
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
->
{
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 @
4e9750e7
...
...
@@ -54,6 +54,9 @@ class MainMyAdapter(context: Context, taskData: MutableList<MyInfo.AutoListBean>
// 喜马拉雅
const
val
TO_XMLY
=
"TO_XMLY"
// 下载牧场人生
const
val
TO_FIRSTDOWNLOAD
=
"TO_FIRSTDOWNLOAD"
}
private
var
mContext
:
Context
=
context
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
4e9750e7
...
...
@@ -88,6 +88,9 @@ class MyFragment : BaseFragment(),
private
var
carrierType
=
""
private
var
curSignCoin
=
50
// 牧场人生安装奖励金币
private
var
downloadMCRSCoin
=
50
// 签到信息
private
var
signCardBean
:
SignCardBean
?
=
null
...
...
@@ -126,6 +129,9 @@ class MyFragment : BaseFragment(),
override
fun
onResume
()
{
super
.
onResume
()
DownloadApkManager
.
tryOnceInstallApk
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_FIVE
)
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getAutoUserHallBaseMsg
()
...
...
@@ -705,7 +711,16 @@ class MyFragment : BaseFragment(),
}
}
}
}
MainMyAdapter
.
TO_FIRSTDOWNLOAD
->
{
// 牧场人生下载金币赋值
downloadMCRSCoin
=
taskBean
.
otherConfig
.
coin
// 下载牧场人生
DownloadApkManager
.
downloadApk
(
requireActivity
(),
Constant
.
MCRS_DOWNLOAD_Url
,
Constant
.
MCRS_PKG
)
// 开启广播监听安装事件
registerBroad
()
}
}
}
...
...
@@ -1231,19 +1246,29 @@ class MyFragment : BaseFragment(),
override
fun
onReceive
(
context
:
Context
?,
intent
:
Intent
?)
{
if
(
intent
==
null
)
return
// 非高额任务不监听下载安装
if
(
TextUtils
.
equals
(
carrierType
,
Constant
.
CARRIER_HIGH_ACTIVITY
))
{
try
{
val
pkg
=
intent
.
getStringExtra
(
"pkg"
)
// 非高额任务不监听下载安装
if
(
TextUtils
.
equals
(
carrierType
,
Constant
.
CARRIER_HIGH_ACTIVITY
))
{
mCurrentPkg
=
pkg
// ps.put(Constant.HIGH_TASK_PKG_NAME, pkg)
myPresenter
.
setHighTaskType
(
"3"
)
}
else
if
(
TextUtils
.
equals
(
pkg
,
Constant
.
MCRS_PKG
))
{
// 牧场人生APP,直接弹奖励框
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
downloadMCRSCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
return
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
}
}
}
}
...
...
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