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
3eb63bda
Commit
3eb63bda
authored
Oct 18, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APK图片抓取识别及轮播流地址抓取,apk安装信息显示
#BYLSERVER-1438
parent
9f624a42
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
29 additions
and
5 deletions
+29
-5
build.gradle
app/build.gradle
+12
-2
Task.kt
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
+12
-2
AppConfigListItem.kt
...rc/main/java/com/duolebo/blyrobot/ui/AppConfigListItem.kt
+5
-1
No files found.
app/build.gradle
View file @
3eb63bda
...
...
@@ -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
1
0
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"
}
}
}
}
}
...
...
app/src/main/java/com/duolebo/blyrobot/data/Task.kt
View file @
3eb63bda
...
...
@@ -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
=
tru
e
var
add
=
fals
e
// 如果筛选url不为空,这里需要进行过滤
if
(!
this
.
apkInfo
.
filterUrl
.
isNullOrEmpty
())
{
if
(
url
.
contains
(
this
.
apkInfo
.
filterUrl
))
add
=
fals
e
add
=
tru
e
}
if
(
add
)
{
...
...
app/src/main/java/com/duolebo/blyrobot/ui/AppConfigListItem.kt
View file @
3eb63bda
...
...
@@ -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
}
...
...
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