GithubHelp home page GithubHelp logo

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

baidu avatar baidu commented on August 16, 2024
鲁工,请问cafe使用hook listener方式来截获事件消息,是否可以使用Accessibility、UiAutomator代替?谢谢

from cafe.

Comments (5)

luxiaoyu avatar luxiaoyu commented on August 16, 2024

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

from cafe.

zhyx avatar zhyx commented on August 16, 2024

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

from cafe.

luxiaoyu avatar luxiaoyu commented on August 16, 2024

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

from cafe.

yuanboyang avatar yuanboyang commented on August 16, 2024

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

from cafe.

cryingDream94 avatar cryingDream94 commented on August 16, 2024

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

from cafe.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.