Commit 3eb63bda authored by liuyang's avatar liuyang

APK图片抓取识别及轮播流地址抓取,apk安装信息显示

#BYLSERVER-1438
parent 9f624a42
......@@ -2,14 +2,18 @@ apply plugin: 'com.android.application'
apply plugin: 'kotlin-android'
apply plugin: 'kotlin-android-extensions'
static def releaseTime() {
return new Date().format("yyyyMMdd", TimeZone.getTimeZone("UTC"))
}
android {
compileSdkVersion 27
defaultConfig {
applicationId "com.duolebo.bylrobot"
minSdkVersion 15
targetSdkVersion 22
versionCode 1
versionName "1.1"
versionCode 10
versionName "1.2"
}
signingConfigs {
......@@ -26,6 +30,12 @@ android {
minifyEnabled false
signingConfig signingConfigs.release
proguardFiles getDefaultProguardFile('proguard-android-optimize.txt'), 'proguard-rules.pro'
applicationVariants.all { variant ->
variant.outputs.all {
outputFileName = "dlbrebot_v${defaultConfig.versionName}_${releaseTime()}.apk"
}
}
}
}
}
......
......@@ -86,6 +86,16 @@ class Task : IAppBaseCallback {
this.prepareReport()
// 启动应用
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 {
this.processChannels()
......@@ -237,11 +247,11 @@ class Task : IAppBaseCallback {
val host = it.substring(start)
val url = "http://$host$partUrl"
var add = true
var add = false
// 如果筛选url不为空,这里需要进行过滤
if (!this.apkInfo.filterUrl.isNullOrEmpty()) {
if (url.contains(this.apkInfo.filterUrl))
add = false
add = true
}
if (add) {
......
......@@ -6,6 +6,7 @@ import android.view.LayoutInflater
import android.widget.RelativeLayout
import com.duolebo.blyrobot.R
import com.duolebo.blyrobot.data.ApkInfo
import com.duolebo.blyrobot.util.AppUtil
import kotlinx.android.synthetic.main.app_config_item.view.*
class AppConfigListItem(context: Context?) : RelativeLayout(context) {
......@@ -15,7 +16,10 @@ class AppConfigListItem(context: Context?) : RelativeLayout(context) {
}
fun setData(apkInfo: ApkInfo) {
this.appName.text = apkInfo.name
var installTips = ""
if (!AppUtil.isAppInstalled(context, apkInfo.packageName))
installTips = "(未安装)"
this.appName.text = apkInfo.name + installTips
this.packageName.text = apkInfo.packageName
}
......
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