Coder Social home page Coder Social logo

accessibilityutil's Issues

点击问题

AblSteps.STEP_1 -> {
AblViewUtil.findById("com.ss.android.ugc.aweme:id/aem", 0, object : AniCallBack {
override fun succ(info: AccessibilityNodeInfo?) {
//找到控件
// 在这里可以根据 坐标点击吗?
val click = info!!.performAction(AccessibilityNodeInfo.ACTION_CLICK)
info.refresh()
LogUtils.eTag("控件点击", click);
stepTimeOutCount = 0;

if(contents.isEmpty()){
AblStepHandler.sendMsg(AblSteps.STEP_6)
}else{
AblStepHandler.sendMsg(AblSteps.STEP_2)
}

}

AutoReply自动回复不行的看这里解决办法

这是我实测的:
AutoReplyAccessibilityService当中,把case TYPE_WINDOW_STATE_CHANGED改成这样:

            case AccessibilityEvent.TYPE_WINDOW_STATE_CHANGED:
            case AccessibilityEvent.TYPE_WINDOW_CONTENT_CHANGED:  // 1.添加一个事件才能连贯完成发送操作
                if (!hasAction) break;
                itemNodeinfo = null;
                String className = event.getClassName().toString();
                if (className.contains(MM_PNAME)) {  // 2.注意这里最好模糊判断包名
                    if (fill()) {
                        send();
                        hasAction = false;  // 置false放到这来,保证send成功之后
                    }
                }
                break;

同时,修改配置文件reply.xml为:

<?xml version="1.0" encoding="utf-8"?>
<accessibility-service xmlns:android="http://schemas.android.com/apk/res/android"
    android:accessibilityEventTypes="typeAllMask"
    android:accessibilityFeedbackType="feedbackAllMask"
    android:accessibilityFlags="flagDefault"
    android:canRetrieveWindowContent="true"
    android:notificationTimeout="100"
    android:packageNames="com.tencent.mm,com.android.systemui" />

最主要的是notificationTimeout不能太长,我用1000就不行,改成100就行了,具体自己尝试看看有没有通用性。

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.