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

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

Open
ysy950803 opened this issue Sep 8, 2021 · 0 comments
Open

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

ysy950803 opened this issue Sep 8, 2021 · 0 comments

Comments

@ysy950803
Copy link

ysy950803 commented Sep 8, 2021

这是我实测的:
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就行了,具体自己尝试看看有没有通用性。

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

1 participant