File tree Expand file tree Collapse file tree 1 file changed +9
-6
lines changed
Expand file tree Collapse file tree 1 file changed +9
-6
lines changed Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ Android无障碍服务(AccessibilityService)开发框架,快速开发复
1818
1919## 快速开始
2020### 1. 添加依赖
21- 1.1 将JitPack仓库添加到根目录build.gradle文件中
21+ #### 1.1 将JitPack仓库添加到根目录build.gradle文件中
2222
2323``` groovy
2424allprojects {
@@ -29,14 +29,15 @@ allprojects {
2929}
3030```
3131
32- 1.2 添加依赖到主模块的build.gradle中,
32+ #### 1.2 添加依赖到主模块的build.gradle中,
3333``` groovy
3434dependencies {
3535 //添加依赖
3636 implementation 'com.github.ven-coder:assists:1.0.1'
3737}
3838```
39- ### 2. 主模块AndroidManifest.xml中注册服务
39+ ### 2. 注册服务
40+ #### 1.1 主模块AndroidManifest.xml中注册服务
4041一定要在主模块中注册服务,不然进程被杀服务也会自动被关闭需要再次开启
4142``` xml
4243<?xml version =" 1.0" encoding =" utf-8" ?>
@@ -72,7 +73,8 @@ dependencies {
7273</manifest >
7374```
7475### 3. 实现业务逻辑
75- 3.1 继承``` StepImpl ``` 实现` onImpl(collector: StepCollector) ` 接口,通过``` collector.next() ``` 实现步骤逻辑
76+ #### 3.1 继承``` StepImpl ```
77+ 实现` onImpl(collector: StepCollector) ` 接口,通过``` collector.next() ``` 实现步骤逻辑
7678
7779``` kotlin
7880class OpenWechat :StepImpl {
@@ -98,12 +100,13 @@ class OpenWechat:StepImpl {
98100 }
99101}
100102```
101- 3.2 在执行前注册上面步骤实现类` OpenWechat `
103+ #### 3.2 在执行前注册上面步骤实现类` OpenWechat `
102104
103105``` kotlin
104106StepManager .register(OpenWechat ::class .java)
105107```
106- 3.3 开始执行(执行前请确保无障碍服务已开启,开始执行请使用` beginExecute() ` ,后续的步骤执行请使用` execute() ` 方法)
108+ #### 3.3 开始执行
109+ 执行前请确保无障碍服务已开启,开始执行请使用` beginExecute() ` ,后续的步骤执行请使用` execute() ` 方法
107110
108111``` kotlin
109112// 从步骤1开始执行
You can’t perform that action at this time.
0 commit comments