Control mode switching method, device, storage medium and electronic device of Android device

By obtaining and utilizing the control mode and event source of the Android device, automatically switching the control interface and setting the control logo, it solves the problem of troublesome device switching operations and improves the user experience and the consistency of the switching process.

CN116266871BActive Publication Date: 2024-09-24GUANGZHOU SHIZHEN INFORMATION TECH CO LTD
View PDF 6 Cites 0 Cited by

Patent Information

Application Number
CN202111550050.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2021-12-17
Publication Date
2024-09-24
Estimated Expiration
2041-12-17

AI Technical Summary

Technical Problem

Existing Android devices are cumbersome to operate when switching control modes, and cannot realize switching control of the device quickly and conveniently, resulting in a reduced user experience.

Method used

By obtaining the current control mode and the source of the control event, automatically switch to the corresponding application control interface, use the touch event and key event interface to distinguish the control mode, and obtain or set the control identifier to obtain focus when switching, ensuring the continuity of the switching process. .

Benefits of technology

It is possible to switch to the corresponding control mode conveniently and quickly without complicated operations when switching the control mode, which improves the user experience and the coherence of the switching process.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN116266871B
    Figure CN116266871B
Patent Text Reader

Abstract

The embodiment of the present application provides a control mode switching method, device, storage medium and electronic device for an Android device, the method comprising: obtaining the first control mode of the current Android device, and displaying the first application control interface corresponding to the first control mode on the Android device; obtaining the source of the control event occurring in the first application control interface; according to the source of the control event, obtaining the second control mode corresponding to the control event; wherein the control events under different control modes have different sources; when the second control mode is different from the first control mode, switching the first application control interface to the second application control interface corresponding to the second control mode. The embodiment of the present application can conveniently and quickly switch to the corresponding control mode without complicated switching operations, and then switch to the application control interface corresponding to the control mode, so as to conveniently and quickly implement switching control of the Android device.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The embodiments of the present application relate to the field of control of Android devices, and in particular to a control mode switching method, device, storage medium and electronic device of an Android device. Background Art

[0002] Some current Android devices, such as Android smart TVs, can support multiple control modes at the same time. In different control modes, the content displayed on the application control interface of the Android device will be different. Taking the touch control mode and the remote control mode as examples, when the user uses the touch control mode in the application, it is necessary to highlight the feedback effect of the control when clicking on the application control interface. When the user uses the remote control mode in the application, it is necessary to display on the application control interface which control position the current focus is on.

[0003] During the research and development process, the inventor found that in some technologies, when switching the control mode on an Android device, the operation is cumbersome and it is impossible to quickly and conveniently implement the switching control of the Android device. Summary of the invention

[0004] In order to overcome the problems existing in the related art, the present application provides a control mode switching method, device, storage and electronic device for an Android device, which can conveniently and quickly realize the switching control of the Android device.

[0005] According to a first aspect of an embodiment of the present application, a control mode switching method for an Android device is provided, comprising the following steps:

[0006] Obtaining a first control mode of the current Android device, and displaying a first application control interface corresponding to the first control mode on the Android device;

[0007] Obtaining a source of a control event occurring in the first application control interface;

[0008] According to the source of the control event, obtaining a second control mode corresponding to the control event; wherein the control events in different control modes correspond to different sources;

[0009] When the first control mode is the touch control mode and the second control mode is the remote control mode, obtaining a control identifier corresponding to the control that most recently responded in the touch control mode; or obtaining a control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode,

[0010] Switching the first application control interface to a second application control interface corresponding to the second control mode, and in the second application control interface, querying a control corresponding to the control identifier according to the control identifier;

[0011] If a control corresponding to the control identifier is found, controlling the control to obtain focus;

[0012] If the control corresponding to the control identifier cannot be found, searching for the window with the highest priority from the window set of the second application control interface;

[0013] Get the default control ID of the window with the highest priority;

[0014] In the second application control interface, according to the default control identifier, controlling the corresponding control to obtain focus;

[0015] Among them, the first application control interface does not have a focus on the corresponding control in the application control interface, but after touching and clicking the control, the function corresponding to the control will be triggered; the corresponding control in the second application control interface has a focus, and after confirming to click the focus, the function corresponding to the control will be triggered.

[0016] According to a second aspect of an embodiment of the present application, a control mode switching device for an Android device is provided, comprising:

[0017] A control interface display module, used to obtain a first control mode of the current Android device, and display a first application control interface corresponding to the first control mode on the Android device;

[0018] A control event source acquisition module, used to acquire the source of the control event occurring in the first application control interface;

[0019] A second control mode acquisition module, used to obtain a second control mode corresponding to the control event according to the source of the control event; wherein the control events under different control modes have different sources;

[0020] A control interface switching module, used for switching the first application control interface to a second application control interface corresponding to the second control mode when the second control mode is different from the first control mode;

[0021] When the first control mode is a touch control mode and the second control mode is a remote control mode, the control interface switching module includes:

[0022] A focus control identifier acquisition module, used to acquire a control identifier corresponding to the control that has responded most recently in the touch control mode, or to acquire a control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode;

[0023] A control identifier query module, used to switch the first application control interface to a second application control interface corresponding to the second control mode, and query the control corresponding to the control identifier in the second application control interface according to the control identifier;

[0024] A first focus acquisition module, configured to control the control to obtain focus if a control corresponding to the control identifier is found;

[0025] a window acquisition module, configured to search for a window with the highest priority from the window set of the second application control interface if the control corresponding to the control identifier cannot be found;

[0026] A default control identifier acquisition module is used to obtain the default control identifier of the window with the highest priority;

[0027] A second focus acquisition module, used to control the corresponding control to obtain the focus according to the default control identifier in the second application control interface;

[0028] Among them, the first application control interface does not have a focus on the corresponding control in the application control interface, but after touching and clicking the control, the function corresponding to the control will be triggered; the corresponding control in the second application control interface has a focus, and after confirming to click the focus, the function corresponding to the control will be triggered.

[0029] According to a third aspect of an embodiment of the present application, there is provided an electronic device, comprising a processor and a memory; the memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the control mode switching method of the Android device as described above.

[0030] According to a fourth aspect of an embodiment of the present application, a computer-readable storage medium is provided, on which a computer program is stored, characterized in that when the computer program is executed by a processor, the control mode switching method of the Android device as described above is implemented.

[0031] The embodiment of the present application obtains the first control mode of the current Android device, and displays the first application control interface corresponding to the first control mode on the Android device; obtains the source of the control event occurring in the first application control interface; and obtains the second control mode corresponding to the control event based on the source of the control event; wherein the control events under different control modes have different sources; when the second control mode is different from the first control mode, the first application control interface is switched to the second application control interface corresponding to the second control mode, so that when the control mode is switched, there is no need to perform complicated switching operations, and the corresponding control mode can be switched quickly and conveniently, and then the application control interface corresponding to the control mode can be switched, thereby realizing the switching control of the Android device quickly and conveniently.

[0032] It should be understood that the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the present application.

[0033] For better understanding and implementation, the present invention is described in detail below with reference to the accompanying drawings. BRIEF DESCRIPTION OF THE DRAWINGS

[0034] In order to more clearly illustrate the embodiments of the present application or the technical solutions in the prior art, the drawings required for use in the embodiments or the description of the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative work.

[0035] Figure 1 A schematic diagram of an application environment of a control mode switching method for an Android device shown in an embodiment of the present application;

[0036] Figure 2 This is a flow chart of a control mode switching method for an Android device shown in one embodiment of the present application;

[0037] Figure 3 This is a display effect diagram of the application control interface in the remote control mode shown in an embodiment of the present application;

[0038] Figure 4 This is a display effect diagram of an application control interface switched to a touch control mode according to an embodiment of the present application;

[0039] Figure 5 This is a display effect diagram of the application control interface when switching back to the remote control mode, shown in one embodiment of the present application;

[0040] Figure 6A display effect diagram of the application control interface in the remote control mode when each window is set with a priority according to an embodiment of the present application;

[0041] Figure 7 This is a display effect diagram of the application control interface switched to the touch control mode when each window is set with a priority according to an embodiment of the present application;

[0042] Figure 8 For Figure 7 The display effect diagram of the application control interface after closing window C in touch control mode;

[0043] Fig. 9 For Figure 8 Then switch back to the display effect diagram of the application control interface in the remote control mode;

[0044] Fig.10 A schematic block diagram of a control mode switching device for an Android device shown in one embodiment of the present application;

[0045] Fig.11 This is a schematic diagram of the structure of an electronic device according to an embodiment of the present application. DETAILED DESCRIPTION

[0046] In order to make the objectives, technical solutions and advantages of the present application more clear, the embodiments of the present application will be further described in detail below with reference to the accompanying drawings.

[0047] It should be clear that the described embodiments are only part of the embodiments of the present application, not all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the embodiments of the present application.

[0048] When the following description relates to the accompanying drawings, unless otherwise indicated, the same numbers in each of the accompanying drawings represent the same or similar elements. In the description of the present application, it should be understood that the terms "first", "second", "third", etc. are only used to distinguish similar objects, and do not have to be used to describe a specific order or sequence, nor can they be understood as indicating or implying relative importance. For those of ordinary skill in the art, the specific meanings of the above terms in the present application can be understood according to the specific circumstances. The singular forms of "a", "said", and "the" used in the present application and the appended claims are also intended to include plural forms, unless the context clearly indicates other meanings. The words "if" / "if" used herein can be interpreted as "at the time of" or "when" or "in response to determination".

[0049] In addition, in the description of this application, unless otherwise specified, "plurality" means two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, and B exists alone. The character " / " generally indicates that the associated objects are in an "or" relationship.

[0050] Some current Android devices, such as Android smart TVs, can support multiple control modes at the same time. In different control modes, the content displayed on the application control interface of the Android device will be different. Taking the touch control mode and the remote control mode as examples, when the user uses the touch control mode in the application, it is necessary to highlight the feedback effect of the control when clicking on the application control interface. When the user uses the remote control mode in the application, it is necessary to display on the application control interface which control position the current focus is on.

[0051] In some related technologies, when switching control modes on an Android device, you need to click a preset button, such as searching for a preset touch control mode button or a preset remote control mode button on the Android device, or clicking a control mode switching button on the remote control, to switch the control mode and then switch to the application control interface under the corresponding control mode. This method is cumbersome to operate, and it is not possible to quickly and conveniently switch control of the Android device, which reduces the user experience.

[0052] In some related technologies, after switching from a touch control mode to a remote control mode on an Android device, the control focus of an application control interface of the Android device is generally a system default focus, resulting in an incoherent switching control process.

[0053] In view of the problems in the related art, the embodiment of the present application provides a control mode switching method for an Android device. In order to better understand the technical solution of the present application, before introducing the control mode switching method for an Android device provided by the embodiment of the present application, the application environment of the control mode switching method for an Android device of the embodiment of the present application is first introduced below.

[0054] Please refer to Figure 1 , which is a schematic diagram of an application environment of the control mode switching method of an Android device according to an embodiment of the present application. The application environment of the control mode switching method of an Android device according to an embodiment of the present application includes an Android device 110 and a remote control device 120.

[0055] The hardware pointed to by the Android device 110 is essentially a computer device with the equivalent capabilities of a personal computer, which has a hardware device with necessary components revealed by the von Neumann principle, such as a central processing unit (including an arithmetic unit and a controller), a memory, an input device, and an output device; wherein the computer program is stored in its memory, and the central processing unit calls the program stored in the external memory into the internal memory to run, executes the instructions in the program, and interacts with the input and output devices to complete specific functions. Optionally, the Android device 110 can be any terminal device such as a mobile phone, a tablet computer, a PDA (Personal Digital Assistant), a smart TV, etc., and this application does not limit this. In the embodiment of the present application, the Android device 110 is a smart TV.

[0056] At least one type of operating system may be installed in the Android device 110, wherein the operating system includes but is not limited to the Android system, the Linux system and the Windows system. The Android device 110 may also be installed with at least one application, wherein the application may be an application that comes with the operating system, or an application downloaded from a third-party device or server. The application will display a corresponding application control interface on the Android device 110, and there are several controls on the application control interface, and the user can implement the corresponding function by triggering the corresponding control.

[0057] The Android device 110 includes a touch screen; a touch screen is an inductive display device that integrates a display screen and a touch control component. In the art, it is sometimes referred to as a touch screen, a touch screen, and a touch panel. When the touch screen is touched, the touch screen can drive various connection devices according to a pre-programmed program to control the system, and then use the built-in software of the system to implement different functional applications such as feedback of corresponding audio and video data, and create vivid audio and video effects by displaying the screen. According to the working principle of the touch screen and the medium for transmitting information, the touch screen can be divided into four categories: resistive, capacitive, infrared, and surface acoustic wave.

[0058] The remote control device 120 can be connected to the Android device 110 via a wired or wireless method, and the remote control device 120 can be used to remotely control the Android device 110. When the remote control device 120 is connected to the Android device 110 via a wireless method, a wireless transmitter is installed in the remote control device 120, and a wireless receiver is installed in the Android device 110. The remote control device 120 sends a wireless control signal via the wireless transmitter, and the Android device 110 receives the wireless control signal via the wireless receiver and executes a corresponding function, thereby realizing the control of the Android device 110 by the remote control device 120.

[0059] Example 1

[0060] The following will be combined with the attached Figures 2 to 9 , the control mode switching method of the Android device provided by the embodiment of the present application is described in detail. The control mode switching method of the Android device provided by the embodiment of the present application comprises the following steps:

[0061] Step S101: Acquire a first control mode of the current Android device, and display a first application control interface corresponding to the first control mode on the Android device.

[0062] The control mode involved in the embodiments of the present application may indicate multiple modes. For example, the control mode may be a touch control mode and a remote control mode, or other modes generated as technology continues to update. Different control modes will have different corresponding application control interfaces.

[0063] Take the remote control mode as an example. In the remote control mode, the control style in the application control interface displayed by the Android device is the remote control style. The remote control style means that the corresponding control in the application control interface will have a focus, and after confirming and clicking the focus, the corresponding function of the control will be triggered. Figure 3 In the application control interface corresponding to the remote control mode, the control C1 has a focus. When the focus is clicked, the control C1 will be triggered to generate a corresponding function. For example, if the control C1 is a video playback control, the video will be played when the focus is clicked.

[0064] Take the touch control mode as an example. In the touch control mode, the control style in the application control interface displayed by the Android device is the touch control style. The touch control style means that the corresponding control in the application control interface does not have focus. After touching and clicking the control, the corresponding function of the control will be triggered. Figure 4 In the application control interface corresponding to the remote control mode, the control C1 does not have the focus. When the control is touched and clicked, the control C1 will be triggered to generate the corresponding function.

[0065] Optionally, the Android device has at least one application installed, and when the application is started, the first control mode of the current Android device is obtained. If the first control mode is the remote control mode, the control style in the displayed first application control interface is the remote control style, that is, the corresponding control in the first application control interface will have focus, and after confirming and clicking the focus, the function corresponding to the control will be triggered. If the first control mode is the touch control style, the control style in the displayed first application control interface is the touch control style, that is, the corresponding control in the application control interface does not have focus, but after touching and clicking the control, the function corresponding to the control will be triggered.

[0066] Step S102: Acquire the source of the control event occurring in the first application control interface.

[0067] In the first application control interface, the user can trigger a control event through a remote control device to control the first application control interface, the user can also trigger a control event through touch to control the first application control interface, or can trigger a control event through other methods to control the first application control interface.

[0068] Step S103: obtaining a second control mode corresponding to the control event according to the source of the control event; wherein different control modes correspond to different sources of control events.

[0069] The inventors discovered during the process of implementing the present invention that different control modes correspond to different sources of control events. Therefore, the control mode can be distinguished by obtaining the source of the control event.

[0070] Step S104: When the second control mode is different from the first control mode, switching the first application control interface to a second application control interface corresponding to the second control mode.

[0071] It is understandable that the second control mode may be the same as or different from the first control mode. Therefore, when the second mode control is the same as the first control mode, the first application control interface remains unchanged. When the second mode control is different from the first control mode, the first application control interface is switched to the second application control interface corresponding to the second control mode, thereby realizing a quick switch of the control mode.

[0072] The embodiment of the present application obtains the first control mode of the current Android device, and displays the first application control interface corresponding to the first control mode on the Android device; obtains the source of the control event occurring in the first application control interface; and obtains the second control mode corresponding to the control event based on the source of the control event; wherein the control events under different control modes have different sources; when the second control mode is different from the first control mode, the first application control interface is switched to the second application control interface corresponding to the second control mode, so that when the control mode is switched, there is no need to perform complicated switching operations, and the corresponding control mode can be switched quickly and conveniently, and then the application control interface corresponding to the control mode can be switched, thereby realizing the switching control of the Android device quickly and conveniently.

[0073] In one embodiment, the step of obtaining the second control mode corresponding to the control event according to the source of the control event in step S103 includes: monitoring the control event occurring in the first application control interface, and when the control event is obtained through the touch event interface, obtaining the second control mode as the touch control mode; when the control event is obtained through the key event interface, obtaining the second control mode as the remote control mode; wherein the application control interface corresponding to the remote control mode displays a control, the control has a focus, and after confirming that the focus is clicked, the control is triggered to display the corresponding function; the application control interface corresponding to the touch control mode has a control, the control does not have a focus, and after the control is touched and clicked, the control is triggered to display the corresponding function.

[0074] In the process of implementing the present invention, the inventor discovered that the event transmission method of the Android system is from top to bottom. After registering to monitor the first application control interface, when a touch event is monitored in the first application control interface, it is transmitted through the touch event interface, and when a remote control event is monitored in the first application control interface, it is transmitted through the key event interface. Therefore, these two methods can be monitored in the first application control interface to distinguish whether the second control mode is the touch control mode or the remote control mode.

[0075] Among them, the touch event interface is used to distribute touch events, which is a main method of touch event transmission in the Android system. Specifically, the key event interface can be expressed as the dispatchKeyEvent method. In addition, the touch event transmission of the Android system also includes: the onInterceptTouchEvent method is used to intercept touch events, and the onTouchEvent method is used to process touch events; the specific event transmission process is as follows: after a touch event occurs in the application control interface, if the touch event corresponds to a root ViewGroup, then after the touch event occurs, it is passed to the ViewGroup, and then dispatchTouchEvent is called. In the dispatchTouchEvent method, onintereptTouchEvent will be called. If onInterceptTouchEvent returns true, it means that the event is intercepted here. At this time, the onTouchEvent method of ViewGroup will be called. Otherwise, a group of visible child elements will be selected according to the location where the event occurs to process the event until all child elements are traversed, and then the child elements call dispatchTouchEvent again. When a View needs to handle an event, if it sets an OnTouchListener, the onTouch method in OnTouchListener will be called back. At this time, if onTouch of onTouchListner returns true, it means that the event has been consumed and the event will not be passed to onTouchEvent. If it returns false, onTouchEvent will continue to be called, so onTouchListener has the highest priority. In addition, onClickListener will be called in onTouchEvent, so OnClickListener has the lowest priority. When onTouchEvent or onToucListsner#onTouch method returns true, dispatchOnTouchEvent will no longer be called.

[0076] The key event interface is used to transmit key events. It is a main method for transmitting key events in the Android system. Specifically, the key event interface can be represented by the dispatchKeyEvent method. In addition, the key event transmission of the Android system also includes the onUserInteraction method for distributing key events, and the onKeyDown method for responding to key events and displaying the corresponding functions of the keys. When a key is pressed, the key event interface is triggered first, followed by the onUserInteraction method, and finally the onKeyDown method, which responds to the key event and displays the corresponding functions of the keys.

[0077] The embodiment of the present application can conveniently and quickly obtain the control mode occurring in the first application control interface by monitoring the touch event interface and the key event interface.

[0078] In one embodiment, the step of obtaining the second control mode corresponding to the control event according to the source of the control event in step S103 includes:

[0079] Step S1031: Acquire a control event occurring in the first application control interface.

[0080] Step S1033: If the control event is not a preset control event, when the control event is obtained through the touch event interface, the second control mode is obtained as the touch control mode; when the control event is obtained through the key event interface, the second control mode is obtained as the remote control mode.

[0081] In the process of implementing the present invention, the inventor further discovered that: when the first control mode is the touch control mode, the return event is also called back from the key event interface, but this does not mean that it is necessary to switch from the touch control mode to the remote control mode. Therefore, it is necessary to determine whether the control event is a return event. If it is a return event, even if the control event is obtained through the touch event interface, the second control mode is still the touch control mode, that is, the first control mode is used as the second control mode. Obviously, the preset control event includes a return event.

[0082] Optionally, the preset control events may also include special control button events such as mute, volume up, and volume down. When the first control mode is the touch control mode, when special buttons such as mute, volume up, and volume down are pressed through the remote control, even if the control event is obtained through the touch event interface, the second control mode is still the touch control mode, that is, the first control mode is used as the second control mode.

[0083] Step S1034: If the control event is a preset control event, use the first control mode as the second control mode.

[0084] In the embodiment of the present application, when the control event is not a preset control event, and when the control event is acquired through the touch event interface, the second control mode is obtained as the touch control mode; when the control event is acquired through the key event interface, the second control mode is obtained as the remote control mode; when the control event is acquired through the preset control event, the first control mode is used as the second control mode, thereby preventing misjudgment and making the control switching process more in line with actual operations.

[0085] In one embodiment, the step of switching the first application control interface to a second application control interface corresponding to the second control mode when the second control mode is different from the first control mode in step S104 includes:

[0086] Step S10411: according to the source of the control event, setting the control state corresponding to the second control mode.

[0087] In an Android device, the control state is managed by a control mode manager. When the control event is acquired through the touch event interface, the current control state is set to the touch control mode in the control mode manager; when the control event is acquired through the key event interface, the current control state is set to the remote control mode in the control mode manager.

[0088] Step S10412: When the control state changes, it is determined that the second control mode is different from the first control mode, and the first application control interface is switched to a second application control interface corresponding to the second control mode.

[0089] When it is monitored that the control state in the control mode manager changes, it can be determined that the second control mode is different from the first control mode.

[0090] The embodiment of the present application conveniently and quickly switches the application control interface according to the control state change.

[0091] In one embodiment, when the first control mode is a touch control mode and the second control mode is a remote control mode, the step of switching the first application control interface to a second application control interface corresponding to the second control mode when the second control mode is different from the first control mode in step S104 includes:

[0092] Step S10421: obtaining a control identifier corresponding to the control that has responded most recently in the touch control mode, or obtaining a control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode.

[0093] Optionally, the control identifier corresponding to the control that most recently responded in the touch control mode can be obtained, and then in the second application control interface, the corresponding control is controlled to obtain focus according to the control identifier corresponding to the control that most recently responded. The control identifier corresponding to the control that obtains focus when switching from the remote control mode to the touch control mode can also be obtained, and then in the second application control interface, the corresponding control is controlled to obtain focus according to the control identifier corresponding to the control with focus. That is, technical personnel in this field can set and select what kind of control identifier to obtain according to actual needs.

[0094] Optionally, when there is no trigger control in the touch control mode, and there is no responding control, and thus there is no control identifier corresponding to the responding control, the control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode is obtained, so that the corresponding control gains focus according to the control identifier. When there is a trigger control in the touch control mode, the control identifier corresponding to the control that has most recently responded in the touch control mode is obtained, so that the corresponding control gains focus according to the control identifier. That is, a person skilled in the art may also preferentially obtain the control identifier corresponding to the control that has most recently responded in the touch control mode, and when there is no control identifier corresponding to the control that has most recently responded, obtain the control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode.

[0095] like Figure 3 As shown, the first control mode at the beginning is the remote control mode, and in the first application control interface corresponding to the first control mode, the control C1 has the focus. Figure 4 As shown, when the control C1 is clicked by touch, the control mode changes to the touch control mode. At this time, the second control mode is the touch control mode. In the corresponding second application control interface, the control C1 has no focus, and the control C1 identifier is saved.

[0096] Step S10422: In the second application control interface, according to the control identifier, control the corresponding control to obtain focus.

[0097] like Figure 5 As shown, in Figure 4 On the basis of this, if a button of the remote control device is pressed, relatively, at this time, it is considered that the first control mode is the touch control mode, and the second control mode is the remote control mode. At this time, the control identifier corresponding to the control that most recently responded in the touch control mode can be obtained, that is, the control C1 identifier, and then the control C1 is controlled to obtain the focus.

[0098] Optionally, when a remote control button control event is received in touch control mode and the mode is to be switched to remote control mode, but the remote control button control event is an up, down, left, right, or confirm button, the remote control button event will be filtered because the current remote control focus position is unknown in touch control mode. At this time, the result of the up, down, left, right, or confirm button is unpredictable. For this reason, in the embodiment of the present application, when the received remote control button control event is an up, down, left, right, or confirm button, the focus position will be restored first, and then the up, down, left, right, or confirm button will be responded to when the remote control button control event is an up, down, left, right, or confirm button.

[0099] The embodiment of the present application obtains the control identifier corresponding to the control that most recently responded in the touch control mode; in the second application control interface, the corresponding control is controlled to obtain focus based on the control identifier, and then the control position of the most recent operation can be restored, thereby avoiding switching control modes, causing the control focus to jump, and requiring the user to find the focus again, making the switching process more reasonable and consistent.

[0100] In one embodiment, the step of controlling the corresponding control to obtain focus in the second application control interface according to the control identifier in step S10422 includes:

[0101] Step S10431: In the second application control interface, according to the control identifier, query the control corresponding to the control identifier.

[0102] Step S10432: If the control corresponding to the control identifier is found, control the control to obtain focus.

[0103] Step S10433: If the control corresponding to the control identifier cannot be found, search for the window with the highest priority from the window set of the second application control interface.

[0104] Step S10434: Obtain the default control identifier of the window with the highest priority.

[0105] Step S10435: In the second application control interface, according to the default control identifier, control the corresponding control to obtain focus.

[0106] During the process of implementing the present invention, the inventor discovered that: in one application scenario, the window where the control corresponding to the control identifier is located is closed. At this time, the corresponding control cannot be found in the second application control interface, and thus cannot obtain focus. Moreover, multiple windows in the second application control interface may overlap. For this reason, the control corresponding to the control identifier cannot be found, and the window with the highest priority is searched from the window set of the second application control interface, so that the control corresponding to the default control identifier of the window with the highest priority obtains the focus, thereby achieving the purpose of quickly and reasonably determining the focus.

[0107] like Figure 6 As shown, the first control mode at the beginning is the remote control mode, and in the first application control interface corresponding to the first control mode, the control C1 has the focus. Figure 7 As shown in FIG. 1 , when the control C1 is clicked by touch, the control mode changes to the touch control mode. At this time, the second control mode is the touch control mode. In the corresponding second application control interface, the control C1 has no focus and the control C1 identifier is saved. Then, the window C where the control C1 is located is closed in the touch mode. At this time, the second application control interface is as shown in FIG. Figure 8 shown.

[0108] In such Figure 8 On the basis of, if a button of the remote control device is pressed, relatively, at this time, it is considered that the first control mode is the touch control mode, and the second control mode is the remote control mode. At this time, Fig. 9 As shown, if the control C1 corresponding to the control identifier cannot be found, then the window with the highest priority is searched from the window set of the second application control interface to obtain window B. From window B, it can be determined that its default control identifier is control B1, and then control control B1 obtains focus.

[0109] In one embodiment, if the control corresponding to the control identifier cannot be found in step S10433, the step of searching for the window with the highest priority from the window set of the second application control interface includes:

[0110] Step S104331: according to the level of the window displayed on the second application control interface and the order in which the windows are opened, set a priority for each window in the window set of the second application control interface.

[0111] Optionally, in the windows displayed in the second application control interface, the priority is set from high to small according to the window hierarchy from the top layer to the bottom layer, that is, from near to far in the direction facing the user. The top layer window is closer to the user and has a higher priority. For windows at the same level, the later the window is opened, the higher the priority is, so as to set the priority of each window in the window set of the second application control interface.

[0112] Step S104332: Obtain the window with the highest priority according to the priorities of the windows.

[0113] The embodiment of the present application sets a priority for each window in the window set of the second application control interface according to the level of the window displayed on the second application control interface and the order in which the windows are opened, so that the window with the highest priority is more in line with the actual display situation of each window in the second application control interface.

[0114] Optionally, in a window set, when a window is displayed, the window is added to the window set, and when the window is hidden or closed, the window is deleted from the window set, so that each window in the window set is a window displayed by the second application control interface.

[0115] Example 2

[0116] The following is an embodiment of the device of the present application, which can be used to execute the content of the method in Embodiment 1 of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the content of the method in Embodiment 1 of the present application.

[0117] See also Fig.10 , a control mode switching device 200 of an Android device disclosed in an embodiment of the present application includes:

[0118] The control interface display module 201 is used to obtain the first control mode of the current Android device, and display the first application control interface corresponding to the first control mode on the Android device;

[0119] A control event source acquisition module 202, used to acquire the source of the control event occurring in the first application control interface;

[0120] The control mode acquisition module 203 is used to obtain a second control mode corresponding to the control event according to the source of the control event; wherein the control events under different control modes correspond to different sources;

[0121] The control interface switching module 204 is used to switch the first application control interface to a second application control interface corresponding to the second control mode when the second control mode is different from the first control mode.

[0122] The embodiment of the present application obtains the first control mode of the current Android device, and displays the first application control interface corresponding to the first control mode on the Android device; obtains the source of the control event occurring in the first application control interface; and obtains the second control mode corresponding to the control event based on the source of the control event; wherein the control events under different control modes correspond to different sources; when the second control mode is different from the first control mode, the first application control interface is switched to the second application control interface corresponding to the second control mode, so that when the control mode is switched, there is no need to perform complicated switching operations, and the corresponding control mode can be switched quickly and conveniently, and then the application control interface corresponding to the control mode can be switched quickly and conveniently to realize the switching control of the Android device, thereby improving the user experience.

[0123] In one embodiment, the control event source acquisition module 202 includes a module for: monitoring control events occurring on the first application control interface, and when the control event is acquired through a touch event interface, acquiring the second control mode as a touch control mode; when the control event is acquired through a key event interface, acquiring the second control mode as a remote control mode; wherein the application control interface corresponding to the remote control mode displays a control, the control has a focus, and after confirming that the focus is clicked, the control is triggered to display a corresponding function; the application control interface corresponding to the touch control mode has a control, the control does not have a focus, and after the control is touched and clicked, the control is triggered to display a corresponding function.

[0124] In another embodiment, the control event source acquisition module 202 includes:

[0125] The control event acquisition module is used to acquire the control events occurring in the first application control interface.

[0126] The first mode acquisition module is used to obtain the second control mode as a touch control mode if the control event is not a preset control event and when the control event is obtained through the touch event interface; and to obtain the second control mode as a remote control mode when the control event is obtained through the key event interface.

[0127] The second mode acquisition module is used to use the first control mode as the second control mode if the control event is a preset control event.

[0128] In one embodiment, the control interface switching module 204 includes:

[0129] A control state acquisition module is used to set the control state corresponding to the second control mode according to the source of the control event.

[0130] The switching module is used to determine that the second control mode is different from the first control mode when the control state changes, and switch the first application control interface to a second application control interface corresponding to the second control mode.

[0131] In one embodiment, when the first control mode is a touch control mode and the second control mode is a remote control mode, the control interface switching module 204 includes:

[0132] The focus control identifier acquisition module is used to obtain the control identifier corresponding to the control that most recently responded in the touch control mode, or to obtain the control identifier corresponding to the control that obtains the focus when switching from the remote control mode to the touch control mode.

[0133] The control focus acquisition module is used to control the corresponding control to obtain the focus according to the control identifier in the second application control interface.

[0134] In one embodiment, the control focus acquisition module includes:

[0135] The control identifier query module is used to query the control corresponding to the control identifier in the second application control interface according to the control identifier.

[0136] The first focus acquisition module is used to control the control to obtain the focus if the control corresponding to the control identifier is found.

[0137] The window acquisition module is used to search for a window with the highest priority from the window set of the second application control interface if the control corresponding to the control identifier cannot be found.

[0138] The default control identifier acquisition module is used to obtain the default control identifier of the window with the highest priority.

[0139] The second focus acquisition module is used to control the corresponding control to obtain the focus according to the default control identifier in the second application control interface.

[0140] In one embodiment, the window acquisition module includes:

[0141] The priority acquisition module is used to set the priority of each window in the window set of the second application control interface according to the level of the window displayed by the second application control interface and the order of opening the windows.

[0142] The highest priority window acquisition module is used to obtain the window with the highest priority according to the priorities corresponding to each window.

[0143] Example 3

[0144] The following is an embodiment of the device of the present application, which can be used to execute the content of the method in Embodiment 1 of the present application. For details not disclosed in the embodiment of the device of the present application, please refer to the content of the method in Embodiment 1 of the present application.

[0145] See also Fig.11 The present application also provides an electronic device 300, which can be specifically a computer, a mobile phone, a tablet computer, an interactive tablet, etc. In an exemplary embodiment of the present application, the electronic device 300 is an Android device, which can be specifically a smart TV. The electronic device 300 may include: at least one processor 310, at least one memory 320, at least one display 330, at least one network interface 340, a user interface 350, and at least one communication bus 360.

[0146] The user interface 350 is mainly used to provide an input interface for the user and obtain data input by the user. Optionally, the user interface 350 may also include a standard wired interface or a wireless interface.

[0147] The network interface 340 may optionally include a standard wired interface or a wireless interface (such as a WI-FI interface).

[0148] The communication bus 360 is used to realize the connection and communication between these components.

[0149] Among them, the processor 310 may include one or more processing cores. The processor 310 uses various interfaces and lines to connect various parts within the entire electronic device 300, and executes various functions and processes data of the electronic device 300 by running or executing instructions, programs, code sets or instruction sets stored in the memory 320, and calling data stored in the memory 320. Optionally, the processor 310 can be implemented in at least one hardware form of digital signal processing (Digital Signal Processing, DSP), field programmable gate array (Field-Programmable Gate Array, FPGA), and programmable logic array (Programmable Logic Array, PLA). The processor 310 can integrate one or a combination of a central processing unit (Central Processing Unit, CPU), a graphics processing unit (Graphics Processing Unit, GPU) and a modem. Among them, the CPU mainly processes the operating system, user interface and application programs; the GPU is responsible for rendering and drawing the content to be displayed by the display layer; and the modem is used to process wireless communications. It can be understood that the above-mentioned modem may not be integrated into the processor 310, but implemented separately by a chip.

[0150] Among them, the memory 320 may include a random access memory (Random Access Memory, RAM) and may also include a read-only memory (Read-Only Memory). Optionally, the memory 320 includes a non-transitory computer-readable storage medium. The memory 320 can be used to store instructions, programs, codes, code sets or instruction sets. The memory 320 may include a program storage area and a data storage area, wherein the program storage area may store instructions for implementing an operating system, instructions for at least one function (such as a touch function, a sound playback function, an image playback function, etc.), instructions for implementing the above-mentioned various method embodiments, etc.; the data storage area may store data involved in the above-mentioned various method embodiments, etc. The memory 320 may also be optionally at least one storage device located away from the aforementioned processor 310. As Fig.11 As shown, the memory 320 as a computer storage medium may include an operating system, a network communication module, and a user.

[0151] The processor 310 can be used to call the application of the control mode switching method of the Android device stored in the memory 320, and specifically execute the method steps of the above-mentioned embodiment 1. The specific execution process can refer to the specific description shown in embodiment 1, which will not be repeated here.

[0152] Example 4

[0153] The present application also provides a computer-readable storage medium on which a computer program is stored, and the instructions are suitable for being loaded by a processor and executing the method steps of the above-mentioned embodiment 1. The specific execution process can refer to the specific description shown in the embodiment, and will not be repeated here. The device where the storage medium is located can be a personal computer, a laptop computer, a smart phone, a tablet computer and other electronic devices.

[0154] For the device embodiment, since it basically corresponds to the method embodiment, the relevant parts can refer to the partial description of the method embodiment. The device embodiment described above is only schematic, wherein the components described as separate parts may or may not be physically separated, and the parts displayed as units may or may not be physical units, that is, they may be located in one place, or they may be distributed on multiple network units. Some or all of the modules can be selected according to actual needs to achieve the purpose of the present application scheme. Ordinary technicians in this field can understand and implement it without paying creative work.

[0155] Those skilled in the art will appreciate that the embodiments of the present application may be provided as methods, systems, or computer program products. Therefore, the present application may adopt the form of a complete hardware embodiment, a complete software embodiment, or an embodiment in combination with software and hardware. Moreover, the present application may adopt the form of a computer program product implemented in one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) that include computer-usable program code.

[0156] The present application is described with reference to the flowcharts and / or block diagrams of the methods, devices (systems), and computer program products according to the embodiments of the present application. It should be understood that each process and / or box in the flowchart and / or block diagram, as well as the combination of the processes and / or boxes in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to generate a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1These computer program instructions can also be stored in a computer-readable memory that can guide a computer or other programmable data processing device to work in a specific way, so that the instructions stored in the computer-readable memory produce a product including an instruction device, which implements the function selected in the process. Figure 1 A process or multiple processes and / or boxes Figure 1 function selected in a box or multiple boxes.

[0157] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 steps for the function selected in a box or multiple boxes.

[0158] In a typical configuration, a computing device includes one or more processors (CPU), input / output interfaces, network interfaces, and memory.

[0159] The memory may include non-permanent memory in a computer-readable medium, random access memory (RAM) and / or non-volatile memory in the form of read-only memory (ROM) or flash RAM. The memory is an example of a computer-readable medium.

[0160] Computer readable media include permanent and non-permanent, removable and non-removable media that can be implemented by any method or technology to store information. Information can be computer readable instructions, data structures, program modules or other data. Examples of computer storage media include, but are not limited to, phase change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disk read-only memory (CD-ROM), digital versatile disk (DVD) or other optical storage, magnetic cassettes, magnetic tape magnetic disk storage or other magnetic storage devices or any other non-transmission media that can be used to store information that can be accessed by a computing device. As defined herein, computer readable media does not include temporary computer readable media (transitory media), such as modulated data signals and carrier waves.

[0161] It should also be noted that the terms "include", "comprises" or any other variations thereof are intended to cover non-exclusive inclusion, so that a process, method, commodity or device including a series of elements includes not only those elements, but also other elements not explicitly listed, or also includes elements inherent to such process, method, commodity or device. In the absence of more restrictions, the elements defined by the sentence "comprises a ..." do not exclude the existence of other identical elements in the process, method, commodity or device including the elements.

[0162] The above are only embodiments of the present application and are not intended to limit the present application. For those skilled in the art, the present application may have various changes and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present application should be included within the scope of the claims of the present application.

Claims

1. A control mode switching method for an Android device, characterized in that: The steps include: Obtaining a first control mode of the current Android device, and displaying a first application control interface corresponding to the first control mode on the Android device; Obtaining a source of a control event occurring in the first application control interface; According to the source of the control event, obtaining a second control mode corresponding to the control event; wherein the control events in different control modes correspond to different sources; When the first control mode is the touch control mode and the second control mode is the remote control mode, obtaining a control identifier corresponding to the control that most recently responded in the touch control mode; or obtaining a control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode, Switching the first application control interface to a second application control interface corresponding to the second control mode, and in the second application control interface, querying a control corresponding to the control identifier according to the control identifier; If a control corresponding to the control identifier is found, controlling the control to obtain focus; If the control corresponding to the control identifier cannot be found, searching for the window with the highest priority from the window set of the second application control interface; Get the default control ID of the window with the highest priority; In the second application control interface, according to the default control identifier, controlling the corresponding control to obtain focus; Among them, the first application control interface does not have a focus on the corresponding control in the application control interface, but after touching and clicking the control, the function corresponding to the control will be triggered; the corresponding control in the second application control interface has a focus, and after confirming to click the focus, the function corresponding to the control will be triggered.

2. The control mode switching method of an Android device according to claim 1, characterized in that: The step of obtaining the second control mode corresponding to the control event according to the source of the control event includes: Monitor control events occurring on the first application control interface, and when the control event is acquired through the touch event interface, obtain the second control mode as the touch control mode; when the control event is acquired through the key event interface, obtain the second control mode as the remote control mode; wherein, the application control interface corresponding to the remote control mode displays a control, the control has a focus, and after confirming and clicking the focus, the control is triggered to display a corresponding function; the application control interface corresponding to the touch control mode has a control, the control does not have a focus, and after touching and clicking the control, the control is triggered to display a corresponding function.

3. The control mode switching method of an Android device according to claim 1, characterized in that: The step of obtaining the second control mode corresponding to the control event according to the source of the control event includes: Acquire a control event occurring in the first application control interface; If the control event is not a preset control event, when the control event is acquired through the touch event interface, the second control mode is obtained as the touch control mode; when the control event is acquired through the key event interface, the second control mode is obtained as the remote control mode; If the control event is a preset control event, the first control mode is used as the second control mode.

4. The control mode switching method of an Android device according to claim 1, characterized in that: If the control corresponding to the control identifier cannot be found, the step of searching for a window with the highest priority from the window set of the second application control interface includes: According to the level of the window displayed on the second application control interface and the order in which the windows are opened, setting a priority for each window in the window set of the second application control interface; According to the priorities of each window, the window with the highest priority is obtained.

5. A control mode switching device for an Android device, characterized in that: include: A control interface display module, used to obtain a first control mode of the current Android device, and display a first application control interface corresponding to the first control mode on the Android device; A control event source acquisition module, used to acquire the source of the control event occurring in the first application control interface; A second control mode acquisition module, used to obtain a second control mode corresponding to the control event according to the source of the control event; wherein the control events under different control modes have different sources; A control interface switching module, used for switching the first application control interface to a second application control interface corresponding to the second control mode when the second control mode is different from the first control mode; When the first control mode is a touch control mode and the second control mode is a remote control mode, the control interface switching module includes: A focus control identifier acquisition module, used to acquire a control identifier corresponding to the control that has responded most recently in the touch control mode, or to acquire a control identifier corresponding to the control that has gained focus when switching from the remote control mode to the touch control mode; A control identifier query module, used to switch the first application control interface to a second application control interface corresponding to the second control mode, and query the control corresponding to the control identifier in the second application control interface according to the control identifier; A first focus acquisition module, configured to control the control to obtain focus if a control corresponding to the control identifier is found; a window acquisition module, configured to search for a window with the highest priority from the window set of the second application control interface if no control corresponding to the control identifier is found; A default control identifier acquisition module is used to obtain the default control identifier of the window with the highest priority; A second focus acquisition module, used to control the corresponding control to obtain focus according to the default control identifier in the second application control interface; Among them, the first application control interface does not have a focus on the corresponding control in the application control interface, but after touching and clicking the control, the function corresponding to the control will be triggered; the corresponding control in the second application control interface has a focus, and after confirming to click the focus, the function corresponding to the control will be triggered.

6. An electronic device comprising a processor and a memory; characterized in that: The memory stores a computer program, and the computer program is suitable for being loaded by the processor and executing the control mode switching method of the Android device as described in any one of claims 1 to 4.

7. A computer-readable storage medium having a computer program stored thereon, characterized in that: When the computer program is executed by a processor, the control mode switching method of the Android device as described in any one of claims 1 to 4 is implemented.

Citation Information

Patent Citations

  • Remote control method, remote controller, remote control response method and set top box

    CN102595224A

  • Method for controlling remote control equipment, electronic equipment and remote control equipment

    CN103139507A

  • Remote control method and terminal

    CN108476339A

  • Control mode switching method of smart television, equipment and computer readable medium

    CN108600796A

  • Display control method and electronic equipment

    CN113497851A