Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
B
BYLAppRobot
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
liuyang
BYLAppRobot
Commits
b3f5ba97
Commit
b3f5ba97
authored
Oct 24, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加程序前台判断逻辑,应用退出后任务恢复
parent
0a22420e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
11 deletions
+3
-11
Task.kt
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
+3
-11
No files found.
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
View file @
b3f5ba97
...
@@ -85,22 +85,14 @@ class Task : IAppBaseCallback {
...
@@ -85,22 +85,14 @@ class Task : IAppBaseCallback {
this
.
prepareReport
()
this
.
prepareReport
()
// 启动应用
// 启动应用
this
.
launchApp
()
this
.
launchApp
()
// if (Build.VERSION.SDK_INT < Build.VERSION_CODES.M) {
// if (!AdbUtil.isAppActive(this.apkInfo.packageName)) {
// Log.i(TAG, "Launch app failed")
// // 退出应用
// AdbUtil.stopApp(this.apkInfo.packageName)
// finish(false)
// return
// }
// }
// 频道轮询处理
// 频道轮询处理
try
{
try
{
val
success
=
this
.
processChannels
()
val
success
=
this
.
processChannels
()
//
尝试两次
//
再次尝试
if
(!
success
)
{
if
(!
success
)
{
this
.
reset
()
this
.
reset
()
this
.
prepareReport
()
this
.
launchApp
()
this
.
processChannels
()
this
.
processChannels
()
}
}
// 上传图片
// 上传图片
...
...
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