Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

鲁工,请问cafe使用hook listener方式来截获事件消息,是否可以使用Accessibility、UiAutomator代替?谢谢 #42

Open
zhyx opened this issue Mar 18, 2014 · 5 comments

Comments

@zhyx
Copy link

zhyx commented Mar 18, 2014

@luxiaoyu ,Accessibility也是相当于回调,是不是可以直接使用,效果跟cafe的hook listener差不多?

@luxiaoyu
Copy link
Contributor

UiAutomator可以,但是对低版本不支持
Accessibility你可以具体举个例子,比如onClick怎么拦截,我们详细讨论一下

@zhyx
Copy link
Author

zhyx commented Mar 18, 2014

performClick之前都会有sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED),可否通过这个事件获取click的信息

@luxiaoyu
Copy link
Contributor

你的意思是performClick之前系统会调用sendAccessibilityEvent(AccessibilityEvent.TYPE_VIEW_CLICKED),而通过注册accessibility service可以拦截到这个消息?拦截到的消息格式是啥?是否知道是哪个view发出的?

@yuanboyang
Copy link

鲁工您好,我想请问您一下APP遍历相关的问题,我用的是 AccessibilityService方式获取当前View的Root根节点并构造树,采用的是深度遍历,我打算遍历完一条路径之后再返回起始界面, 再遍历下一个节点,但是发现操作每个控件之后有多种不同的状态,有的弹出对话框,有的跳转页面,有的更新当前view等,而且它的状态只能在操作之后才能 确定,这样就导致了返回起始界面很困难,还有就是ListView里面的元素无法全部遍历,我想请您提供一些帮助或者建议

@cryingDream94
Copy link

@yuanboyang 我也写了一个遍历的,基于深度优先搜索,但是有很多意外的情况出现(比如弹框),所以没办法回溯。请问你现在有好的解决办法了吗?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants