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