云手机服务器 CPH-触控注入:输入参数

时间:2024-04-15 16:50:30

输入参数

表1 输入参数说明

参数名称

说明

inputTouch

触控注入参数结构体,详见表2

表2 触控注入参数结构体说明

参数名称

参数类型

说明

pointerID

number

真机触点编号,多指触控下会有多个触点,取值范围[0,9],即最多支持10个触点。

orientation

number

真机屏幕旋转角度,默认为0,可设置为1(90°),2(180°), 3(270°)。

action

number

真机触控行为,如ACTION_DOWN, ACTION_UP,取值范围请参考:https://developer.android.com/reference/android/view/MotionEvent

pressure

number

真机触控压力值,默认为129。

physicalWidth

number

真机屏幕分辨率宽,默认为0,取值范围[0,2160]。

physicalHeight

number

真机屏幕分辨率高,默认为0,取值范围[0,4096]。

touchX

number

真机触点坐标,取值范围[0,physicalWidth]。

touchY

number

真机触点坐标,取值范围[0,physicalHeight]。

touchTime

number

真机触控时间与上一次ACTION_DOWN时间的偏移量。

support.huaweicloud.com/sdkreference-cph/cph_sdk_0004.html