Giter VIP home page Giter VIP logo

Comments (11)

xiaocong avatar xiaocong commented on August 20, 2024

Yes, you are right. But technically it's hard to implement it if we still use Android uiautomator watcher mechanism. I am thinking if there is another way to implement similar functionality. Any idea is welcome!

from uiautomator.

jwang11 avatar jwang11 commented on August 20, 2024

Actually what I am expecting is just a host side python callback which can do something, e.g take a screenShot when condition match. It needn't inject any code to device end UIWatcher, is it possible?

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

uiautomator watcher is a java method on device side, which is triggered by a selection mismatch. We have to find a way to inform PC side and wait for its response. All these must be done before the java method returns. I am trying to find a way to resolve it, but I am not sure.

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

An alternative way is to replace uiautomator watcher mechanism with pure python implementation on PC side, but it may cause some confusions.

from uiautomator.

jwang11 avatar jwang11 commented on August 20, 2024

yes, that's what I mean. About your concern, I don't think it confuse someone. As it is just about add a pure python callback, not replace or break any original functionality.

from uiautomator.

jwang11 avatar jwang11 commented on August 20, 2024

xiaocong, any update on this feature requirement?

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

There are still some logic conflicts. I hope I can fix it soon.

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

@jwang11 please help review the code under feature/not-found-callback branch. Any suggestion on how to define the API is welcome.

from uiautomator.

jwang11 avatar jwang11 commented on August 20, 2024

@xiaocong, thanks. The code looks fine for me, however, we still a bit more time to verify its functionality. I assume the way to use it like
d.handlers.on(callback)
right?
and there is no change on uiautomator-jsonrpc-server

from uiautomator.

xiaocong avatar xiaocong commented on August 20, 2024

@jwang11 yes, it's correct.

from uiautomator.

ranjith035 avatar ranjith035 commented on August 20, 2024

@jwang11 and @xiaocong can you please give me an example on how to use callback interface for UIwatcher?

from uiautomator.

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.