Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
launcherdemo
Overview
Overview
Details
Activity
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
lihuaikun
launcherdemo
Commits
1ce75cd1
Commit
1ce75cd1
authored
Feb 28, 2020
by
hk
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新文档
parent
816a7f81
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
5 deletions
+15
-5
README.md
README.md
+15
-5
No files found.
README.md
View file @
1ce75cd1
# Launcher[![Release Version](https://img.shields.io/badge/release-1.0.
5-red.svg)](https://git.dankal.cn/lihuaikun/androidlibrary/tree/master/cn/dankal/android/launcher/1.0.5
)
# Launcher[![Release Version](https://img.shields.io/badge/release-1.0.
6-red.svg)](https://git.dankal.cn/lihuaikun/androidlibrary/tree/master/cn/dankal/android/launcher/1.0.6
)
1.
添加依赖配置
1.
添加依赖配置
```groovy
```groovy
...
@@ -9,7 +9,7 @@
...
@@ -9,7 +9,7 @@
}
}
dependencies {
dependencies {
implementation 'cn.dankal.android:launcher:1.0.
1
'
implementation 'cn.dankal.android:launcher:1.0.
6
'
}
}
```
```
2.
AndroidManifests.xml配置
2.
AndroidManifests.xml配置
...
@@ -29,13 +29,18 @@
...
@@ -29,13 +29,18 @@
managementInfo.setPackageName("com.tencent.tim");
managementInfo.setPackageName("com.tencent.tim");
// 正常使用
// 正常使用
//ColumnDef.AppUseType.NORMAL_TYPE
~~ ColumnDef.AppUseType.NORMAL_TYPE ~~
// 学习教育类
ColumnDef.AppUseType.LEARN_TYPE
// 游戏类应用
// 游戏类应用
//ColumnDef.AppUseType.GAME_LOCK_TYPE
//ColumnDef.AppUseType.GAME_LOCK_TYPE
// 未分类应用
// 未分类应用
//ColumnDef.AppUseType.UNCLASS_TYPE
//ColumnDef.AppUseType.UNCLASS_TYPE
//无需管控类
//ColumnDef.AppUseType.SAFE_TYPE
managementInfo.setUseType(ColumnDef.AppUseType.GAME_LOCK_TYPE);
managementInfo.setUseType(ColumnDef.AppUseType.GAME_LOCK_TYPE);
//app锁定模式
//app锁定模式
// 应用使用时长到达上限
// 应用使用时长到达上限
...
@@ -44,6 +49,8 @@
...
@@ -44,6 +49,8 @@
ColumnDef.LockApp.LOCKED
ColumnDef.LockApp.LOCKED
// 应用未锁定
// 应用未锁定
ColumnDef.LockApp.UNLOCKED
ColumnDef.LockApp.UNLOCKED
managementInfo.setLock(ColumnDef.LockApp.LOCKED);
managementInfo.setLock(ColumnDef.LockApp.LOCKED);
//设置单个应用
//设置单个应用
LauncherManager.getInstance().addPackageInfo(managementInfo);
LauncherManager.getInstance().addPackageInfo(managementInfo);
...
@@ -58,6 +65,9 @@
...
@@ -58,6 +65,9 @@
List<String> managementInfoList = new ArrayList<>(); LauncherManager.getInstance().removePackageInfoList(managementInfoList);
List<String> managementInfoList = new ArrayList<>(); LauncherManager.getInstance().removePackageInfoList(managementInfoList);
//获取受管理的app信息
LauncherManager.getInstance().getAppInfo();
```
```
5.
返回桌面/跳转设置
5.
返回桌面/跳转设置
...
...
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