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
bc49fbd7
Commit
bc49fbd7
authored
Jan 13, 2021
by
mengcuiguang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优化任务下载
parent
48634236
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
20 deletions
+8
-20
BxmManager.kt
...p/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
+0
-1
TaskActivity.kt
...ain/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
+6
-17
FriendsFragment.kt
...n/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
+1
-1
MyFragment.kt
...c/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
+1
-1
No files found.
GoodMoney/app/src/main/java/com/mints/goodmoney/manager/BxmManager.kt
View file @
bc49fbd7
...
...
@@ -22,7 +22,6 @@ object BxmManager {
private
const
val
APP_ID
=
"3b08a06c36a04eb7ad31ee31547b9e69"
private
const
val
BUTTON_AD_SPOT_ID
=
"807020001003"
// private const val BUTTON_AD_SPOT_ID = "807020001004"
private
var
bdAdvanceButtonAd
:
BDAdvanceButtonAd
?
=
null
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/activitys/TaskActivity.kt
View file @
bc49fbd7
...
...
@@ -54,8 +54,8 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
// APP下载回调广播
private
var
mReceiverBroadcastReceiver
:
BroadcastReceiver
?
=
null
//
是否刷新按钮状态
private
var
isRefreshState
=
false
//
试完时间不足弹窗
private
var
tryTimeOut
=
false
companion
object
{
const
val
TASK_COIN
=
"task_coin"
...
...
@@ -114,16 +114,10 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
* 刷新高额任务
*/
private
fun
refreshDemoTask
()
{
if
(
isRefreshState
)
{
isRefreshState
=
!
isRefreshState
return
}
isRefreshState
=
!
isRefreshState
mTaskAdapter
?.
let
{
if
(
mFakeTaskList
.
size
==
0
)
return
val
position
=
it
.
getPosition
()
if
(
mFakeTaskList
.
size
==
0
||
tryTimeOut
||
mFakeTaskList
[
position
].
state
==
3
)
return
val
currentPkgName
=
mFakeTaskList
[
position
].
currentPkgName
if
(
currentPkgName
!=
null
)
{
...
...
@@ -136,6 +130,7 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
mDownloadProcess
?.
reportAppActivated
()
}
else
{
if
(
AppTryPlayManager
.
getTryPlayIsOK
(
currentPkgName
,
5
))
{
tryTimeOut
=
true
// 试玩时间不足
mFakeTaskList
[
position
].
state
=
4
it
.
notifyItemChanged
(
it
.
getPosition
())
...
...
@@ -171,7 +166,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
}
override
fun
onRefresh
(
refreshLayout
:
RefreshLayout
)
{
isRefreshState
=
false
loadData
()
}
...
...
@@ -199,8 +193,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
}
override
fun
onGetDownloadProcess
(
downloadProcess
:
DownloadProcess
?)
{
isRefreshState
=
false
// 点击之后回调下载数据
mDownloadProcess
=
downloadProcess
...
...
@@ -252,7 +244,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
// 上报安装完成
mDownloadProcess
?.
reportInstallSuccess
(
false
)
isRefreshState
=
false
}
}
catch
(
e
:
Exception
)
{
e
.
printStackTrace
()
...
...
@@ -269,6 +260,7 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
when
(
mFakeTaskList
[
position
].
state
)
{
// 0 立即下载, 1 去试玩, 2 领取奖励
0
->
{
tryTimeOut
=
false
if
(
AppUtil
.
isOpenUsageStats
())
{
clickDialog
(
position
)
}
else
{
...
...
@@ -284,7 +276,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
it
.
notifyItemChanged
(
it
.
getPosition
())
}
else
{
if
(
AppUtil
.
checkPackInfo
(
mContext
,
currentPkgName
))
{
isRefreshState
=
false
AppTryPlayManager
.
toTryPlay
(
currentPkgName
)
}
else
{
...
...
@@ -321,8 +312,6 @@ class TaskActivity : BaseActivity(), OnItemClickListener, OnRefreshListener, Cor
it
.
notifyItemChanged
(
it
.
getPosition
())
}
else
{
if
(
AppUtil
.
checkPackInfo
(
mContext
,
currentPkgName
))
{
isRefreshState
=
false
AppTryPlayManager
.
toTryPlay
(
currentPkgName
)
}
else
{
showToast
(
"未找到当前APP、可能被卸载,请重试~"
)
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/FriendsFragment.kt
View file @
bc49fbd7
...
...
@@ -540,7 +540,7 @@ class FriendsFragment : BaseFragment(), FriendsView, OnRefreshListener, View.OnC
})
cdaa
!!
.
run
{
setTitle
(
"提示"
)
setContent
(
"被邀请人
需要登录才能获得贡献值
"
)
setContent
(
"被邀请人
成功提现0.5元后发放贡献
"
)
setLeft
(
"取消"
)
setRight
(
"打开微信"
)
show
()
...
...
GoodMoney/app/src/main/java/com/mints/goodmoney/ui/fragment/MyFragment.kt
View file @
bc49fbd7
...
...
@@ -1107,7 +1107,7 @@ class MyFragment : BaseFragment(),
}
})
cdaa
!!
.
setTitle
(
"提示"
)
cdaa
!!
.
setContent
(
"被邀请人
需要登录才能获得贡献值
"
)
cdaa
!!
.
setContent
(
"被邀请人
成功提现0.5元后发放贡献
"
)
cdaa
!!
.
setLeft
(
"取消"
)
cdaa
!!
.
setRight
(
"打开微信"
)
cdaa
!!
.
show
()
...
...
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