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
179ae5e6
Commit
179ae5e6
authored
Nov 16, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APK抓包>从频道1开始依次抓取, 一些epg显示时间过长的应用,模拟返回键点击
#BYLSERVER-1693
parent
2662cddf
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
3 deletions
+17
-3
build.gradle
app/build.gradle
+1
-1
ApkInfo.kt
app/src/main/java/com/duolebo/blyrobot/data/ApkInfo.kt
+12
-1
Task.kt
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
+4
-1
No files found.
app/build.gradle
View file @
179ae5e6
...
...
@@ -13,7 +13,7 @@ android {
minSdkVersion
15
targetSdkVersion
22
versionCode
15
versionName
"1.
2.25
"
versionName
"1.
3.30
"
}
signingConfigs
{
...
...
app/src/main/java/com/duolebo/blyrobot/data/ApkInfo.kt
View file @
179ae5e6
...
...
@@ -30,6 +30,9 @@ class ApkInfo: IModel {
// 弹出界面菜单按键,默认确定键
lateinit
var
menuKeyEvent
:
String
// epg是否需要按返回键,因为有些apk的epg显示时间过长
var
epgBack
=
false
var
monitoring
=
true
override
fun
from
(
json
:
JSONObject
):
Boolean
{
...
...
@@ -40,7 +43,15 @@ class ApkInfo: IModel {
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
)
var
channelKeyEvent
=
json
.
optString
(
CHANNEL_KEY_EVENT
)
// 如果包含百分号则epg需要按返回键
if
(!
channelKeyEvent
.
isNullOrEmpty
()
&&
channelKeyEvent
.
contains
(
'%'
))
{
this
.
epgBack
=
true
channelKeyEvent
=
channelKeyEvent
.
replace
(
"%"
,
""
)
}
this
.
channelKeyEvent
=
channelKeyEvent
this
.
mediaExt
=
json
.
optString
(
MEDIA_EXT
,
VIDEO_EXTS
)
this
.
filterUrl
=
json
.
optString
(
FILTER_URL
,
""
)
this
.
menuKeyEvent
=
json
.
optString
(
MENU_KEY_EVENT
,
"ok"
)
...
...
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
View file @
179ae5e6
...
...
@@ -275,6 +275,9 @@ class Task : Thread, IAppBaseCallback {
val
absOkName
=
this
.
imagePath
+
"/${this.apkInfo.packageName}_${channelIndex}_${time}_ok"
screenShot
(
absOkName
)
screenImages
.
add
(
"$absOkName.jpg"
)
// 对于一些epg弹出时间过长的应用,模拟点击一次返回键,比如电视家3.0
if
(
this
.
apkInfo
.
epgBack
)
AdbUtil
.
sendMultiKey
(
"back"
)
if
(
screenImages
.
size
>
0
)
...
...
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