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
90f64f60
Commit
90f64f60
authored
Oct 16, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APK图片抓取识别及轮播流地址抓取,客户端增加启动后按键配置
#BYLSERVER-1438
parent
4fd0720d
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
0 deletions
+9
-0
ApkInfo.kt
app/src/main/java/com/duolebo/blyrobot/data/ApkInfo.kt
+4
-0
Task.kt
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
+5
-0
No files found.
app/src/main/java/com/duolebo/blyrobot/data/ApkInfo.kt
View file @
90f64f60
...
...
@@ -23,6 +23,8 @@ class ApkInfo: IModel {
var
launchDelay
=
15
// 频道抓取延时(秒)
var
captureDelay
=
15
//启动后按键事件组合
var
launchKeyEvent
:
String
?
=
null
// 切换频道按键事件组合
lateinit
var
channelKeyEvent
:
String
// 弹出界面菜单按键,默认确定键
...
...
@@ -34,6 +36,7 @@ class ApkInfo: IModel {
this
.
launcher
=
json
.
optString
(
LAUNCHER
)
this
.
launchDelay
=
json
.
optInt
(
LAUNCH_DELAY
,
15
)
this
.
captureDelay
=
json
.
optInt
(
CAPTURE_DELAY
,
15
)
this
.
launchKeyEvent
=
json
.
optString
(
LAUNCH_KEY_EVENT
,
""
)
this
.
channelCount
=
json
.
optInt
(
CHANNEL_COUNT
,
5
)
this
.
channelKeyEvent
=
json
.
optString
(
CHANNEL_KEY_EVENT
)
this
.
mediaExt
=
json
.
optString
(
MEDIA_EXT
,
VIDEO_EXTS
)
...
...
@@ -60,6 +63,7 @@ class ApkInfo: IModel {
const
val
LAUNCHER
=
"launcher"
const
val
LAUNCH_DELAY
=
"launchDelay"
const
val
CAPTURE_DELAY
=
"captureDelay"
const
val
LAUNCH_KEY_EVENT
=
"launchKeyEvent"
const
val
CHANNEL_KEY_EVENT
=
"channelKeyEvent"
const
val
CHANNEL_COUNT
=
"channelCount"
const
val
MEDIA_EXT
=
"mediaExt"
...
...
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
View file @
90f64f60
...
...
@@ -146,6 +146,11 @@ class Task : IAppBaseCallback {
// 启动2s开始抓取,避免第一个频道没有抓到
capture
(
this
.
apkInfo
.
launchDelay
+
this
.
apkInfo
.
captureDelay
)
Thread
.
sleep
(
this
.
apkInfo
.
launchDelay
*
1000L
)
// 启动后按键事件模拟
if
(!
this
.
apkInfo
.
launchKeyEvent
.
isNullOrEmpty
())
{
AdbUtil
.
sendMultiKey
(
this
.
apkInfo
.
launchKeyEvent
!!
)
}
}
private
fun
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