Commit 90f64f60 authored by liuyang's avatar liuyang

APK图片抓取识别及轮播流地址抓取,客户端增加启动后按键配置

#BYLSERVER-1438
parent 4fd0720d
......@@ -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"
......
......@@ -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() {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment