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
2dd1bc06
Commit
2dd1bc06
authored
Feb 06, 2021
by
jyx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
牧场人生获取奖励方式修改
parent
a998e702
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
20 deletions
+29
-20
AndroidManifest.xml
GoodMoney/app/src/main/AndroidManifest.xml
+1
-0
MyPresenter.kt
...in/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
+2
-2
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+26
-18
No files found.
GoodMoney/app/src/main/AndroidManifest.xml
View file @
2dd1bc06
...
@@ -251,6 +251,7 @@
...
@@ -251,6 +251,7 @@
<!-- 监听apk安装 -->
<!-- 监听apk安装 -->
<service
<service
android:name=
".service.AppInstallService"
android:name=
".service.AppInstallService"
android:enabled=
"true"
android:exported=
"false"
/>
android:exported=
"false"
/>
<!-- JPUSH 用户自定义的广播接收器 -->
<!-- JPUSH 用户自定义的广播接收器 -->
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/mvp/presenters/MyPresenter.kt
View file @
2dd1bc06
...
@@ -251,9 +251,9 @@ open class MyPresenter : BasePresenter<MyView>() {
...
@@ -251,9 +251,9 @@ open class MyPresenter : BasePresenter<MyView>() {
*
*
* value
* value
*/
*/
fun
setHighTaskType
(
value
:
String
)
{
fun
setHighTaskType
(
carrierType
:
String
,
value
:
String
)
{
val
vo
=
HashMap
<
String
,
Any
>()
val
vo
=
HashMap
<
String
,
Any
>()
vo
[
"carrierType"
]
=
Constant
.
CARRIER_HIGH_ACTIVITY
vo
[
"carrierType"
]
=
carrierType
vo
[
"value"
]
=
value
vo
[
"value"
]
=
value
AppHttpManager
.
getInstance
(
loanApplication
)
AppHttpManager
.
getInstance
(
loanApplication
)
.
call
(
loanService
.
setStatusInOneDayByCarrierType
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
.
call
(
loanService
.
setStatusInOneDayByCarrierType
(
vo
),
object
:
BaseSubscriber
<
BaseResponse
<
Any
>>()
{
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
2dd1bc06
...
@@ -89,7 +89,6 @@ class MyFragment : BaseFragment(),
...
@@ -89,7 +89,6 @@ class MyFragment : BaseFragment(),
private
var
curSignCoin
=
50
private
var
curSignCoin
=
50
// 牧场人生安装奖励金币
// 牧场人生安装奖励金币
private
var
downloadMCRSCoin
=
50
private
var
pkgMCRSName
=
"com.harvestmoon.android"
private
var
pkgMCRSName
=
"com.harvestmoon.android"
// 签到信息
// 签到信息
...
@@ -157,14 +156,14 @@ class MyFragment : BaseFragment(),
...
@@ -157,14 +156,14 @@ class MyFragment : BaseFragment(),
private
fun
refreshHighTask
()
{
private
fun
refreshHighTask
()
{
if
(
AppConfig
.
isHighTask
&&
mCurrentPkg
!=
null
)
{
if
(
AppConfig
.
isHighTask
&&
mCurrentPkg
!=
null
)
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
mCurrentPkg
!!
,
30
))
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
mCurrentPkg
!!
,
30
))
{
myPresenter
.
setHighTaskType
(
"1"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"1"
)
}
else
{
}
else
{
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
0
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
0
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_HIGH_ACTIVITY
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
myPresenter
.
setHighTaskType
(
"0"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
}
}
AppConfig
.
isHighTask
=
false
AppConfig
.
isHighTask
=
false
}
}
...
@@ -514,7 +513,7 @@ class MyFragment : BaseFragment(),
...
@@ -514,7 +513,7 @@ class MyFragment : BaseFragment(),
// if (TextUtils.isEmpty(mCurrentPkg)) {
// if (TextUtils.isEmpty(mCurrentPkg)) {
if
(
mCurrentPkg
==
null
)
{
if
(
mCurrentPkg
==
null
)
{
showToast
(
"任务异常,请重试~"
)
showToast
(
"任务异常,请重试~"
)
myPresenter
.
setHighTaskType
(
"0"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
AppConfig
.
isHighTask
=
false
AppConfig
.
isHighTask
=
false
}
else
{
}
else
{
...
@@ -524,7 +523,7 @@ class MyFragment : BaseFragment(),
...
@@ -524,7 +523,7 @@ class MyFragment : BaseFragment(),
AppConfig
.
isHighTask
=
true
AppConfig
.
isHighTask
=
true
}
else
{
}
else
{
showToast
(
"未找到当前APP、可能被卸载,请重试~"
)
showToast
(
"未找到当前APP、可能被卸载,请重试~"
)
myPresenter
.
setHighTaskType
(
"0"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"0"
)
AppConfig
.
isHighTask
=
false
AppConfig
.
isHighTask
=
false
}
}
...
@@ -714,15 +713,27 @@ class MyFragment : BaseFragment(),
...
@@ -714,15 +713,27 @@ class MyFragment : BaseFragment(),
}
}
}
}
MainMyAdapter
.
TO_FIRSTDOWNLOAD
->
{
MainMyAdapter
.
TO_FIRSTDOWNLOAD
->
{
// 牧场人生下载金币赋值
if
(
taskBean
.
otherConfig
!=
null
)
{
downloadMCRSCoin
=
taskBean
.
otherConfig
.
coin
when
(
taskBean
.
otherConfig
.
status
)
{
pkgMCRSName
=
taskBean
.
otherConfig
.
pkg
0
->
{
// 牧场人生包名
pkgMCRSName
=
taskBean
.
otherConfig
.
pkg
// 下载牧场人生
// 下载牧场人生
DownloadApkManager
.
downloadApk
(
requireActivity
(),
taskBean
.
otherConfig
.
downloadUrl
,
pkgMCRSName
)
DownloadApkManager
.
downloadApk
(
requireActivity
(),
taskBean
.
otherConfig
.
downloadUrl
,
pkgMCRSName
)
// 开启广播监听安装事件
// 开启广播监听安装事件
registerBroad
()
registerBroad
()
}
1
->
{
// 牧场人生APP,直接弹奖励框
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
taskBean
.
otherConfig
.
coin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
}
}
}
}
}
}
...
@@ -1256,14 +1267,11 @@ class MyFragment : BaseFragment(),
...
@@ -1256,14 +1267,11 @@ class MyFragment : BaseFragment(),
mCurrentPkg
=
pkg
mCurrentPkg
=
pkg
// ps.put(Constant.HIGH_TASK_PKG_NAME, pkg)
// ps.put(Constant.HIGH_TASK_PKG_NAME, pkg)
myPresenter
.
setHighTaskType
(
"3"
)
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_HIGH_ACTIVITY
,
"3"
)
}
else
if
(
TextUtils
.
equals
(
pkg
,
pkgMCRSName
))
{
}
else
if
(
TextUtils
.
equals
(
pkg
,
pkgMCRSName
))
{
// 牧场人生APP,直接弹奖励框
// 上报后台更新按钮状态
val
bundle
=
Bundle
()
myPresenter
.
setHighTaskType
(
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
,
"1"
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
downloadMCRSCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
}
}
}
catch
(
e
:
Exception
)
{
}
catch
(
e
:
Exception
)
{
...
...
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