CN103365441B - The method of computer terminal Long-distance Control Android mobile phone desktop - Google Patents
The method of computer terminal Long-distance Control Android mobile phone desktop Download PDFInfo
- Publication number
- CN103365441B CN103365441B CN201310250615.5A CN201310250615A CN103365441B CN 103365441 B CN103365441 B CN 103365441B CN 201310250615 A CN201310250615 A CN 201310250615A CN 103365441 B CN103365441 B CN 103365441B
- Authority
- CN
- China
- Prior art keywords
- screen
- mobile phone
- equipment
- android mobile
- event
- Prior art date
Links
- 150000001875 compounds Chemical class 0.000 claims abstract description 62
- 230000000875 corresponding Effects 0.000 claims description 23
- 206010018987 Haemorrhages Diseases 0.000 claims description 10
- 230000000740 bleeding Effects 0.000 claims description 10
- 231100000319 bleeding Toxicity 0.000 claims description 10
- 238000002513 implantation Methods 0.000 claims description 8
- 239000000284 extracts Substances 0.000 claims description 3
- 239000004676 acrylonitrile butadiene styrene Substances 0.000 description 2
- 239000008186 active pharmaceutical agents Substances 0.000 description 2
- 230000001360 synchronised Effects 0.000 description 2
- 101710024007 MAX2 Proteins 0.000 description 1
- 101710083555 PLEKHH1 Proteins 0.000 description 1
- 238000006243 chemical reactions Methods 0.000 description 1
- 238000002347 injection Methods 0.000 description 1
- 239000007924 injections Substances 0.000 description 1
Abstract
Description
[technical field]
The present invention relates to a kind of method of computer terminal Long-distance Control Android mobile phone desktop.
[background technology]
On market, manage Android cell phone software by computer terminal now, all only accomplished generalMobile phone screen is synchronized to computer terminal and shows, but can not directly control. Especially to demonstrate handWhen some application programs of machine, need to control computer while control mobile phone, pass through mobile phone operationChange the content of mobile phone screen, and then again the content synchronization of mobile phone screen is shown to computer terminalShow, have inconvenience.
[summary of the invention]
The technical problem to be solved in the present invention, is to provide a kind of computer terminal Long-distance Control Android handThe method of machine desktop, its mouse by computer terminal is clicked just can Long-distance Control Android mobile phone tableFace.
The present invention is achieved in that
The method of computer terminal Long-distance Control Android mobile phone desktop, comprises the steps:
Step 1, computer terminal send screen event to Android mobile phone and inject instruction, described screen thingPart injects screen coordinate (x, y) and the event type that instruction comprises control point, and described x is AndroidX-axis coordinate on mobile phone screen, described y is the Y-axis coordinate on Android mobile phone screen;
Step 2, Android mobile phone judge in current internal memory, whether there is mobile phone screen essential information, described inMobile phone screen essential information comprises screen equipment number, physics code coordinate, screen type for positioning screen,If had, execution step 5, if do not had, execution step 3; The described physics code for positioning screenCoordinate comprises the minimum of a value X of X-axis physics code coordinate0With maximum X1And Y-axis physics code coordinateMinimum of a value Y0With maximum Y1;
Step 3, obtain the mobile phone screen facility information of Android mobile phone;
Step 4, resolve described mobile phone screen facility information, obtain described mobile phone screen essential information;
Step 5, the screen coordinate (x, y) at control point is converted to Android mobile phone screen can knowsOther actual physics code coordinate (value_x, value_y);
Step 6, according to screen type, create for screen event being injected to the compound command of mobile phone screen,Open Android mobile phone screen equipment according to described screen equipment number, by described compound command toAndroid mobile phone injects screen event, and Android mobile phone screen equipment is carried out this screen event, therebyRealize computer terminal Long-distance Control Android mobile phone desktop.
Further, described event type comprises: press, lift, grow by or slide.
Further, described step 3 is specially: obtain Android mobile phone by getevent-P orderMobile phone screen facility information.
Further, described step 4 is specially: resolve described mobile phone screen facility information and be specially:Search in mobile phone screen facility information/dev/input/eventM statement, extracts the M in eventM, instituteState M and be screen equipment number; In mobile phone screen facility information, search capable head and be 0035 statement, instituteState the minimum of a value X that comprises X-axis physics code coordinate in 0035 statement0With maximum X1, at mobile phone screenIn facility information, search capable head and be 0036 statement, in described 0036 statement, comprise Y-axis physics code and sitTarget minimum of a value Y0With maximum Y1; In mobile phone screen facility information, search and whether exist capable head to be0039 statement, if having, judges that described screen type, as category-B equipment, if do not have, judges instituteStating screen type is category-A equipment; Control screen action, will send not according to multi-point touch agreementThe same packing of orders, described multi-point touch agreement is divided into two types according to hardware capability, is defined as AType multi-point touch agreement and category-B type multi-point touch agreement, described category-A equipment refers to for processing notThe equipment of contact of mark, how original by all contacts of described category-A type multi-point touch protocol descriptionData report upper strata, and described category-B equipment refers to for following the tracks of the equipment of the contact that can identify, instituteHow state category-B type multi-point touch protocol description reports the lastest imformation of single point contacts by event grooveUpper strata.
Further, described step 5, is converted to Android by the screen coordinate (x, y) at control pointThe actual physics code coordinate (value_x, value_y) that mobile phone screen can be identified, its concrete steps asUnder:
value_x=x*(X1–X0)/width+X0;
value_y=y*(Y1–Y0)/height+Y0;
Described width is that the screen of mobile phone is wide, and the screen that height is mobile phone is high, in calling mobile phone systemWhen API, obtain.
Further, described step 6, according to screen type, creates for screen event is injected to mobile phoneThe compound command of screen, the form of described compound command is inttype, intcode, intvalue;
Inject screen event by described compound command to Android mobile phone, be specially:
For the screen event of category-A equipment, screen event implantation step is as follows:
The compound command of step 10, establishment event type;
The compound command of step 11, establishment value_x physics code coordinate;
The compound command of step 12, establishment value_y physics code coordinate;
Compound command corresponding to point receiving collected in step 13, establishment;
Step 14, compound command corresponding to establishment report screen;
Step 10 to the compound command of step 14 is write in Android mobile phone screen equipment in succession,Android mobile phone screen equipment is carried out this screen event, thereby realizes computer terminal Long-distance Control AndroidMobile phone desktop;
For the screen event of category-B equipment, screen event implantation step is as follows:
Step 20, establishment start compound command corresponding to bleeding point;
The compound command of step 21, establishment event type;
The compound command of step 22, establishment value_x physics code coordinate;
The compound command of step 23, establishment value_y physics code coordinate;
Step 24, establishment finish compound command corresponding to bleeding point;
Step 25, compound command corresponding to establishment report screen;
Step 20 to the compound command of step 25 is write in Android mobile phone screen equipment in succession,Android mobile phone screen equipment is carried out this screen event, thereby realizes computer terminal Long-distance Control AndroidMobile phone desktop.
Tool of the present invention has the following advantages: by resolving mobile phone screen facility information, obtain screen equipment number,For physics code coordinate, the screen type of positioning screen, inject screen event, root according to screen equipment numberThe actual physics code coordinate that is control point according to the physics code Coordinate Conversion for positioning screen, according to screen classesType creates compound command, just can Long-distance Control by the mouse click of computer terminal thereby realizeAndroid mobile phone desktop.
[brief description of the drawings]
The present invention is further illustrated in conjunction with the embodiments with reference to the accompanying drawings.
Fig. 1 is the inventive method structural representation.
[detailed description of the invention]
Refer to Fig. 1, the method for computer terminal Long-distance Control Android mobile phone desktop, comprises following stepRapid:
Step 1, computer terminal send screen event to Android mobile phone and inject instruction, described screen thingPart injects screen coordinate (x, y) and the event type that instruction comprises control point, and described x is AndroidX-axis coordinate on mobile phone screen, described y is the Y-axis coordinate on Android mobile phone screen; DescribedEvent type is included on screen and presses, lifts, grows by or slide; It should be noted that, because be meterThe long-range Android mobile phone of calculation machine end, so computer certainly exists a kind of pass that is connected with Android mobile phoneSystem, this annexation can be to be connected or connected by usb data line by wifi;
Step 2, Android mobile phone judge in current internal memory, whether there is mobile phone screen essential information, described inMobile phone screen essential information comprises screen equipment number, physics code coordinate, screen type for positioning screen,If had, execution step 5, if do not had, execution step 3; The described physics code for positioning screenCoordinate comprises the minimum of a value X of X-axis physics code coordinate0With maximum X1And Y-axis physics code coordinateMinimum of a value Y0With maximum Y1; Because the control point screen coordinate transmitting from computer terminal can not be directUse, the physics code coordinate that need to convert screen to just can accurately be located, described for positioning screenPhysics code coordinate represent an absolute coordinate system;
Step 3, obtain the mobile phone screen facility information of Android mobile phone; In the present embodiment, pass throughThe mobile phone screen facility information of Android mobile phone is obtained in getevent-P order;
For example, the mobile phone screen facility information that order getevent-P returns comprises:
1.adddevice7:/dev/input/event2
2.name:"touchscreen"
3.events:
4.SYN(0000):000000010003
5.KEY(0001):0045014a
6.ABS(0003):0000value0,min0,max0,fuzz0flat0
7.0001value0,min0,max0,fuzz0flat0
8.0030value0,min0,max15,fuzz0flat0
9.0031value0,min0,max15,fuzz0flat0
10.0032value0,min0,max255,fuzz0flat0
11.0034value0,min0,max1,fuzz0flat0
12.0035value0,min0,max479,fuzz0flat0
13.0036value0,min0,max799,fuzz0flat0
14.0039value0,min1,max2,fuzz0flat0
Step 4, resolve described mobile phone screen facility information, obtain described mobile phone screen essential information;
In the present embodiment, resolve described mobile phone screen facility information concrete steps and be:
Search in mobile phone screen facility information/dev/input/eventM statement, extracts in eventMM, described M is screen equipment number; Because there is much equipment on mobile phone, as sound device, gravitySensing apparatus, meanwhile, device number corresponding to equipment on every mobile phone, is substantially all different, instituteTo want to carry out screen event injection, must first find device number corresponding to corresponding mobile phone screen equipment, exampleAs, adddevice7:/dev/input/event2, wherein the device number of this mobile phone screen equipment is 2;
In mobile phone screen facility information, search capable head and be 0035 statement, in described 0035 statement, compriseThe minimum of a value X of X-axis physics code coordinate0With maximum X1, in mobile phone screen facility information, search row firstBe 0036 statement, in described 0036 statement, comprise the minimum of a value Y of Y-axis physics code coordinate0And maximumValue Y1;
For example: 0035value0, min0, max479, fuzz0flat0
0036value0,min0,max799,fuzz0flat0
Be X0Be 0, X1Be 479, Y0Be 0, Y1Be 799;
In mobile phone screen facility information, searching and whether having capable head is 0039 statement, if having, sentencesFixed described screen type is category-B equipment, if do not have, judges that described screen type is as category-A equipment;Control screen action, will send the different packing of orders according to multi-point touch agreement (MTP), instituteState multi-point touch agreement and be divided into two types according to hardware capability, be defined as category-A type multi-point touch agreementWith category-B type multi-point touch agreement, described category-A equipment refers to the equipment of the contact not identifying for processing,How described category-A type multi-point touch protocol description reports upper strata by the initial data of all contacts, instituteState category-B equipment and refer to for following the tracks of the equipment of the contact that can identify, described category-B type multi-point touch is assistedView describes how the lastest imformation of single point contacts is reported to upper strata by event groove;
Step 5, the screen coordinate (x, y) at control point is converted to Android mobile phone screen can knowsOther actual physics code coordinate (value_x, value_y);
Its concrete steps are as follows:
value_x=x*(X1–X0)/width+X0;
value_y=y*(Y1–Y0)/height+Y0;
Described width is that the screen of mobile phone is wide, and the screen that height is mobile phone is high, in calling mobile phone systemWhen API, obtain;
Step 6, according to screen type, create for screen event being injected to the compound command of mobile phone screen,Open Android mobile phone screen equipment according to described screen equipment number, by described compound command toAndroid mobile phone injects screen event, and Android mobile phone screen equipment is carried out this screen event, therebyRealize computer terminal Long-distance Control Android mobile phone desktop.
According to screen type, create the compound command for screen event being injected to mobile phone screen, described groupThe form that closes order is inttype, intcode, intvalue;
Inject screen event by described compound command to Android mobile phone, be specially:
For the screen event of category-A equipment, screen event implantation step is as follows:
The compound command of step 10, establishment event type;
The compound command of step 11, establishment value_x physics code coordinate;
The compound command of step 12, establishment value_y physics code coordinate;
Compound command corresponding to point receiving collected in step 13, establishment;
Step 14, compound command corresponding to establishment report screen;
Step 10 to the compound command of step 14 is write in Android mobile phone screen equipment in succession,Android mobile phone screen equipment is carried out this screen event, thereby realizes computer terminal Long-distance Control AndroidMobile phone desktop;
For the screen event of category-B equipment, screen event implantation step is as follows:
Step 20, establishment start compound command corresponding to bleeding point;
The compound command of step 21, establishment event type;
The compound command of step 22, establishment value_x physics code coordinate;
The compound command of step 23, establishment value_y physics code coordinate;
Step 24, establishment finish compound command corresponding to bleeding point;
Step 25, compound command corresponding to establishment report screen;
Step 20 to the compound command of step 25 is write in Android mobile phone screen equipment in succession to AndroidMobile phone screen equipment is carried out this screen event, thereby realizes computer terminal Long-distance Control Android mobile phone tableFace;
For example, that type is conventional is EV_KEY (0x01), EV_REL (0x02), and EV_ABS (0x03),EV_SYN (0x00), corresponding keyboard respectively, relative coordinate, absolute coordinate, synchronous event;
The screen event of category-A equipment, screen event implantation step is as follows with computer language representation:
Step 10, ABS_MT_TOUCH_MAJOR/ABS_MT_PRESSURE presentation of events type (While not supporting ABS_MT_PRESSURE, can use ABS_MT_TOUCH_MAJOR)
According to the form of compound command, inttype, intcode, intvalue, the compound command of establishmentFor: 30x300x1c, wherein 3 is type value, and 0x30 is code value, and 0x1c is value value; ?In this order, value value is touch screen force value
Step 11, ABS_MT_POSITION_X represent value_x physics code coordinate
Corresponding compound command is 30x350x50;
Step 12, ABS_MT_POSITION_Y represent value_y physics code coordinate
Corresponding compound command is 30x360x70;
Step 13, SYN_MT_REPORT represent to collect the point receiving
Corresponding compound command is 00x20x0
Step 14, SYN_REPORT represent to report screen
Corresponding compound command is 00x00x0
The screen event of category-B equipment, screen event implantation step is as follows with computer language representation:
Step 20, ABS_MT_TRACKING_ID represent to start bleeding point
Step 21, ABS_MT_TOUCH_MAJOR/ABS_MT_PRESSURE presentation of events type
Step 22, ABS_MT_POSITION_X represent value_x physics code coordinate
Step 23, ABS_MT_POSITION_Y represent value_y physics code coordinate
Step 24, ABS_MT_TRACKING_ID represent to finish bleeding point
Step 25, SYN_REPORT represent to report screen
Step 20 is to the compound command of step 25 correspondence, as following table:
It should be noted that, the Android mobile phone that described Android mobile phone must be Root,Root is the super administrator account in the class unix systems such as Linux, for Android mobile phone,Usual said Root, can give third party's program in fact to Android system direct controlAuthority.
Although more than described the specific embodiment of the present invention, be familiar with the technology people of the artMember should be appreciated that our described specific embodiment is illustrative, instead of for to thisThe restriction of bright scope, those of ordinary skill in the art are equivalent what do according to spirit of the present inventionModify and change, all should be encompassed in the scope that claim of the present invention protects.
Claims (5)
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310250615.5A CN103365441B (en) | 2013-06-24 | 2013-06-24 | The method of computer terminal Long-distance Control Android mobile phone desktop |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201310250615.5A CN103365441B (en) | 2013-06-24 | 2013-06-24 | The method of computer terminal Long-distance Control Android mobile phone desktop |
Publications (2)
Publication Number | Publication Date |
---|---|
CN103365441A CN103365441A (en) | 2013-10-23 |
CN103365441B true CN103365441B (en) | 2016-05-04 |
Family
ID=49366959
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201310250615.5A CN103365441B (en) | 2013-06-24 | 2013-06-24 | The method of computer terminal Long-distance Control Android mobile phone desktop |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN103365441B (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3280121A1 (en) | 2016-08-05 | 2018-02-07 | Light Up Technology Group Limited | Method and device for determining user relationship |
Families Citing this family (7)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN105005529B (en) * | 2014-04-16 | 2018-10-23 | 腾讯科技(深圳)有限公司 | A kind of method and device that application program is tested |
CN105094633A (en) * | 2014-05-14 | 2015-11-25 | 小米科技有限责任公司 | Method and device for transmitting control instruction |
CN105812421A (en) * | 2014-12-30 | 2016-07-27 | Tcl集团股份有限公司 | Remote control method based on Android platform and device thereof |
CN105260112A (en) * | 2015-09-14 | 2016-01-20 | 百度在线网络技术(北京)有限公司 | Method and device for controlling screen between terminals |
CN105975174A (en) * | 2016-04-26 | 2016-09-28 | 乐视控股(北京)有限公司 | System and method for simulating click operation under situation of no touch screens |
CN107071551B (en) * | 2017-04-26 | 2020-07-24 | 四川长虹电器股份有限公司 | Multi-screen interactive screen response method applied to smart television system |
CN108536491A (en) * | 2018-02-07 | 2018-09-14 | 武汉光庭信息技术股份有限公司 | A kind of processing method and system of mobile unit Reverse Turning Control Android mobile terminal |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101893964A (en) * | 2010-07-21 | 2010-11-24 | 中兴通讯股份有限公司 | Mobile terminal remote control method and mobile terminal |
CN102131001A (en) * | 2011-03-21 | 2011-07-20 | 北京洋浦伟业科技发展有限公司 | Remote control system and method of mobile communication terminal |
CN102609192A (en) * | 2012-01-17 | 2012-07-25 | 华为终端有限公司 | Mobile terminal operating method by computer and mobile terminal |
EP2579142A1 (en) * | 2011-10-06 | 2013-04-10 | Samsung Electronics Co., Ltd. | Mobile device and method of remotely controlling a controlled device |
-
2013
- 2013-06-24 CN CN201310250615.5A patent/CN103365441B/en active IP Right Grant
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101893964A (en) * | 2010-07-21 | 2010-11-24 | 中兴通讯股份有限公司 | Mobile terminal remote control method and mobile terminal |
CN102131001A (en) * | 2011-03-21 | 2011-07-20 | 北京洋浦伟业科技发展有限公司 | Remote control system and method of mobile communication terminal |
EP2579142A1 (en) * | 2011-10-06 | 2013-04-10 | Samsung Electronics Co., Ltd. | Mobile device and method of remotely controlling a controlled device |
CN102609192A (en) * | 2012-01-17 | 2012-07-25 | 华为终端有限公司 | Mobile terminal operating method by computer and mobile terminal |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
EP3280121A1 (en) | 2016-08-05 | 2018-02-07 | Light Up Technology Group Limited | Method and device for determining user relationship |
Also Published As
Publication number | Publication date |
---|---|
CN103365441A (en) | 2013-10-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN103365779B (en) | Method for testing software and system | |
US10193971B2 (en) | Method, server and system for application synchronization | |
WO2015143865A1 (en) | Application scenario identification method, power consumption management method and apparatus and terminal device | |
WO2016095554A1 (en) | Test method, device and system for application | |
CN102904996B (en) | The method and device of a kind of handset touch panel performance test, system | |
CN104615538B (en) | A kind of mobile phone application testing method based on mobile phone interface control element | |
CN103281575B (en) | A kind of Novel control method of intelligent television | |
US9317413B2 (en) | Testing device and testing method thereof | |
US9161238B2 (en) | Mobile device monitoring and testing | |
KR20150076230A (en) | Application program management method and apparatus, server, and terminal device | |
US9386264B2 (en) | Augmenting capabilities of a host device | |
CN105573129B (en) | Cross-platform smart home mobile terminal based on Cordova | |
US10397876B2 (en) | Multi-factor provisioning of wireless devices | |
CN103561479A (en) | Bluetooth device communication method and device | |
TW200604920A (en) | Window split system and method, and computer readable medium and application program interface thereof | |
CN105701122B (en) | Log collection method, device and system | |
CN102946557B (en) | Implementation method for controlling android system set-top box by using controller | |
CN104182288A (en) | Method for automatically testing power consumption of server cluster system | |
CN102270133A (en) | Method and equipment for showing status of page window | |
CN104539977A (en) | Live broadcast previewing method and device | |
CN102662649A (en) | Method and apparatus for customizing function menu of application programs | |
CN102298455A (en) | Realization method and system for remote controller with mouse function | |
US8682935B2 (en) | System and method for application navigation | |
CN101923434B (en) | Type setting method and system of application icon and mobile terminal | |
CN101287266B (en) | Test system and method for mobile phone |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
C06 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
C10 | Entry into substantive examination | ||
TA01 | Transfer of patent application right |
Effective date of registration: 20160106 Address after: 100000, No. two, building 17, Zhongguancun Software Park, 8 northeast Wang Xi Road, Beijing, Haidian District, A2 Applicant after: Baidu.com Times Technology (Beijing) Co., Ltd Address before: 350000, 403A building, four floor, Torch Innovation Building, 8 star road, Fuzhou Development Zone, Fuzhou, Fujian, China Applicant before: Fuzhou Boyuan Wireless Network Technology Co., Ltd. |
|
C41 | Transfer of patent application or patent right or utility model | ||
GR01 | Patent grant | ||
C14 | Grant of patent or utility model |