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
a998e702
Commit
a998e702
authored
Feb 06, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
代码优化
parent
4e9750e7
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
18 additions
and
13 deletions
+18
-13
Constant.kt
.../app/src/main/java/com/mints/goodmoney/common/Constant.kt
+0
-6
MyInfo.java
...p/src/main/java/com/mints/goodmoney/mvp/model/MyInfo.java
+10
-0
AppInstallService.java
...n/java/com/mints/goodmoney/service/AppInstallService.java
+2
-2
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+6
-5
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/common/Constant.kt
View file @
a998e702
...
@@ -243,10 +243,4 @@ object Constant {
...
@@ -243,10 +243,4 @@ object Constant {
// 外网IP地址
// 外网IP地址
const
val
OUT_NET_IP
=
"out_net_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/mvp/model/MyInfo.java
View file @
a998e702
...
@@ -198,6 +198,8 @@ public class MyInfo implements Serializable {
...
@@ -198,6 +198,8 @@ public class MyInfo implements Serializable {
private
int
doubleCoin
;
private
int
doubleCoin
;
private
int
max
;
private
int
max
;
private
String
carrierType
;
private
String
carrierType
;
private
String
downloadUrl
;
private
String
pkg
;
private
String
doubleCarrierType
;
private
String
doubleCarrierType
;
private
int
complete
;
private
int
complete
;
private
int
status
=
0
;
private
int
status
=
0
;
...
@@ -205,6 +207,14 @@ public class MyInfo implements Serializable {
...
@@ -205,6 +207,14 @@ public class MyInfo implements Serializable {
private
int
readCoin
;
private
int
readCoin
;
private
int
needSeconds
;
private
int
needSeconds
;
public
String
getDownloadUrl
()
{
return
downloadUrl
;
}
public
String
getPkg
()
{
return
pkg
;
}
public
int
getNeedSeconds
()
{
public
int
getNeedSeconds
()
{
return
needSeconds
;
return
needSeconds
;
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/service/AppInstallService.java
View file @
a998e702
...
@@ -35,8 +35,8 @@ public class AppInstallService extends Service {
...
@@ -35,8 +35,8 @@ public class AppInstallService extends Service {
private
void
initReceiver
()
{
private
void
initReceiver
()
{
IntentFilter
intentFilter
=
new
IntentFilter
();
IntentFilter
intentFilter
=
new
IntentFilter
();
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_ADDED"
);
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_ADDED"
);
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_REPLACED"
);
//
intentFilter.addAction("android.intent.action.PACKAGE_REPLACED");
intentFilter
.
addAction
(
"android.intent.action.PACKAGE_REMOVED"
);
//
intentFilter.addAction("android.intent.action.PACKAGE_REMOVED");
intentFilter
.
addDataScheme
(
"package"
);
intentFilter
.
addDataScheme
(
"package"
);
registerReceiver
(
this
.
broadcastReceiver
,
intentFilter
);
registerReceiver
(
this
.
broadcastReceiver
,
intentFilter
);
}
}
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
a998e702
...
@@ -90,6 +90,7 @@ class MyFragment : BaseFragment(),
...
@@ -90,6 +90,7 @@ class MyFragment : BaseFragment(),
// 牧场人生安装奖励金币
// 牧场人生安装奖励金币
private
var
downloadMCRSCoin
=
50
private
var
downloadMCRSCoin
=
50
private
var
pkgMCRSName
=
"com.harvestmoon.android"
// 签到信息
// 签到信息
private
var
signCardBean
:
SignCardBean
?
=
null
private
var
signCardBean
:
SignCardBean
?
=
null
...
@@ -130,9 +131,9 @@ class MyFragment : BaseFragment(),
...
@@ -130,9 +131,9 @@ class MyFragment : BaseFragment(),
override
fun
onResume
()
{
override
fun
onResume
()
{
super
.
onResume
()
super
.
onResume
()
DownloadApkManager
.
tryOnceInstallApk
()
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_FIVE
)
{
if
(
AppConfig
.
fragmentClickFlag
==
Constant
.
FRAGMENT_CLICK_FIVE
)
{
DownloadApkManager
.
tryOnceInstallApk
()
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
if
(!
TextUtils
.
isEmpty
(
userManager
.
userID
))
{
myPresenter
.
getAutoUserHallBaseMsg
()
myPresenter
.
getAutoUserHallBaseMsg
()
refreshHighTask
()
refreshHighTask
()
...
@@ -715,9 +716,10 @@ class MyFragment : BaseFragment(),
...
@@ -715,9 +716,10 @@ class MyFragment : BaseFragment(),
MainMyAdapter
.
TO_FIRSTDOWNLOAD
->
{
MainMyAdapter
.
TO_FIRSTDOWNLOAD
->
{
// 牧场人生下载金币赋值
// 牧场人生下载金币赋值
downloadMCRSCoin
=
taskBean
.
otherConfig
.
coin
downloadMCRSCoin
=
taskBean
.
otherConfig
.
coin
pkgMCRSName
=
taskBean
.
otherConfig
.
pkg
// 下载牧场人生
// 下载牧场人生
DownloadApkManager
.
downloadApk
(
requireActivity
(),
Constant
.
MCRS_DOWNLOAD_Url
,
Constant
.
MCRS_PKG
)
DownloadApkManager
.
downloadApk
(
requireActivity
(),
taskBean
.
otherConfig
.
downloadUrl
,
pkgMCRSName
)
// 开启广播监听安装事件
// 开启广播监听安装事件
registerBroad
()
registerBroad
()
...
@@ -1255,14 +1257,13 @@ class MyFragment : BaseFragment(),
...
@@ -1255,14 +1257,13 @@ class MyFragment : BaseFragment(),
// ps.put(Constant.HIGH_TASK_PKG_NAME, pkg)
// ps.put(Constant.HIGH_TASK_PKG_NAME, pkg)
myPresenter
.
setHighTaskType
(
"3"
)
myPresenter
.
setHighTaskType
(
"3"
)
}
else
if
(
TextUtils
.
equals
(
pkg
,
Constant
.
MCRS_PKG
))
{
}
else
if
(
TextUtils
.
equals
(
pkg
,
pkgMCRSName
))
{
// 牧场人生APP,直接弹奖励框
// 牧场人生APP,直接弹奖励框
val
bundle
=
Bundle
()
val
bundle
=
Bundle
()
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
downloadMCRSCoin
)
bundle
.
putInt
(
Constant
.
MAIN_CUR_COIN
,
downloadMCRSCoin
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
)
bundle
.
putString
(
Constant
.
MAIN_CARRIER_TYPE
,
Constant
.
CARRIER_MC_FIRSTDOWNLOAD
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
readyGo
(
AwardActivity
::
class
.
java
,
bundle
)
return
}
}
}
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