Android开发

Android无障碍自动化-点击path源码阅读

本文主要是介绍Android无障碍自动化-点击path源码阅读,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

GestureDescription build构建 手势描述类

dispatchGesture 执行 手势描述类

GestureDescription.GestureStep 手势操作步骤类

final IAccessibilityServiceConnection connection =
                AccessibilityInteractionClient.getInstance().getConnection(
                        mConnectionId);

  connection.sendGesture(mGestureStatusCallbackSequence,
                        new ParceledListSlice<>(steps));

IAccessibilityServiceConnection 利用跨进程

https://www.jb51.net/article/141876.htm

MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis(),
                        MotionEvent.ACTION_DOWN,
                        100.0f,
                        100.0f,
                        0));


                MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis(),
                        MotionEvent.ACTION_MOVE,
                        150.0f,
                        150.0f,
                        0));

                MainActivity.this.onTouchEvent(MotionEvent.obtain(
                        SystemClock.uptimeMillis(),
                        SystemClock.uptimeMillis() ,
                        MotionEvent.ACTION_UP,
                        200.0f,
                        200.0f,
                        0));
这篇关于Android无障碍自动化-点击path源码阅读的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!