CN105812421A - Remote control method based on Android platform and device thereof - Google Patents
Remote control method based on Android platform and device thereof Download PDFInfo
- Publication number
- CN105812421A CN105812421A CN201410848406.5A CN201410848406A CN105812421A CN 105812421 A CN105812421 A CN 105812421A CN 201410848406 A CN201410848406 A CN 201410848406A CN 105812421 A CN105812421 A CN 105812421A
- Authority
- CN
- China
- Prior art keywords
- ndroid
- service end
- android device
- equipment
- sectional drawing
- 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
Links
Landscapes
- Information Transfer Between Computers (AREA)
Abstract
The invention is suitable for the remote control technology field, and provides a remote control method based on an Android platform. The remote control method based on the Android platform is characterized in that connection between a client Android device and a server Android device can be established, and the remote control request information can be transmitted to the server Android device; the captured screen of the current interface transmitted by the server Android device can be received; the captured screen can be displayed on the display screen of the own end; the clicking operation instruction of the user can be received; whether the coordinate corresponding to the clicking operation is in the captured screen can be determined; when the coordinate corresponding to the clicking operation is in the captured screen, the clicking operation event can be transmitted to the server Android device in an appointed format; when the coordinate corresponding to the clicking operation is not in the captured screen, the client Android device is used to execute the operation corresponding to the clicking operation instruction.
Description
Technical field
The invention belongs to remote control technology field, particularly relate to a kind of long-range control method based on Android platform and device.
Background technology
It is known that at present, Android has become as one of open source operating system of most captivation, from mobile phone to panel computer, from intelligent television to industry medical field, the figure of Android can be seen.Along with Android becomes mainstream operation system, the demand that Android device is carried out remotely control by people is also increasing.The mainstream operation systems such as Windows have the remote desktop software of maturation, but android system does not have the remote desktop scheme of maturation so far, thus giving the problem that user remotely controls to make troubles.
In view of above-mentioned present situation, await proposing a kind of remote control method case for Android platform.
Summary of the invention
It is an object of the invention to provide a kind of long-range control method based on Android platform and device, it is intended to the android system of solution does not have the remote desktop scheme of maturation so far, thus giving the problem that user remotely controls to make troubles.
First aspect, the invention provides a kind of long-range control method based on Android platform, said method comprising the steps of:
Customer end A ndroid equipment is set up with service end Android device and is connected, and initiates the request message of remote control service end Android device to described service end Android device;
Customer end A ndroid equipment receives the sectional drawing of the current interface that service end Android device sends;
Described sectional drawing is shown on the display screen of local terminal by customer end A ndroid equipment;
Customer end A ndroid equipment receives the clicking operation instruction of user;
Customer end A ndroid equipment judges whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;
When judging that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;
When judging that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.
Second aspect, the invention provides a kind of remote control based on Android platform, and described device includes:
Initiation module, is connected with the foundation of service end Android device for customer end A ndroid equipment, and initiates the request message of remote control service end Android device to described service end Android device;
Sectional drawing receiver module, for receiving the sectional drawing of the current interface that service end Android device sends;
Display module, for being shown in the display screen of local terminal by described sectional drawing;
Command reception module, for receiving the clicking operation instruction of user;
Judge module, for judging whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;
Event sending module, for when judge that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;
Performing module, for when judge that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.
The third aspect, the invention provides a kind of long-range control method based on Android platform, said method comprising the steps of:
Service end Android device receives the request message of the remote control service end Android device that customer end A ndroid equipment is initiated;
Service end Android device is sent to customer end A ndroid equipment after accepting request after continuous for its current interface sectional drawing;
Service end Android device receives customer end A ndroid equipment to arrange the clicking operation event that form sends;
Described event is write corresponding device file to realize the simulation of incoming event by service end Android device.
Fourth aspect, the invention provides a kind of remote control based on Android platform, and described device includes:
Control request receiver module, for receiving the request message of the remote control service end Android device that customer end A ndroid equipment is initiated;
Screen capture module, after accepting request for service end Android device, is sent to customer end A ndroid equipment after continuous for its current interface sectional drawing;
Event receiver module, for receiving customer end A ndroid equipment to arrange the clicking operation event that form sends;
Writing module, for writing corresponding device file to realize the simulation of incoming event by described event.
In the present invention, customer end A ndroid equipment is set up with service end Android device and is connected, and initiates remote control request message to described service end Android device;Receive the sectional drawing of the current interface that service end Android device sends;Described sectional drawing is shown on the display screen of local terminal;Receive the clicking operation instruction of user;Judge whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;When judging that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;When judging that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.The present invention can realize any two kinds of equipment based on Android platform can carry out long-distance tabletop control mutually relative to each other.
Accompanying drawing explanation
Fig. 1 be the embodiment of the present invention provide client-side based on Android platform long-range control method realize schematic flow sheet;
Fig. 2 be another embodiment of the present invention provide client-side based on Android platform long-range control method realize schematic flow sheet;
Fig. 3 be the embodiment of the present invention provide service side based on Android platform long-range control method realize schematic flow sheet;
Fig. 4 is the client-side structural representation based on the remote control of Android platform of embodiment of the present invention offer;
Fig. 5 is the client-side structural representation based on the remote control of Android platform of another embodiment of the present invention offer;
Fig. 6 is the service side structural representation based on the remote control of Android platform of embodiment of the present invention offer.
Detailed description of the invention
In order to make the purpose of the present invention, technical scheme and beneficial effect clearly understand, below in conjunction with drawings and Examples, the present invention is further elaborated.Should be appreciated that specific embodiment described herein is only in order to explain the present invention, is not intended to limit the present invention.
In the present invention, by setting up DisplayHardware object, Gralloc module and frame buffer zone module in Android device;And described DisplayHardware object, Gralloc module and frame buffer zone module are bound, jointly complete to show remote desktop in the client.The present invention can realize any two kinds of equipment based on Android platform can carry out long-distance tabletop control mutually relative to each other.
In order to technical solutions according to the invention are described, illustrate below by specific embodiment.
Refer to Fig. 1, for the embodiment of the present invention provide client-side based on Android platform long-range control method realize flow process, it comprises the following steps:
In step S101, customer end A ndroid equipment is set up with service end Android device and is connected, and initiates the request message of remote control service end Android device to described service end Android device;
In step s 102, customer end A ndroid equipment receives the sectional drawing of the current interface that service end Android device sends;
In step s 103, described sectional drawing is shown on the display screen of local terminal by customer end A ndroid equipment;
In step S104, customer end A ndroid equipment receives the clicking operation instruction of user;
In embodiments of the present invention, obtained by MotionEvent.getRawX () and MotionEvent.getRawY () and click screen present coordinate values, be i.e. abscissa EventX and vertical coordinate Eventy;The wide width and high height of sectional drawing is obtained by Bitmap.getWidth () and Bitmap.getHeight ();Described sectional drawing coordinate figure is obtained, i.e. abscissa PicX and vertical coordinate PicY by View.getTop () and View.getLeft ().
In step S105, customer end A ndroid equipment judges whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;
In embodiments of the present invention, it is judged that click whether the current abscissa of screen is arranged in described sectional drawing, PicX < EventX < PicX+width is namely judged, it is judged that click whether the current vertical coordinate of screen is arranged in described sectional drawing, i.e. PicY < EventY < PicY+height;If it is determined that launch an attack, the current abscissa of screen and vertical coordinate are respectively positioned in described sectional drawing, then it is assumed that current screen coordinate of clicking is positioned at remote desktop;Otherwise it is assumed that currently click screen coordinate to be located locally desktop.
In step s 106, when judging that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;
In step s 107, when judging that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.
In embodiments of the present invention, refer to Fig. 2, before step S101, further comprising the steps of:
In step S1011, initialize DisplayHardware object, and the remote desktop of described DisplayHardware object factory, Gralloc module are bound with frame buffer zone module;
In embodiments of the present invention, in customer end A ndroid equipment, set up DisplayHardware object, Gralloc module and frame buffer zone module;Wherein, DisplayHardware object is for describing the object of customer end A ndroid device display screen, Gralloc module is a kind of hardware abstraction layer in android system, it encapsulates and all of display screen is accessed operation, and frame buffer zone module for showing remote desktop in the display screen of customer end A ndroid equipment.
In embodiments of the present invention, in android system, the support of hardware is divided into two-layer, one layer is user's space, and another layer is kernel spacing, and kernel-driven layer operates in kernel spacing, and hardware abstraction layer (i.e. HAL) operates in user's space.Hardware abstraction layer, in simple terms, it is simply that linux kernel drives the encapsulation of layer program, provides interface to upper strata, and what shield bottom realizes details.
Display screen in Android device is abstracted into a frame buffer zone (FrameBuffer), and gralloc module then encapsulates and all of frame buffer zone are accessed operation.The application program of user's space, before using frame buffer zone, first has to load gralloc module, secondly obtains a gralloc equipment and a fb equipment (frame buffer zone equipment).Gralloc equipment is used for distributing graphic buffer, and fb equipment is used for graphic buffer is rendered into frame buffer zone.
After having had gralloc equipment, the application program in user's space just can apply for distribution one block graphics relief area, and is come by the address space of this block graphics Buffer mapping to application program, in order to the content of the picture can drawn to the inside write.Finally, the graphic buffer being above already prepared to just is rendered in frame buffer zone by fb equipment by the application program in user's space, is plotted in display screen by the content of graphic buffer, it is achieved display function.Correspondingly, when the application program in user's space be no longer necessary to use a block graphics relief area time, it is possible to discharge it by gralloc equipment, and by it from address space unmapped, thus no longer realize display function.This is to control the ultimate principle that display screen shows in Android system.
In step S1012, customer end A ndroid equipment sends connection request message to service end Android device;
In embodiments of the present invention, customer end A ndroid equipment sends connection request message to service end Android device, wherein, carries the IP of service end Android device, port numbers and password in described connection request message.
In step S1013, when connection request passes through, described DisplayHardware object comes into force, and customer end A ndroid equipment initiates the request message of remote control service end Android device to described service end Android device.
In embodiments of the present invention, when code error, customer end A ndroid equipment receives the code error message that service end Android device returns, and SurfaceFlinger does not enable DisplayHardware object, wherein, SurfaceFlinger is for managing the service of frame buffer zone module.When password is correct, customer end A ndroid equipment receives the correct message of password that service end Android device returns, and SurfaceFlinger enables DisplayHardware object.
In embodiments of the present invention, the video information that the sectional drawing of the current interface that customer end A ndroid equipment reception service end Android device returns is corresponding;The described video information that customer end A ndroid equipment interconnection receives is decoded, and obtains corresponding sectional drawing;Described sectional drawing is saved in the module of described frame buffer zone by customer end A ndroid equipment;
Customer end A ndroid equipment reads described sectional drawing from the module of described frame buffer zone, and at the described sectional drawing of service end Android device described in its display screen display.
In embodiments of the present invention, utilize ffmpeg order that described video information is decoded, be converted to sectional drawing by video information.Wherein, ffmpeg is a very powerful instrument, use it can convert video formats, including video container form, video code model.Other parameter of video can be changed, such as the frame number of frame per second-broadcasting per second, the size of video, size etc..Can also by picture converting video.In the present embodiment, ffmpeg instrument is adopted to realize the conversion of video and picture.
As one embodiment of the present invention, after obtaining corresponding sectional drawing, described sectional drawing is carried out pretreatment, particularly as follows: calculate screen width and the height of customer end A ndroid equipment and service end Android device, judge that whether service end Android device screen width is more than customer end A ndroid device screen width, whether service end Android device screen height is more than customer end A ndroid device screen height, if one of them condition meets, (namely service end Android device screen width is greater than customer end A ndroid device screen width;Or service end Android device screen height is greater than customer end A ndroid device screen height), described sectional drawing is carried out equal proportion convergent-divergent so that remote desktop width and height are less than the width of customer end A ndroid device screen and height.
In embodiments of the present invention, owing to SurfaceFlinger service in android system (for managing the service of system-frame relief area equipment) can support multiple DisplayHardware simultaneously, namely there is the possibility simultaneously supporting multiple display screen.When client is connected with service end, client, except showing local desktop, also shows remote desktop.Therefore, increase a DisplayHardware object in system, be called DisplayHardware1, be used for realizing the display of remote desktop.And DisplayHardware object original in system is called DisplayHardware0, it is used for realizing the display of local desktop.
It addition, Gralloc module system carried, it is called Gralloc0 module, the frame buffer zone equipment (i.e. fb equipment) that system carries, it is called fb0 equipment, and Gralloc0, fb0 and DisplayHardware0 are bound, jointly complete the display of client this locality desktop.And, a newly-increased Gralloc module, is called Gralloc1 module within the system, a newly-increased frame buffer zone equipment, is called fb1 equipment, and Gralloc1, fb1 and DisplayHardware1 is bound, jointly completes the display of client medium-long range desktop.
During client terminal start-up, it is initialized DisplayHardware0 object and DisplayHardware1 object, and by the local desktop of DisplayHardware0 object factory and gralloc0 apparatus bound, the remote desktop of DisplayHardware1 object factory and gralloc1 apparatus bound, and open gralloc0 equipment, fb0 equipment, gralloc1 equipment and fb1 equipment.
Refer to Fig. 3, for the embodiment of the present invention provide service side based on Android platform long-range control method realize flow process, it comprises the following steps:
In step S301, service end Android device receives the request message of the remote control service end Android device that customer end A ndroid equipment is initiated;
In embodiments of the present invention, receive the step of request message of the remote control service end Android device that customer end A ndroid equipment is initiated in described service end Android device before, also include:
Service end Android device receives the connection request message that customer end A ndroid equipment sends;Service end Android device verifies described connection request message, if being proved to be successful, then sends connection request to customer end A ndroid equipment and passes through message;
In step s 302, service end Android device is sent to customer end A ndroid equipment after accepting request after continuous for its current interface sectional drawing;
In embodiments of the present invention, after described service end Android device accepts request, after continuous for its current interface sectional drawing, also include: the described current interface of picture format is converted to video stream to customer end A ndroid equipment.
In step S303, service end Android device receives customer end A ndroid equipment to arrange the clicking operation event that form sends;
In step s 304, described event is write corresponding device file to realize the simulation of incoming event by service end Android device.
In embodiments of the present invention, service end Android device intercepts current interface, specifically includes: read framebuffer, namely read in service end Android device /dev/graphics/fbx device file;The data of reading are converted to bitmap file;Again bitmap file is converted to image file, the image file of generation is saved in/data/local/tmp/ under.
Deriving from it is understood, however, that Android is based on linux, the display mechanism of Android is the mechanism the same with Linux: Framebuffer.Framebuffer provides interface by abstract for display screen for frame buffer zone.It can be regarded as a reflection of display memory by user, after mapping that to the process address space, just read-write operation can be made directly, this mechanism is that each point on screen is mapped to one section of linear memory headroom, and program can simply change the value of this section of internal memory to change the color of certain point on screen.Framebuffer belongs to the character device of standard, it is simply that say that it is written and read in the way of character stream.In android system, the device name of Framebuffer is generally/dev/graphics/fbx.
As one embodiment of the present invention, in whole system realizes, it is ongoing for intercepting current interface.In order to reach good display effect, adopt service end Android device active more New Policy.Under android system shell terminal/proc/sys/fs/ catalogue, there is inotify catalogue, as follows:
rootandroid:/proc/sys/fs/inotify#ls-l
-rw-r--r--rootroot02014-10-1413:55max_queued_events
-rw-r--r--rootroot02014-10-1413:55max_user_instances
-rw-r--r--rootroot02014-10-1413:55max_user_watches
In order to the picture file intercepting current interface generation is monitored, use the inotify mechanism of linux kernel herein.Inotify is based on the File System Watcher technology of inode rank, is a kind of powerful, fine-grained, asynchronous mechanism, and it meets various file monitor needs, is not limited only to safety and performance.Inotify both can monitor file, it is also possible to monitors catalogue.Inotify uses system to call circular document system event.Inotify uses filec descriptor as interface, thus common file I/O operation select and poll can be used to monitor the change of file system.Adopting poll to monitor herein and intercept the picture that current interface produces, specific implementation is as follows: obtains and monitors filec descriptor;Monitor file IN_CLOSE_WRITE (can written document by close) state;Poll monitors that whether file is readable;If readable, supervision event is removed from event queue, otherwise jump to the described poll step monitoring that whether file is readable.
As another embodiment of the present invention, service end Android device receives the clicking operation event that customer end A ndroid equipment sends over to arrange form, and described event is write corresponding device file to realize the simulation of incoming event by service end Android device.
In embodiments of the present invention, described agreement form mainly includes KeyEvent and the definition of touchscreen events structure, specific as follows:
KeyEvent structure defines
The file of a qwerty.kl is had under the shell terminal/system/usr/keylayout catalogue of android system, as follows.Having the Android key assignments table of letter and each function key in file, native system realizes the simulation of all buttons in the primary system of Android.
rootandroid:/system/usr/keylayout#ls-l
-rw-rw-r--1034103425772014-06-1711:05qwerty.kl
The definition of KeyEvent structure mainly includes Android key field, judges to press and dechucking values field, event type field and event code field.
Touchscreen events structure defines
Touch screen press with unclamp customer end A ndroid equipment corresponding be pressing and unclamping of screen.If not unclamping by sub-screen, then sending the current coordinate of screen to service end Android device, service end Android device does not receive screen release message, then it is assumed that create drag events on touch screen always.
The definition of touchscreen events structure mainly includes abscissa X field, vertical coordinate Y field, judges to press and dechucking values field, event type field and event code field.
The realization of service end Android device simulation incoming event, specific implementation is as follows:
Input subsystem in android system is the intermediate layer of all I/O device drives, and it provides a unified interface for upper strata.The event detected all is reported input subsystem by device driver, so in the application, it is not necessary to go model and the quantity of pipe keyboard and mouse, then may be used as long as reading event buffer from the device node file that input subsystem provides.Additionally, the association between event handling layer and application layer is realized by equipment buffer area.Equipment buffer area the following is the task that system kernel completes, and therefore, if to simulate incoming event, as long as copying event handling layer to the method for equipment buffer area writing events, directly then may be used by input_event structure write device file node.
The simulation of key-press event is as follows:
After service end Android device receives the clicking operation event request that customer end A ndroid equipment sends, open function is used to open keyboard equipment, the value of code and value is taken out by the key_event bag received, it is filled into inside new input_event, call write (key_fd, &key_event, sizeof (key_event)) function, according in the order of occurrence write key disc apparatus file/dev/input/eventx of event.
The simulation of touchscreen events is specific as follows: open touch panel device;Obtain touch screen parameter;Monitor whether to receive touchscreen events;If it is, by mouse_event structure write device node file/dev/input/mousex;Monitor whether described in otherwise jumping to receive in the step of touchscreen events;Monitor whether to receive and unclamp instruction;If it is, write release event is in device node file/dev/input/mousex;Monitor whether described in otherwise jumping to receive in the step unclamping instruction.
Referring to Fig. 4, the client-side provided for the embodiment of the present invention is based on the structure of the remote control of Android platform.For the ease of illustrating, illustrate only the part relevant to the embodiment of the present invention.The described remote control based on Android platform includes: initiation module 101, sectional drawing receiver module 102, display module 103, command reception module 104, judge module 105, event sending module 106 and execution module 107.The described remote control based on Android platform can be the unit being built in software unit in customer end A ndroid equipment, hardware cell or software and hardware combining.
Initiation module 101, is connected with the foundation of service end Android device for customer end A ndroid equipment, and initiates the request message of remote control service end Android device to described service end Android device;
Sectional drawing receiver module 102, for receiving the sectional drawing of the current interface that service end Android device sends;
Display module 103, for being shown in the display screen of local terminal by described sectional drawing;
Command reception module 104, for receiving the clicking operation instruction of user;
In embodiments of the present invention, obtained by MotionEvent.getRawX () and MotionEvent.getRawY () and click screen present coordinate values, be i.e. abscissa EventX and vertical coordinate Eventy;The wide width and high height of sectional drawing is obtained by Bitmap.getWidth () and Bitmap.getHeight ();Described sectional drawing coordinate figure is obtained, i.e. abscissa PicX and vertical coordinate PicY by View.getTop () and View.getLeft ().
Judge module 105, for judging whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;
In embodiments of the present invention, described judge module 105, specifically for judging to click whether the current abscissa of screen is arranged in described sectional drawing, namely PicX < EventX < PicX+width is judged, and judge to click whether the current vertical coordinate of screen is arranged in described sectional drawing, i.e. PicY < EventY < PicY+height;If it is determined that launch an attack, the current abscissa of screen and vertical coordinate are respectively positioned in described sectional drawing, then it is assumed that current screen coordinate of clicking is positioned at remote desktop;Otherwise it is assumed that currently click screen coordinate to be located locally desktop.
Event sending module 106, for when judge that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;
Performing module 107, for when judge that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.
In embodiments of the present invention, referring to Fig. 5, the described remote control based on Android platform also includes: binding module 201 and request message transmission module 202.
Binding module 201, is used for initializing DisplayHardware object, and the remote desktop of described DisplayHardware object factory, Gralloc module is bound with frame buffer zone module;
Request message transmission module 202, for sending connection request message to service end Android device;
Described initiation module 101, specifically for when connection request passes through, described DisplayHardware object comes into force, and initiates the request message of remote control service end Android device to described service end Android device.
As one embodiment of the present invention, the described remote control based on Android platform also includes: picture processing module.
Described picture processing module, for, after obtaining corresponding sectional drawing, carrying out pretreatment to described sectional drawing.Wherein, described picture processing module specifically includes: computing module, wide high judge module, Zoom module.Computing module, for calculating screen width and the height of customer end A ndroid equipment and service end Android device.Wide high judge module, is used for judging that whether service end Android device screen width is more than customer end A ndroid device screen width, whether service end Android device screen height is more than customer end A ndroid device screen height;Zoom module, if met for one of them condition, (namely service end Android device screen width is greater than customer end A ndroid device screen width;Or service end Android device screen height is greater than customer end A ndroid device screen height), described sectional drawing is carried out equal proportion convergent-divergent so that remote desktop width and height are less than the width of customer end A ndroid device screen and height.
Refer to Fig. 6, service the side structure based on the remote control of Android platform for what the embodiment of the present invention provided.For the ease of illustrating, illustrate only the part relevant to the embodiment of the present invention.The described remote control based on Android platform includes: control request receiver module 301, screen capture module 302, event receiver module 303 and writing module 304.The described remote control based on Android platform can be the unit being built in software unit in service end Android device, hardware cell or software and hardware combining.
Control request receiver module 301, for receiving the request message of the remote control service end Android device that customer end A ndroid equipment is initiated;
Screen capture module 302, after accepting request for service end Android device, is sent to customer end A ndroid equipment after continuous for its current interface sectional drawing;
Event receiver module 303, for receiving customer end A ndroid equipment to arrange the clicking operation event that form sends;
Writing module 304, for writing corresponding device file to realize the simulation of incoming event by described event.
As one embodiment of the present invention, the described remote control based on Android platform also includes: connection request receiver module, authentication module and modular converter.
Connection request receiver module, for receiving the connection request message that customer end A ndroid equipment sends;
Authentication module, is used for verifying described connection request message, if being proved to be successful, then sends connection request to customer end A ndroid equipment and passes through message;
Modular converter, for being converted to video stream to customer end A ndroid equipment by the described current interface of picture format.
As one embodiment of the present invention, the described remote control based on Android platform also includes: acquisition module, monitoring module, readable judge module, removes module and redirects module.
Acquisition module, is used for obtaining supervision filec descriptor;
Monitoring module, is used for monitoring file IN_CLOSE_WRITE state;
Readable judge module, is used for judging that poll monitors that whether file is readable;
Remove module, if for readable, supervision event removed from event queue;
Redirect module, be used for jumping in described readable judge module and perform to judge that poll monitors that whether file is readable.
In sum, customer end A ndroid equipment is set up with service end Android device and is connected, and initiates remote control request message to described service end Android device;Receive the sectional drawing of the current interface that service end Android device sends;Described sectional drawing is shown on the display screen of local terminal;Receive the clicking operation instruction of user;Judge whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;When judging that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;When judging that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.The present invention can realize any two kinds of equipment based on Android platform can carry out long-distance tabletop control mutually relative to each other.
One of ordinary skill in the art will appreciate that all or part of step realizing in above-described embodiment method can be by the hardware that program carrys out instruction relevant and completes, described program can be stored in a computer read/write memory medium, described storage medium, such as ROM/RAM, disk, CD etc..
The foregoing is only presently preferred embodiments of the present invention, not in order to limit the present invention, all any amendment, equivalent replacement and improvement etc. made within the spirit and principles in the present invention, should be included within protection scope of the present invention.
Claims (12)
1. the long-range control method based on Android platform, it is characterised in that said method comprising the steps of:
Customer end A ndroid equipment is set up with service end Android device and is connected, and initiates the request message of remote control service end Android device to described service end Android device;
Customer end A ndroid equipment receives the sectional drawing of the current interface that service end Android device sends;
Described sectional drawing is shown on the display screen of local terminal by customer end A ndroid equipment;
Customer end A ndroid equipment receives the clicking operation instruction of user;
Customer end A ndroid equipment judges whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;
When judging that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;
When judging that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.
2. the long-range control method based on Android platform as claimed in claim 1, it is characterised in that also included before described customer end A ndroid equipment sets up, with service end Android device, the step being connected:
Initialize DisplayHardware object, and the remote desktop of described DisplayHardware object factory, Gralloc module are bound with frame buffer zone module;
Customer end A ndroid equipment sends connection request message to service end Android device;
When connection request passes through, described DisplayHardware object comes into force, and initiates the request message of remote control service end Android device to described service end Android device.
3. the long-range control method based on Android platform as claimed in claim 1, it is characterised in that after described customer end A ndroid equipment receives the step of clicking operation instruction of user, further comprising the steps of:
Obtaining and click screen present coordinate values, described coordinate figure includes abscissa and vertical coordinate;
Obtain the width of described sectional drawing with high;
Obtaining described sectional drawing coordinate figure, described coordinate figure includes abscissa and vertical coordinate.
4. the long-range control method based on Android platform as claimed in claim 3, it is characterised in that the described step judging whether coordinate corresponding to described clicking operation is arranged in described sectional drawing, specifically includes:
Judge to click whether the current abscissa of screen is arranged in described sectional drawing, it is judged that click whether the current vertical coordinate of screen is arranged in described sectional drawing;If it is determined that launch an attack, the current abscissa of screen and vertical coordinate are respectively positioned in described sectional drawing, then it is assumed that current screen coordinate of clicking is arranged in the sectional drawing of remote desktop;Otherwise it is assumed that currently click screen coordinate to be located locally desktop.
5. the long-range control method based on Android platform as claimed in claim 1, it is characterised in that after described customer end A ndroid equipment receives the step of sectional drawing of the current interface that service end Android device sends, also include:
Calculate screen width and the height of customer end A ndroid equipment and service end Android device;
Judging that whether service end Android device screen width is more than customer end A ndroid device screen width, whether service end Android device screen height is more than customer end A ndroid device screen height;
If service end Android device screen width is greater than customer end A ndroid device screen width;And/or be that service end Android device screen height is greater than customer end A ndroid device screen height, described sectional drawing is carried out equal proportion convergent-divergent.
6. the remote control based on Android platform, it is characterised in that described device includes:
Initiation module, is connected with the foundation of service end Android device for customer end A ndroid equipment, and initiates the request message of remote control service end Android device to described service end Android device;
Sectional drawing receiver module, for receiving the sectional drawing of the current interface that service end Android device sends;
Display module, for being shown in the display screen of local terminal by described sectional drawing;
Command reception module, for receiving the clicking operation instruction of user;
Judge module, for judging whether coordinate corresponding to described clicking operation is arranged in described sectional drawing;
Event sending module, for when judge that coordinate corresponding to described clicking operation is arranged in described sectional drawing, then send this clicking operation event to service end Android device arranging form so that service end Android device by device file corresponding for the write of described event to realize the simulation of incoming event;
Performing module, for when judge that coordinate corresponding to described clicking operation be not in described sectional drawing, then customer end A ndroid equipment is locally executing the operation that described clicking operation instruction is corresponding.
7. the remote control based on Android platform as claimed in claim 6, it is characterised in that described device also includes:
Binding module, is used for initializing DisplayHardware object, and the remote desktop of described DisplayHardware object factory, Gralloc module is bound with frame buffer zone module;
Request message transmission module, for sending connection request message to service end Android device;
Described initiation module, specifically for when connection request passes through, described DisplayHardware object comes into force, and initiates the request message of remote control service end Android device to described service end Android device.
8. the remote control based on Android platform as claimed in claim 6, it is characterised in that described device also includes:
Computing module, for calculating screen width and the height of customer end A ndroid equipment and service end Android device;
Wide high judge module, is used for judging that whether service end Android device screen width is more than customer end A ndroid device screen width, and judges that whether service end Android device screen height is more than customer end A ndroid device screen height;
Zoom module, if being greater than customer end A ndroid device screen width for service end Android device screen width;If and/or service end Android device screen height is greater than customer end A ndroid device screen height, described sectional drawing being carried out equal proportion convergent-divergent.
9. the long-range control method based on Android platform, it is characterised in that said method comprising the steps of:
Service end Android device receives the request message of the remote control service end Android device that customer end A ndroid equipment is initiated;
Service end Android device is sent to customer end A ndroid equipment after accepting request after continuous for its current interface sectional drawing;
Service end Android device receives customer end A ndroid equipment to arrange the clicking operation event that form sends;
Described event is write corresponding device file to realize the simulation of incoming event by service end Android device.
10. the long-range control method based on Android platform as claimed in claim 9, it is characterized in that, receive the step of request message of the remote control service end Android device that customer end A ndroid equipment is initiated in described service end Android device before, also include:
Service end Android device receives the connection request message that customer end A ndroid equipment sends;
Service end Android device verifies described connection request message, if being proved to be successful, then sends connection request to customer end A ndroid equipment and passes through message;
After described service end Android device accepts request, after continuous for its current interface sectional drawing, also include:
The described current interface of picture format is converted to video stream to customer end A ndroid equipment.
11. the remote control based on Android platform, it is characterised in that described device includes:
Control request receiver module, for receiving the request message of the remote control service end Android device that customer end A ndroid equipment is initiated;
Screen capture module, after accepting request for service end Android device, is sent to customer end A ndroid equipment after continuous for its current interface sectional drawing;
Event receiver module, for receiving customer end A ndroid equipment to arrange the clicking operation event that form sends;
Writing module, for writing corresponding device file to realize the simulation of incoming event by described event.
12. the remote control based on Android platform as claimed in claim 11, it is characterised in that described device also includes:
Connection request receiver module, for receiving the connection request message that customer end A ndroid equipment sends;
Authentication module, is used for verifying described connection request message, if being proved to be successful, then sends connection request to customer end A ndroid equipment and passes through message;
Modular converter, for being converted to video stream to customer end A ndroid equipment by the described current interface of picture format.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410848406.5A CN105812421A (en) | 2014-12-30 | 2014-12-30 | Remote control method based on Android platform and device thereof |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201410848406.5A CN105812421A (en) | 2014-12-30 | 2014-12-30 | Remote control method based on Android platform and device thereof |
Publications (1)
Publication Number | Publication Date |
---|---|
CN105812421A true CN105812421A (en) | 2016-07-27 |
Family
ID=56421540
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201410848406.5A Pending CN105812421A (en) | 2014-12-30 | 2014-12-30 | Remote control method based on Android platform and device thereof |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105812421A (en) |
Cited By (10)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106815105A (en) * | 2016-12-29 | 2017-06-09 | 广东小天才科技有限公司 | Complete machine touch screen detection method, device and system |
CN107168803A (en) * | 2017-05-19 | 2017-09-15 | 努比亚技术有限公司 | A kind of cpu resource distribution method and terminal |
CN108563382A (en) * | 2018-02-26 | 2018-09-21 | 挖财网络技术有限公司 | Screenshotss method and device based on android system |
CN109683780A (en) * | 2018-12-26 | 2019-04-26 | 上海司南卫星导航技术股份有限公司 | Control method, system and the controlled terminal of mobile terminal |
CN110611735A (en) * | 2019-09-10 | 2019-12-24 | RealMe重庆移动通信有限公司 | Mobile terminal remote control method, device and system and storage medium |
CN110716779A (en) * | 2019-09-17 | 2020-01-21 | 武汉鼎森电子科技有限公司 | Remote monitoring method |
CN110780880A (en) * | 2019-10-30 | 2020-02-11 | 上海信耀电子有限公司 | Method for implementing embedded remote client |
CN111949517A (en) * | 2020-07-23 | 2020-11-17 | 上海硬通网络科技有限公司 | Remote real machine testing method and device and electronic equipment |
CN113608812A (en) * | 2021-08-10 | 2021-11-05 | 湖北亿咖通科技有限公司 | Remote control method, device, system and storage medium |
CN116107846A (en) * | 2023-04-12 | 2023-05-12 | 北京长亭未来科技有限公司 | Linux system event monitoring method and device based on EBPF |
Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102982700A (en) * | 2012-11-20 | 2013-03-20 | 李修齐 | Flat computer mobile digital classroom system operating in double operation systems |
CN103365441A (en) * | 2013-06-24 | 2013-10-23 | 福州博远无线网络科技有限公司 | Method for remotely controlling Android mobile phone desktop through computer terminal |
CN103825932A (en) * | 2013-12-03 | 2014-05-28 | 福州瑞芯微电子有限公司 | Method for remote desktop control between Android devices |
CN104113570A (en) * | 2013-04-17 | 2014-10-22 | 崔伯磊 | Android terminal desktop direct access method and system through browser or software program |
-
2014
- 2014-12-30 CN CN201410848406.5A patent/CN105812421A/en active Pending
Patent Citations (4)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102982700A (en) * | 2012-11-20 | 2013-03-20 | 李修齐 | Flat computer mobile digital classroom system operating in double operation systems |
CN104113570A (en) * | 2013-04-17 | 2014-10-22 | 崔伯磊 | Android terminal desktop direct access method and system through browser or software program |
CN103365441A (en) * | 2013-06-24 | 2013-10-23 | 福州博远无线网络科技有限公司 | Method for remotely controlling Android mobile phone desktop through computer terminal |
CN103825932A (en) * | 2013-12-03 | 2014-05-28 | 福州瑞芯微电子有限公司 | Method for remote desktop control between Android devices |
Cited By (12)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN106815105A (en) * | 2016-12-29 | 2017-06-09 | 广东小天才科技有限公司 | Complete machine touch screen detection method, device and system |
CN106815105B (en) * | 2016-12-29 | 2019-11-05 | 广东小天才科技有限公司 | Complete machine touch screen detection method, device and system |
CN107168803A (en) * | 2017-05-19 | 2017-09-15 | 努比亚技术有限公司 | A kind of cpu resource distribution method and terminal |
CN108563382A (en) * | 2018-02-26 | 2018-09-21 | 挖财网络技术有限公司 | Screenshotss method and device based on android system |
CN109683780A (en) * | 2018-12-26 | 2019-04-26 | 上海司南卫星导航技术股份有限公司 | Control method, system and the controlled terminal of mobile terminal |
CN110611735A (en) * | 2019-09-10 | 2019-12-24 | RealMe重庆移动通信有限公司 | Mobile terminal remote control method, device and system and storage medium |
CN110716779A (en) * | 2019-09-17 | 2020-01-21 | 武汉鼎森电子科技有限公司 | Remote monitoring method |
CN110780880A (en) * | 2019-10-30 | 2020-02-11 | 上海信耀电子有限公司 | Method for implementing embedded remote client |
CN111949517A (en) * | 2020-07-23 | 2020-11-17 | 上海硬通网络科技有限公司 | Remote real machine testing method and device and electronic equipment |
CN113608812A (en) * | 2021-08-10 | 2021-11-05 | 湖北亿咖通科技有限公司 | Remote control method, device, system and storage medium |
CN116107846A (en) * | 2023-04-12 | 2023-05-12 | 北京长亭未来科技有限公司 | Linux system event monitoring method and device based on EBPF |
CN116107846B (en) * | 2023-04-12 | 2023-07-25 | 北京长亭未来科技有限公司 | Linux system event monitoring method and device based on EBPF |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105812421A (en) | Remote control method based on Android platform and device thereof | |
US11494010B2 (en) | Touch support for remoted applications | |
KR101507629B1 (en) | Browser-based proxy server for customization and distribution of existing applications | |
CN101889427B (en) | Distribution method, operation method and system of application system in mobile communication network | |
CN102833338B (en) | The remote desktop display method of sing on web | |
CN109901827A (en) | Using exchange method, device, electronic equipment and readable storage medium storing program for executing | |
TW460788B (en) | Information processing method, collaboration server, collaboration system, and storage medium for storing an information processing program | |
JP2012533102A (en) | Selective distribution of changing image updates to client devices | |
CN103777999A (en) | Android software simulation method and device | |
US20110083067A1 (en) | Web browsing environment provider system for multiple users and control method thereof | |
KR20160092136A (en) | Virtual Desktop Providing Method and Virtual Desktop Providing Server thereof | |
US20130181957A1 (en) | Transmission apparatus and system of using the same | |
KR20210028176A (en) | Virtual desktop system using container and method thereof | |
CN112121411A (en) | Vibration control method, device, electronic equipment and computer readable storage medium | |
CN102404633A (en) | Monitoring module, smart television system and television | |
CN111045781A (en) | Method and device for creating mirror image on cloud platform and storage medium | |
US20070083660A1 (en) | Amorphic Computing | |
CN107102792A (en) | Image processing apparatus, its control method and computer-readable recording medium | |
CN102662467A (en) | Method and device for instruction control in remote assistance process | |
CN102811241A (en) | Remote management method and remote management system | |
CN109117283B (en) | Method for remotely controlling WPS software in network environment | |
CN115242817B (en) | Data access processing method, device, equipment and storage medium | |
CN109960562B (en) | Information display method and device and computer readable storage medium | |
CN113342350A (en) | Software platform capable of recording, playing and running codes in real time based on B/S architecture | |
CN108235822B (en) | Virtual SIM card implementation method and device, storage medium and electronic equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20160727 |
|
RJ01 | Rejection of invention patent application after publication |