CN110989915A - Method for Android system to simulate and support remote multi-point control instruction - Google Patents

Method for Android system to simulate and support remote multi-point control instruction Download PDF

Info

Publication number
CN110989915A
CN110989915A CN201911224342.0A CN201911224342A CN110989915A CN 110989915 A CN110989915 A CN 110989915A CN 201911224342 A CN201911224342 A CN 201911224342A CN 110989915 A CN110989915 A CN 110989915A
Authority
CN
China
Prior art keywords
touch
click
point
android system
touch point
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN201911224342.0A
Other languages
Chinese (zh)
Inventor
黄宏发
刘毅
刘凯
林鹏程
梁刚
宗超
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen compuchip Information Technology Co.,Ltd.
Original Assignee
Shenzhen Vclusters Information Technology Co ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Vclusters Information Technology Co ltd filed Critical Shenzhen Vclusters Information Technology Co ltd
Priority to CN201911224342.0A priority Critical patent/CN110989915A/en
Publication of CN110989915A publication Critical patent/CN110989915A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0487Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser
    • G06F3/0488Interaction techniques based on graphical user interfaces [GUI] using specific features provided by the input device, e.g. functions controlled by the rotation of a mouse with dual sensing arrangements, or of the nature of the input device, e.g. tap gestures based on pressure sensed by a digitiser using a touch-screen or digitiser, e.g. input of commands through traced gestures
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/03Arrangements for converting the position or the displacement of a member into a coded form
    • G06F3/041Digitisers, e.g. for touch screens or touch pads, characterised by the transducing means
    • G06F3/0416Control or interface arrangements specially adapted for digitisers
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04808Several contacts: gestures triggering a specific function, e.g. scrolling, zooming, right-click, when the user establishes several contacts with the surface simultaneously; e.g. using several fingers or a combination of fingers and pen

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Position Input By Displaying (AREA)

Abstract

The invention relates to a method for supporting remote multipoint control instructions by Android system simulation, which comprises the following steps: defining an object on the upper layer of the system, wherein the object comprises three attributes of coordinates x/y and touch point assignment action, and performing a layer of list array packaging on the object; traversing the list array to obtain a current corresponding value and endowing the current corresponding value to the list array, marking the position of the simulated touch point at this time through a temporary variable targetIndex, and performing displacement calculation to obtain a click type; and calling a sendPointerSync method to trigger the multi-point touch instruction. The invention reduces the redundancy of codes, can flexibly support multi-point touch control, can also accurately know the current specific active touch point, and improves the code reading property and the expansibility.

Description

Method for Android system to simulate and support remote multi-point control instruction
Technical Field
The invention relates to an Android system remote control technology, in particular to a method for simulating and supporting remote multipoint control instructions by an Android system.
Background
The Android system is provided with a touch control instruction of the Android system, and when the Android system needs to be remotely controlled, a set of control instruction needs to be packaged on the upper layer of the system so as to control the remote Android system.
When we only need one touch click, we can do this:
firstly, acquiring a click simulation object newly introduced by Java, utilizing a motionevent object function by a method of sendPointerSync (), and then inputting corresponding parameters (click start time, click end time, click type (pressing, lifting and touching), x-axis coordinate position of a screen and y-axis coordinate position of the screen). If a touch click event needs to have a pressing and lifting action, the pressing action needs to be implemented once, and then the lifting action needs to be invoked once, so that the touch click event is completed.
When we only need two or three touch points, we can do this:
similarly, an object of simulation click of Instrumentation newly introduced by Java needs to be acquired, a motionevent. But only need here with the motion event.pointerproperties [ ] array and the motion event.pointercodes [ ] array, then encapsulate each touch click event, then fill the data into these two arrays, from the code level, we need to copy the code that writes a touch click event, modify the parameter and just can use, so we can support the click event of two points.
This is also possible when one or two touch click events are performed, but if more than ten touch click events are required, the code is inconvenient to expand and manage, and the code amount is undoubtedly heavy and redundant, which is not beneficial to reading and expanding.
Disclosure of Invention
The invention aims at the technical problem of the reference, and provides a method for simulating and supporting remote multipoint control instructions by an Android system.
In order to achieve the purpose, the specific technical scheme of the invention is as follows:
a method for supporting remote multipoint control instructions in Android system simulation comprises the following steps:
defining an object on the upper layer of the system, wherein the object comprises three attributes of coordinates x/y and touch point assignment action, and performing a layer of list array packaging on the object;
traversing the list array to obtain a current corresponding value and endowing the current corresponding value to the list array, marking the position of the simulated touch point at this time through a temporary variable targetIndex, and performing displacement calculation to obtain a click type;
and calling a sendPointerSync method to trigger the multi-point touch instruction.
Preferably, the specific assignment method of action is as follows: when there is only one touch point, the action value is 0, when there are two touch points, the action value is 1, when there are three touch points, the action value is 2, and so on.
Preferably, the sendPointerSync method is:
sendPointerSync (motionevent. object (click start time, click end time, type of click (press, lift, touch), number of arrays of this touch point, number of arrays of PointerProperties, number of arrays of pointerCoords, 0,0,1,1,0,0, inputdevice.
By adopting the technical scheme, the invention reduces the redundancy of codes, can flexibly support multi-point touch control, can accurately know the current specific active touch point, and improves the code readability and expansibility.
Detailed Description
In order that those skilled in the art will be able to understand and practice the present invention, further description will be given below of embodiments of the present invention.
The invention provides a method for supporting remote multipoint control instructions by Android system simulation, which comprises the following steps:
(1) defining an object on the upper layer of the system, wherein the object comprises three attributes of coordinates x/y and touch point assignment action, and performing a layer of list array packaging on the object.
Specifically, such a layer of packaging can be performed on the upper layer, by defining an object, where the object includes three attributes of x, y, and action, where the x and y attributes are values serving as coordinate axes of a mobile phone screen, and the action attribute is a behavior judgment value of a touch point, and then performing a layer of packaging of a list array on the object, when there is only one touch point, our action value is 0, when there are two touch points, the action value is 1, when there are three touch points, the action value is 2, and the action value is incremented by analogy, so we can implement remote multi-point touch.
(2) And traversing the list array to obtain a current corresponding value and endowing the current corresponding value to the list array, marking the position of the simulated touch point at this time through a temporary variable targetIndex, and performing displacement calculation to obtain a click type.
Specifically, the following are included:
a. firstly, PointProperties and PointCoords are instantiated, and the size of the touch point list at the time is filled, so that the sets corresponding to the PointProperties and the PointCoords do not need to be set in advance, and only the value is directly assigned through the size acquired from the far end;
b. traversing the size of the packaged finger List array through an enhanced for loop (the enhanced for loop can improve the processing time), acquiring the current corresponding value and setting;
c. marking the position of the touch Point of the simulation by a temporary variable (targetIndex), calculating displacement (< <) to obtain a difference value (the difference value between the click starting time and the click ending time), and according to the difference value, judging whether the click type action Point is move, down or up;
(3) and calling a sendPointerSync method to trigger the multi-point touch instruction.
Specifically, after the data information value is obtained, the sendPointerSync method can be executed very simply:
corresponding parameter values, motionevent.object function, are sequentially filled in, and then corresponding parameters (click start time, click end time, click type (press, lift, touch), array size of touch point, array of PointerProperties, array of pointerCoords, 0,0,1,1,0,0, input device.source _ touch, 0) are input. Namely, the following steps can be called:
inst.sendPointerSync(MotionEvent.obtain(when,when,actionPoint,jsonArray.size(),pointerProperties,pointerCoords,0,0,1,1,0,0,InputDevice.SOURCE_TOUCHSCREEN,0))。
the above-mentioned embodiments only express several embodiments of the present invention, and the description thereof is more specific and detailed, but not construed as limiting the scope of the present invention. It should be noted that, for a person skilled in the art, several variations and modifications can be made without departing from the inventive concept, which falls within the scope of the present invention. Therefore, the protection scope of the present patent shall be subject to the appended claims.

Claims (3)

1. A method for supporting remote multipoint control instructions in Android system simulation is characterized by comprising the following steps:
defining an object on the upper layer of the system, wherein the object comprises three attributes of coordinates x/y and touch point assignment action, and performing a layer of list array packaging on the object;
traversing the list array to obtain a current corresponding value and endowing the current corresponding value to the list array, marking the position of the simulated touch point at this time through a temporary variable targetIndex, and performing displacement calculation to obtain a click type;
and calling a sendPointerSync method to trigger the multi-point touch instruction.
2. The method for Android system to simulate and support remote multipoint control commands according to claim 1, wherein the action is assigned specifically by: when there is only one touch point, the action value is 0, when there are two touch points, the action value is 1, when there are three touch points, the action value is 2, and so on.
3. The method for Android system to simulate and support remote multipoint control commands according to claim 1, wherein the sendPointerSync method comprises:
sendPointerSync (motionevent. object (click start time, click end time, type of click (press, lift, touch), number of arrays of this touch point, number of arrays of PointerProperties, number of arrays of pointerCoords, 0,0,1,1,0,0, inputdevice.
CN201911224342.0A 2019-12-03 2019-12-03 Method for Android system to simulate and support remote multi-point control instruction Pending CN110989915A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911224342.0A CN110989915A (en) 2019-12-03 2019-12-03 Method for Android system to simulate and support remote multi-point control instruction

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911224342.0A CN110989915A (en) 2019-12-03 2019-12-03 Method for Android system to simulate and support remote multi-point control instruction

Publications (1)

Publication Number Publication Date
CN110989915A true CN110989915A (en) 2020-04-10

Family

ID=70089779

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911224342.0A Pending CN110989915A (en) 2019-12-03 2019-12-03 Method for Android system to simulate and support remote multi-point control instruction

Country Status (1)

Country Link
CN (1) CN110989915A (en)

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112394872A (en) * 2020-11-30 2021-02-23 北京麟卓信息科技有限公司 Method and device for optimizing android system multi-touch supported by Linux platform
CN112394871A (en) * 2020-11-30 2021-02-23 北京麟卓信息科技有限公司 Method and device for supporting android system multi-point touch by Linux platform

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324424A (en) * 2012-03-23 2013-09-25 百度在线网络技术(北京)有限公司 Remote simulation multi-point touch method and system
CN103365441A (en) * 2013-06-24 2013-10-23 福州博远无线网络科技有限公司 Method for remotely controlling Android mobile phone desktop through computer terminal
CN107203432A (en) * 2017-05-27 2017-09-26 网易(杭州)网络有限公司 A kind of method and system of remote control Android device
CN108762659A (en) * 2018-05-24 2018-11-06 深圳市腾讯网络信息技术有限公司 Control method, device, storage medium and the electronic device of cloud terminal

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN103324424A (en) * 2012-03-23 2013-09-25 百度在线网络技术(北京)有限公司 Remote simulation multi-point touch method and system
CN103365441A (en) * 2013-06-24 2013-10-23 福州博远无线网络科技有限公司 Method for remotely controlling Android mobile phone desktop through computer terminal
CN107203432A (en) * 2017-05-27 2017-09-26 网易(杭州)网络有限公司 A kind of method and system of remote control Android device
CN108762659A (en) * 2018-05-24 2018-11-06 深圳市腾讯网络信息技术有限公司 Control method, device, storage medium and the electronic device of cloud terminal

Cited By (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112394872A (en) * 2020-11-30 2021-02-23 北京麟卓信息科技有限公司 Method and device for optimizing android system multi-touch supported by Linux platform
CN112394871A (en) * 2020-11-30 2021-02-23 北京麟卓信息科技有限公司 Method and device for supporting android system multi-point touch by Linux platform

Similar Documents

Publication Publication Date Title
JP6512676B2 (en) Test method, test system, test apparatus and readable recording medium
CN107038112B (en) Application interface debugging method and device
US9423953B2 (en) Emulating pressure sensitivity on multi-touch devices
CN110011978B (en) Method, system, device and computer equipment for modifying block chain network configuration
CN110989915A (en) Method for Android system to simulate and support remote multi-point control instruction
CN107608609B (en) Event object sending method and device
CN109432767A (en) A kind of exchange method and system of game paddle and terminal
CN102790918A (en) Smart television and method for receiving remote controller input by smart television
CN103324400A (en) Method and device for displaying menus in 3D model
CN108170608A (en) Compatibility test method, test terminal and storage medium
CN109117062A (en) Mapping method and device and mobile device and game device
CN102830930A (en) Treatment method and device for keyboard keys and multimedia terminal
CN104820565A (en) Method and terminal for processing sliding operation instruction
CN106569708B (en) Method and terminal for realizing pressing simulation display
CN109840201B (en) UI test method, device, electronic equipment and computer readable storage medium
CN101976190B (en) DirectUI based interface generating system and method
CN109144881B (en) Monkey testing method, apparatus, terminal device and storage medium
CN103064619A (en) Method and system for performing slingshot unlocking on touch screen mobile device
CN113064535B (en) Vernier display method and device for two-dimensional chart, electronic equipment and storage medium
JP5204343B1 (en) Test system and program
US10915678B1 (en) Surface mapping apparatuses and methods
CN103186253B (en) A kind of double rocking lever simulation method of multi-point touch, device and equipment
CN111694451B (en) Method, device, equipment and storage medium for processing operation data
CN106610748B (en) Information input method and device of touch screen
CN114281627A (en) Automatic operation method and device for recovery detection

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
TA01 Transfer of patent application right

Effective date of registration: 20211224

Address after: 518000 B901, Shenzhen national engineering laboratory building, No. 20, Gaoxin South seventh Road, high tech Zone community, Yuehai street, Nanshan District, Shenzhen, Guangdong

Applicant after: Shenzhen compuchip Information Technology Co.,Ltd.

Address before: 518000 Building 201, No. 1, Qianwan Road, Qianhai Shenzhen-Hong Kong Cooperation Zone, Shenzhen, Guangdong Province (Admitted to Shenzhen Qianhai Business Secretary Co., Ltd.)

Applicant before: SHENZHEN VCLUSTERS INFORMATION TECHNOLOGY Co.,Ltd.

TA01 Transfer of patent application right
RJ01 Rejection of invention patent application after publication

Application publication date: 20200410

RJ01 Rejection of invention patent application after publication