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
32cf3054
Commit
32cf3054
authored
Oct 22, 2018
by
liuyang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
APK图片抓取识别及轮播流地址抓取,客户端添加监播控制
#BYLSERVER-1438
parent
efefe99f
Changes
4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
12 additions
and
5 deletions
+12
-5
MainActivity.kt
app/src/main/java/com/duolebo/blyrobot/MainActivity.kt
+1
-1
ApkInfo.kt
app/src/main/java/com/duolebo/blyrobot/data/ApkInfo.kt
+4
-0
BylRobotService.kt
...main/java/com/duolebo/blyrobot/service/BylRobotService.kt
+2
-1
AppConfigListItem.kt
...rc/main/java/com/duolebo/blyrobot/ui/AppConfigListItem.kt
+5
-3
No files found.
app/src/main/java/com/duolebo/blyrobot/MainActivity.kt
View file @
32cf3054
...
...
@@ -139,7 +139,7 @@ class MainActivity : AppCompatActivity(), IAppBaseCallback {
this
.
appInfoAdapter
.
notifyDataSetChanged
()
for
(
apkInfo
in
appInfoData
.
apkInfos
)
{
if
(
AppUtil
.
isAppInstalled
(
this
,
apkInfo
.
packageName
))
{
if
(
apkInfo
.
monitoring
&&
AppUtil
.
isAppInstalled
(
this
,
apkInfo
.
packageName
))
{
val
task
=
Task
(
this
.
applicationContext
)
task
.
from
(
apkInfo
)
TaskManager
.
instance
.
add
(
task
)
...
...
app/src/main/java/com/duolebo/blyrobot/data/ApkInfo.kt
View file @
32cf3054
...
...
@@ -30,6 +30,8 @@ class ApkInfo: IModel {
// 弹出界面菜单按键,默认确定键
lateinit
var
menuKeyEvent
:
String
var
monitoring
=
true
override
fun
from
(
json
:
JSONObject
):
Boolean
{
this
.
name
=
json
.
optString
(
NAME
)
this
.
packageName
=
json
.
optString
(
PACKAGE_NAME
)
...
...
@@ -42,6 +44,7 @@ class ApkInfo: IModel {
this
.
mediaExt
=
json
.
optString
(
MEDIA_EXT
,
VIDEO_EXTS
)
this
.
filterUrl
=
json
.
optString
(
FILTER_URL
,
""
)
this
.
menuKeyEvent
=
json
.
optString
(
MENU_KEY_EVENT
,
"ok"
)
this
.
monitoring
=
json
.
optBoolean
(
MONITORING
,
true
)
return
true
}
...
...
@@ -69,6 +72,7 @@ class ApkInfo: IModel {
const
val
MEDIA_EXT
=
"mediaExt"
const
val
FILTER_URL
=
"filterUrl"
const
val
MENU_KEY_EVENT
=
"menuKeyEvent"
const
val
MONITORING
=
"monitoring"
}
}
\ No newline at end of file
app/src/main/java/com/duolebo/blyrobot/service/BylRobotService.kt
View file @
32cf3054
...
...
@@ -48,6 +48,7 @@ class BylRobotService: Service(), IAppBaseCallback {
override
fun
onCreate
()
{
super
.
onCreate
()
initBroadcast
()
// requestAppList()
}
private
fun
initBroadcast
()
{
...
...
@@ -104,7 +105,7 @@ class BylRobotService: Service(), IAppBaseCallback {
val
appInfoData
=
protocol
.
data
as
AppInfoData
for
(
apkInfo
in
appInfoData
.
apkInfos
)
{
if
(
AppUtil
.
isAppInstalled
(
this
,
apkInfo
.
packageName
))
{
if
(
apkInfo
.
monitoring
&&
AppUtil
.
isAppInstalled
(
this
,
apkInfo
.
packageName
))
{
val
task
=
Task
(
this
.
applicationContext
)
task
.
from
(
apkInfo
)
TaskManager
.
instance
.
add
(
task
)
...
...
app/src/main/java/com/duolebo/blyrobot/ui/AppConfigListItem.kt
View file @
32cf3054
...
...
@@ -16,10 +16,12 @@ class AppConfigListItem(context: Context?) : RelativeLayout(context) {
}
fun
setData
(
apkInfo
:
ApkInfo
)
{
var
installT
ips
=
""
var
t
ips
=
""
if
(!
AppUtil
.
isAppInstalled
(
context
,
apkInfo
.
packageName
))
installTips
=
"(未安装)"
this
.
appName
.
text
=
apkInfo
.
name
+
installTips
tips
=
"(未安装)"
else
if
(!
apkInfo
.
monitoring
)
tips
=
"(监播未启用)"
this
.
appName
.
text
=
apkInfo
.
name
+
tips
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