获取AccessibilityNodeInfo的视图以创建覆盖 [英] Get view of AccessibilityNodeInfo to create overlay

查看:219
本文介绍了获取AccessibilityNodeInfo的视图以创建覆盖的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在编写一个 AccessibilityService ,并且我想在当前活动的视图上创建视图覆盖图,可访问性服务可以检索该视图覆盖图.我没有从当前活动中检索所有 AccessibilityNodeInfo 对象的问题,但是我不知道如何从这些对象获取视图以创建覆盖.不幸的是,关于无障碍服务的例子很少.也许你们中的一些人已经有这个主题的经验.我希望你能帮帮我!谢谢!

I'm writing a AccessibilityService and I want to create view overlays on the views from the current activity that the accessibility service can retrieve. I have no problems to retrieve all AccessibilityNodeInfo objects from the current activity, but I have no idea how to get the views from these objects to create overlays. Unfortunately there are only few examples regarding accessibility services. Maybe some of you already have experience with this topic. I hope you can help me! Thanks!

一篇论文表明,可以在活动的视图内容上进行覆盖:

A paper shows that overlays over an activity's view contents are possible:

由于Android可访问性框架[10].使用可访问性API,它能够访问和检查屏幕上应用程序的GUI布局,无需修改或对应用程序代码进行检测."*

The display overlay is able to perform these tasks thanks to the Android Accessibility Framework [10]. Using the accessibility API, it is able to access and inspect the GUI layout of the applications on the screen, without requiring modifications or the instrumentation of the application code."*

链接: http://www.onarlioglu.com/publications/fc2015babelcrypt.pdf

第6页和第8页.谢谢!

Page 6 and 8. Thanks!

推荐答案

您无法从其他应用程序获取 View 对象,因为 View 对象处于单独的过程中从你的.

You cannot get the View objects from other apps, as the View objects are in a separate process from yours.

这篇关于获取AccessibilityNodeInfo的视图以创建覆盖的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆