正式打包发布
2022-12-22 14:27:16 最后更新
打包完成后,安装测试。记得自行去设置》辅助功能》打开我们的服务《iapp开发工具无障碍辅助功能》。
注意:直接在iapp里测试无效。

更多代码示范:

//------静态调用
//获取无障碍功能是否已经授权
java(a, null, "com.iapp.app.ays.isas", "Context", activity)

//如果没有授权,可跳转设置界面
java(a, null, "com.iapp.app.ays.goset", "Context", activity)

//------事件源操作
//获取Context功能类
java(a, ays, "com.iapp.app.ays.gbc")

//获取无障碍功能配置信息
java(a, ays, "com.iapp.app.ays.gsi")

//设置无障碍功能配置信息
java(b, ays, "com.iapp.app.ays.ssi", "AccessibilityServiceInfo", a)

//调用全局事件
//输入值:1. 返回键 2. HOME键 3. 最近打开应用列表 4. 打开通知栏 5. 设置 6. 锁屏
java(a, ays, "com.iapp.app.ays.pga", "int", 1)

//获取事件类型
//值:32 打开PopupWindow,Menu,Dialog等的事件  64 显示通知的事件  2048 更改窗口内容的事件  4194304 屏幕上显示的窗口中的事件更改
java(a, ays, "com.iapp.app.ays.gtype", "AccessibilityEvent", e)

//获取事件源类的类型
java(a, ays, "com.iapp.app.ays.gcn", "AccessibilityEvent", e)

//获取事件源的包名
java(a, ays, "com.iapp.app.ays.gpn", "AccessibilityEvent", e)

//获取事件源的是否可用
java(a, ays, "com.iapp.app.ays.ised", "AccessibilityEvent", e)

//获取事件源的节点总数
java(a, ays, "com.iapp.app.ays.gsl", "AccessibilityEvent", e)

//获取事件源的整数ID
java(a, ays, "com.iapp.app.ays.gwid", "AccessibilityEvent", e)

//获取事件源的时间
java(a, ays, "com.iapp.app.ays.gtime", "AccessibilityEvent", e)

//释放资源
java(a, ays, "com.iapp.app.ays.re", "AccessibilityEvent", e)

//------节点的操作
//获取事件源的节点对象列表
java(a, ays, "com.iapp.app.ays.gall", "AccessibilityEvent", e)

//获取窗口的对象节点列表,需要Android 4.1及以上才可调用
java(a, ays, "com.iapp.app.ays.gall")

//根据序号;获取对象的子节点
java(a, ays, "com.iapp.app.ays.gi", "AccessibilityNodeInfo", node, "int", 0)

//获取对象的子节点总数
java(a, ays, "com.iapp.app.ays.gi", "AccessibilityNodeInfo", node)

//根据当前焦点向某个方向进行搜索可以获得输入焦点的最近控件
//输入值:33 向上  130 向下  17 向左  66 向右
java(a, ays, "com.iapp.app.ays.focussearch", "AccessibilityNodeInfo", node, "int", 130)

//根据文本查询控件,返回节点列表
java(nodelist, ays, "com.iapp.app.ays.text", "AccessibilityNodeInfo", node, "String", "创建")

//根据id查询控件,返回节点列表
java(nodelist, ays, "com.iapp.app.ays.id", "AccessibilityNodeInfo", node, "String", "com.iapp.app:id/ui_home_add_go")

//根据焦点查询
//输入值:1 输入焦点  2 可访问性焦点
java(a, ays, "com.iapp.app.ays.focus", "AccessibilityNodeInfo", node, "int", 1)

//获取节点文本
java(a, ays, "com.iapp.app.ays.gt", "AccessibilityNodeInfo", node)

//获取节点类的类型
java(a, ays, "com.iapp.app.ays.gcn", "AccessibilityNodeInfo", node)

//获取节点整数ID
java(a, ays, "com.iapp.app.ays.gwid", "AccessibilityNodeInfo", node)

//获取节点ID
java(a, ays, "com.iapp.app.ays.gid", "AccessibilityNodeInfo", node)

//获取可以在节点上执行的操作
java(a, ays, "com.iapp.app.ays.gal", "AccessibilityNodeInfo", node)

//获取节点在屏幕上坐标
java(a, ays, "com.iapp.app.ays.gbis", "AccessibilityNodeInfo", node)

//获取父节点在屏幕上坐标
java(a, ays, "com.iapp.app.ays.gbip", "AccessibilityNodeInfo", node)

//获取节点的包名
java(a, ays, "com.iapp.app.ays.gpn", "AccessibilityNodeInfo", node)

//获取节点的父节点
java(a, ays, "com.iapp.app.ays.gp", "AccessibilityNodeInfo", node)

//获取此节点是否可点击
java(a, ays, "com.iapp.app.ays.isck", "AccessibilityNodeInfo", node)

//获取此节点是否已启用
java(a, ays, "com.iapp.app.ays.ised", "AccessibilityNodeInfo", node)

//获取此节点是否已选中
java(a, ays, "com.iapp.app.ays.iscd", "AccessibilityNodeInfo", node)

//获取这个节点是否被聚焦
java(a, ays, "com.iapp.app.ays.isfd", "AccessibilityNodeInfo", node)

//获取此节点是否可以长时间点击
java(a, ays, "com.iapp.app.ays.islck", "AccessibilityNodeInfo", node)

//获取此节点是否是密码
java(a, ays, "com.iapp.app.ays.ispd", "AccessibilityNodeInfo", node)

//获取节点是否可滚动
java(a, ays, "com.iapp.app.ays.isse", "AccessibilityNodeInfo", node)

//获取是否选择此节点
java(a, ays, "com.iapp.app.ays.issd", "AccessibilityNodeInfo", node)

//根据文本查询;模拟控件点击控件
java(a, ays, "com.iapp.app.ays.cktext", "AccessibilityNodeInfo", node, "int", 16, "String", "创建")

//根据ID查询;模拟控件点击控件
java(a, ays, "com.iapp.app.ays.ckid", "AccessibilityNodeInfo", node, "int", 16, "String", "com.iapp.app:id/ui_home_add_go")

//根据焦点查询;模拟控件点击控件
//输入值:1 输入焦点  2 可访问性焦点
java(a, ays, "com.iapp.app.ays.ckfocus", "AccessibilityNodeInfo", node, "int", 16, "int", 1)

    /.
      模拟执行操作
      1 将输入焦点输入到节点的操作
      16 点击节点信息的动作
      32 长时间点击节点的动作
      32768 操作来粘贴当前的剪贴板内容
     ./
//开始模拟控件点击
//输入节点列表
java(b, ays, "com.iapp.app.ays.ck", "java.util.List", nodelist, "int", 16)

//开始模拟控件点击
//输入节点列表,输入自定义的Bundle
java(b, ays, "com.iapp.app.ays.ck", "java.util.List", nodelist, "int", 16, "android.os.Bundle", be)

//对单项模拟控件点击
//输入节点列表
java(b, ays, "com.iapp.app.ays.ck", "AccessibilityNodeInfo", node, "int", 16)

//对单项模拟控件点击
//输入节点列表,输入自定义的Bundle
java(b, ays, "com.iapp.app.ays.ck", "AccessibilityNodeInfo", node, "int", 16, "android.os.Bundle", be)

//对单项模拟执行输入文本,Android 4.3 版本及以上
java(b, ays, "com.iapp.app.ays.enter", "AccessibilityNodeInfo", node, "String", "nihao")

//开始模拟执行输入文本,Android 4.3 版本及以上
java(b, ays, "com.iapp.app.ays.enter", "java.util.List", nodelist, "String", "nihao")

//获取节点所有子节点列表
java(nodelist, ays, "com.iapp.app.ays.ganiall", "AccessibilityNodeInfo", node)

//释放节点资源
java(b, ays, "com.iapp.app.ays.re", "AccessibilityNodeInfo", node)

说明:
无障碍功能(辅助功能)常用于简化操作,使应用或 系统的变得更智能、简便。