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));