WO2019062912A1 - Display mode switching method and apparatus, terminal and storage medium - Google Patents

Display mode switching method and apparatus, terminal and storage medium Download PDF

Info

Publication number
WO2019062912A1
WO2019062912A1 PCT/CN2018/108634 CN2018108634W WO2019062912A1 WO 2019062912 A1 WO2019062912 A1 WO 2019062912A1 CN 2018108634 W CN2018108634 W CN 2018108634W WO 2019062912 A1 WO2019062912 A1 WO 2019062912A1
Authority
WO
WIPO (PCT)
Prior art keywords
display mode
terminal
application
screen
dual
Prior art date
Application number
PCT/CN2018/108634
Other languages
French (fr)
Chinese (zh)
Inventor
李聪
Original Assignee
中兴通讯股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 中兴通讯股份有限公司 filed Critical 中兴通讯股份有限公司
Publication of WO2019062912A1 publication Critical patent/WO2019062912A1/en

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0484Interaction techniques based on graphical user interfaces [GUI] for the control of specific functions or operations, e.g. selecting or manipulating an object, an image or a displayed text element, setting a parameter value or selecting a range
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • G06F3/048Interaction techniques based on graphical user interfaces [GUI]
    • G06F3/0481Interaction techniques based on graphical user interfaces [GUI] based on specific properties of the displayed interaction object or a metaphor-based environment, e.g. interaction with desktop elements like windows or icons, or assisted by a cursor's changing behaviour or appearance
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/14Digital output to display device ; Cooperation and interconnection of the display device with other functional units
    • G06F3/1423Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display
    • G06F3/1446Digital output to display device ; Cooperation and interconnection of the display device with other functional units controlling a plurality of local displays, e.g. CRT and flat panel display display composed of modules, e.g. video walls
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2203/00Indexing scheme relating to G06F3/00 - G06F3/048
    • G06F2203/048Indexing scheme relating to G06F3/048
    • G06F2203/04803Split screen, i.e. subdividing the display area or the window area into separate subareas

Definitions

  • the present disclosure relates to, but is not limited to, the field of communications, and in particular, to a display mode switching method and apparatus, a terminal, and a storage medium.
  • the switching between the display modes of the terminal is triggered by the user manually, or by sensing the state change of the screen by (Hall sensor), taking into account the subjective needs of the user, or considering the state change of the terminal screen, but
  • the attributes of the application cannot be automatically adapted, so that different applications cannot be automatically presented to the user through different display modes on the terminal, and display errors may occur when the user forcibly switches the display mode.
  • An embodiment of the present disclosure provides a display mode switching method, including: acquiring information of an application to be run by a terminal in a foreground, and acquiring a display mode currently running by the terminal as a first display mode; determining a display mode supported by the application And as the second display mode; and when the second display mode does not include the first display mode, automatically switching the display mode of the terminal to the second display mode.
  • An embodiment of the present disclosure provides a display mode switching apparatus, including: an obtaining module configured to acquire information of an application to be run by a terminal in a foreground, and acquire a display mode currently running by the terminal as a first display mode; and a determining module, Configuring to determine a display mode supported by the application as a second display mode; and a switching module configured to automatically switch the display mode of the terminal to the second display mode when the first display mode is not included The second display mode is described.
  • An embodiment of the present disclosure provides a terminal, including a processor and a memory storing instructions executable by the processor, when executed by the processor, performing an operation of: acquiring an application that the terminal is to run in the foreground And obtaining a display mode in which the terminal is currently running as a first display mode; determining a display mode supported by the application as a second display mode; and when the second display mode does not include the first display mode Automatically switching the display mode of the terminal to the second display mode.
  • Embodiments of the present disclosure also provide a computer readable storage medium including a stored program, the program being executed to perform operations of: acquiring information of an application to be run by a terminal in a foreground, and acquiring a display currently running by the terminal a mode as a first display mode; determining a display mode supported by the application as a second display mode; and automatically switching a display mode of the terminal to the second display mode when the first display mode is not included The second display mode is described.
  • FIG. 1 is a block diagram showing the structure of a mobile terminal that performs a display mode switching method of an embodiment of the present disclosure
  • FIG. 2 is a flowchart of a display mode switching method according to an embodiment of the present disclosure
  • FIG. 3 is a flow diagram of obtaining information of an application to be run in the foreground, in accordance with an implementation of the present disclosure
  • FIG. 4 is a schematic structural diagram of a dual screen terminal according to an embodiment of the present disclosure.
  • FIG. 5 is a structural block diagram of a display mode switching device according to an embodiment of the present disclosure.
  • FIG. 6 is a structural block diagram of a terminal according to an embodiment of the present disclosure.
  • FIG. 7 is a flowchart of a display mode switching method according to an embodiment of the present disclosure.
  • FIG. 8 is a flowchart of a display mode switching method according to an embodiment of the present disclosure.
  • FIG. 1 shows a structural block diagram of a mobile terminal that implements a display mode switching method of an embodiment of the present disclosure.
  • a mobile terminal 10 implementing a display mode switching method of an embodiment of the present disclosure may include one or more (only one shown in the figure) processor 102, a memory 104 configured to store data, and a configuration.
  • a transmission device 106 that implements a communication function.
  • Processor 102 may include, but is not limited to, a processing device such as a microprocessor, a micro control unit (MCU), a programmable logic device (eg, an FPGA), and the like.
  • a processing device such as a microprocessor, a micro control unit (MCU), a programmable logic device (eg, an FPGA), and the like.
  • MCU micro control unit
  • FPGA programmable logic device
  • FIG. 1 is merely illustrative and does not limit the structure of the mobile terminal 10.
  • the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or may have a different configuration than that shown in FIG.
  • the memory 104 can be configured to store program instructions/modules of application software, such as program instructions/modules that can store display mode switching methods of embodiments of the present disclosure, by which the processor 102 runs program instructions/modules stored in the memory 104, Thereby various application functions and data processing are performed, such as a display mode switching method that implements an embodiment of the present disclosure.
  • the memory 104 may include a nonvolatile memory such as a high speed random access memory or a nonvolatile solid state memory such as a magnetic storage device, a flash memory.
  • memory 104 can further include memory remotely located relative to processor 102, which can be connected to the network (including but not limited to the Internet, an intranet, a local area network, a mobile communication network, or a combination thereof) Mobile terminal 10.
  • the transmitting device 106 can be configured to receive or transmit data via a network (including a wireless network provided by a communication provider of the mobile terminal 10).
  • the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet.
  • the transmission device 106 can be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
  • NIC Network Interface Controller
  • RF Radio Frequency
  • the display mode switching method of the embodiment of the present disclosure may include the following steps: S202: acquiring information of an application that the terminal wants to run in the foreground, and acquiring a display mode currently running by the terminal as the first display mode; S204, determining The display mode supported by the application running in the foreground is the second display mode; and S206, when the second display mode does not include the first display mode, the display mode of the terminal is automatically switched to the second display mode.
  • the display mode of the terminal is automatically switched to the second display mode.
  • the technical problem that the terminal can not automatically switch the display mode in the related art is solved, the user experience is improved, the display quality related to the application is enhanced, and the application display is differentiated.
  • the display mode switching method of the embodiment of the present disclosure may be implemented by a single screen terminal, a dual screen terminal, a multi-screen terminal, or the like, but is not limited thereto.
  • FIG. 4 is a schematic structural diagram of a dual screen terminal of an embodiment of the present disclosure. As shown in FIG. 4, the dual screen terminal has two screens S1 and S2, and the two screens are connected by a rotating shaft or other connecting members.
  • the second display mode may be one or more display modes, and may exist in a list or a collection when the second display mode is a plurality of display modes. Switching the terminal to any of the second display modes supported by the application to be run in the foreground, or selecting the display mode in the second display mode supported by the application to be run in the foreground by the priority order.
  • obtaining the information of the application that the terminal wants to run in the foreground may include: acquiring information of the application that the terminal wants to run in the foreground when the running state of the terminal changes. Changes in the operating state of the terminal may result in changes to the application running in the foreground, and the display modes supported by different applications may be different.
  • the change of the running state of the terminal may be, but is not limited to, starting the application, closing the application, switching the application running in the foreground to the background running, switching the application running in the background to the foreground running, returning to the home page, starting the application failure, and the like.
  • acquiring information of an application to be run by the terminal in the foreground may include: S11: acquiring a top-of-stack task in a task stack of the terminal; and S12, acquiring an activity stack of the top-top task. The topmost activity; and S13, the information of the corresponding application is obtained from the topmost activity of the activity stack.
  • the second display mode supported by the application running in the foreground can be determined by a variety of factors, such as operator recommendations, application attributes, user preferences, and the like. For example, for an operator-promoted application, displaying in an operator-recommended display mode may be able to take full advantage of dual or multi-screen space. As another example, some applications may not support a certain display mode, which may be determined by the developer of the application.
  • the attribute resizeableActivity in the AndroidManifest.xml of the application in the Android system may be set to false, so that the application does not support the split screen display mode, if the currently running display mode is the split screen display mode, If you want to run the application in the foreground, you need to switch the display mode to single-screen display mode, otherwise it may cause display errors.
  • the app if the app is running abnormally in some display mode, the app can be added to a specific blacklist or whitelist.
  • the blacklist may include a display mode that is not supported by the application, and the whitelist may include a display mode supported by the application.
  • an application such as an application provided by an operator
  • the application is added to a white list that supports only the single A display mode, so that even if the current display mode is the dual display mode, the foreground should be run.
  • the display mode switches to single A display mode.
  • Blacklists or whitelists can also be created or modified based on user preferences.
  • determining the second display mode supported by the application to be run in the foreground may include determining a second display mode supported by the application according to the blacklist and/or the whitelist. It is of course also possible to determine the second display mode supported by the application by temporarily collecting the information of the application, such as in the case where the application is a newly downloaded application.
  • the display mode switching method of the embodiment of the present disclosure may further include setting the first display mode to the display mode to be restored when the second display mode does not include the first display mode.
  • the display mode switching method of the embodiment of the present disclosure may further include: after setting the first display mode to the display mode to be restored, when the operating state of the terminal changes, the display mode of the terminal is changed from The second display mode is switched to the first display mode.
  • the first display mode can be resumed, that is, the default first display mode can be preferentially used.
  • the first display mode may include at least one of the following display modes: a split screen display mode of a single screen terminal, a single screen display mode of a dual screen terminal, a dual screen mirror display mode of a dual screen terminal, and a dual screen
  • the second display mode may include at least one of the following display modes: a split screen display mode of the single screen terminal, a single screen display mode of the dual screen terminal, a dual screen mirror display mode of the dual screen terminal, and a dual screen stitching of the dual screen terminal. Display mode, dual screen split screen display mode for dual screen terminals.
  • the single-screen display mode of the dual-screen terminal can be simply referred to as a single-A display mode, which refers to an application that operates on only one screen of the dual-screen terminal, which is consistent with the full-screen display of the single-screen terminal.
  • the dual-screen mirroring mode of the dual-screen terminal can be simply referred to as the A
  • the dual-screen splicing display mode of the dual-screen terminal may be referred to as a large A display mode, which refers to an application in which two screens are spliced together as one screen display for a dual-screen terminal, and each of the two screens respectively displays the application.
  • the dual-screen split-screen display mode of the dual-screen terminal can be simply referred to as the A
  • the terminal is not limited to including two screens, and may also include three or more screens.
  • the dual screen described in the present disclosure only represents any two screens of the terminal, the terminal Other screens can be displayed in a similar manner.
  • the display mode switching method of the embodiment of the present disclosure may be implemented by means of software plus a necessary general hardware platform, and may of course be implemented only by hardware.
  • the display mode switching method of an embodiment of the present disclosure may be provided in the form of a software product including executable instructions that may be stored in a storage medium (such as a ROM, a RAM, a disk, an optical disk), the terminal The software product is run (eg, a cell phone, a computer, a server, or a network device, etc.) to perform a display mode switching method of an embodiment of the present disclosure.
  • Embodiments of the present disclosure also provide a display mode switching device and a terminal for implementing a display mode switching method of an embodiment of the present disclosure.
  • the term "module" as used in this disclosure may be software, hardware or a combination thereof that implements a predetermined function.
  • the display mode switching device described in the embodiments of the present disclosure may be implemented by hardware, software, or a combination thereof.
  • FIG. 5 is a structural block diagram of a display mode switching device according to an embodiment of the present disclosure.
  • the display mode switching apparatus of the embodiment of the present disclosure may include: an obtaining module 40 configured to acquire information of an application to be run by the terminal in the foreground, and acquire a display mode currently running by the terminal as the first display mode; a module 42 configured to determine a display mode supported by an application to be run in the foreground as a second display mode; and a switching module 44 configured to switch the display mode of the terminal to the second when the second display mode does not include the first display mode Display mode.
  • the display mode switching device may further include: a setting module 45 configured to set the first display mode to the display mode to be restored when the second display mode does not include the first display mode.
  • FIG. 6 is a structural block diagram of a terminal according to an embodiment of the present disclosure.
  • the terminal may include a processor 50 and a memory 52 storing instructions executable by the processor 50.
  • the instructions When the instructions are executed by the processor 50, the following operations are performed: acquiring an application of the terminal to be run in the foreground Information, and obtaining a display mode in which the terminal is currently running as the first display mode; determining a display mode supported by the application to be run in the foreground as the second display mode; and displaying the terminal when the second display mode does not include the first display mode The mode is switched to the second display mode.
  • the first display mode may include at least one of the following display modes: a split screen display mode of a single screen terminal, a single screen display mode of a dual screen terminal, a dual screen mirror display mode of a dual screen terminal, and a dual screen
  • the second display mode may include at least one of the following display modes: a split screen display mode of the single screen terminal, a single screen display mode of the dual screen terminal, a dual screen mirror display mode of the dual screen terminal, and a dual screen stitching of the dual screen terminal. Display mode, dual screen split screen display mode for dual screen terminals.
  • the single-screen display mode of the dual-screen terminal can be simply referred to as a single-A display mode, which refers to an application that operates on only one screen of the dual-screen terminal, which is consistent with the full-screen display of the single-screen terminal.
  • the dual-screen mirroring mode of the dual-screen terminal can be simply referred to as the AA display mode, which means that for the dual-screen terminal, the running application is simultaneously displayed on two screens, that is, the same content is displayed on the two screens.
  • the dual-screen splicing display mode of the dual-screen terminal may be referred to as a large A display mode, which refers to an application in which two screens are spliced together as one screen display for a dual-screen terminal, and each of the two screens respectively displays the application. part.
  • the dual-screen split-screen display mode of the dual-screen terminal can be simply referred to as the AB display mode, which means that for the dual-screen terminal, the two screens respectively display different applications.
  • the terminal is not limited to including two screens, and may also include three or more screens.
  • the dual screen described in the present disclosure only represents any two screens of the terminal, the terminal Other screens can be displayed in a similar manner.
  • each module in the display mode switching device of the embodiment of the present disclosure may be implemented by software, hardware, or a combination thereof.
  • each module may be implemented by executing the corresponding software program by the same processor, or may be implemented by executing a corresponding software program by multiple processors in any combination.
  • the dual-screen terminal supports single-screen display mode (single A display mode), dual-screen mirrored display mode (A
  • single A display mode dual-screen mirrored display mode
  • a display mode dual-screen mirrored display mode
  • B display mode large A Display mode
  • B display mode dual-screen split-screen display mode
  • current applications especially third-party applications, may not support certain display modes due to the limitations of the application itself. For example, some applications do not take into account the display in the dual-screen splicing display mode, resulting in display errors (eg, interface confusion, etc.) when displayed in the dual-screen splicing display mode.
  • the property resizeableActivity in the AndroidManifest.xml of the application file is set to false, so that the application does not support the split screen display mode. If the application is forcibly opened in the split screen display mode, the application may appear. Running abnormally. For example, for some applications of the operator, it may be mandatory to run in a specific display mode. These realities require an automatic application-based display mode switching method to achieve automatic switching of the display mode for the application to ensure that the application can function properly in the appropriate display mode. For a non-dual-screen terminal, there are the same requirements in the case of multiple display modes such as a split-screen display mode.
  • the terminal of the embodiment of the present disclosure is not limited to a dual-screen terminal (such as a mobile phone), but also includes a single-screen terminal or a multi-screen terminal having multiple display modes.
  • the display mode switching method, the display mode switching device, and the terminal implement automatic switching based on the display mode of the application.
  • the attribute information of the running application, and the corresponding blacklist and/or whitelist determine whether the application to be run in the foreground supports the current display mode, and the display mode supported by the application running in the foreground.
  • the current display mode may be recorded as the display mode to be restored, and then the current display mode is automatically switched to the display mode supported by the application to be run in the foreground.
  • the new application to be run in the foreground can be checked again. If the new application running in the foreground supports the display mode to be restored, Restore the current display mode to the display mode to be restored.
  • the system of the terminal can automatically adapt the display mode supported by the application to the application, ensuring that the application can be displayed normally, and also meets certain application requirements.
  • the display mode is specified by a specific display mode, and the entire process does not require human intervention.
  • the user can automatically restore the default display mode set by the user (the display mode to be restored). The user experience is greatly improved, the display quality of the application is enhanced, and differentiated display for the application is made possible.
  • the application has specific requirements for the dual display mode in order to achieve a better display effect. For example, for some video applications promoted by operators, it is required to display in the large A display mode to make full use of Double screen space.
  • the application does not support some display modes, for example, the property resizeableActivity in the AndroidManifest.xml file of some applications in Android (Android) system is set to false, then these applications do not support the split screen display mode, in the split screen display mode.
  • the display mode can be automatically switched to the single-screen display mode.
  • the application runs in some display modes or displays an abnormality, the application can be added to a specific blacklist or whitelist.
  • some applications (such as the operator's own application) only support single A display. Running in mode, these applications can be added to a whitelist that only supports single-A display mode, so that when these applications are run in the foreground in dual-display mode, the display mode switches to single-A display mode.
  • FIG. 7 is a flowchart of a display mode switching method according to an embodiment of the present disclosure. As shown in FIG. 7, the display mode switching method of the embodiment of the present disclosure may include the following steps S701 to S705.
  • Step S701 When the running state of the terminal changes, the information of the application to be run in the foreground is obtained.
  • the change of the operating state of the terminal may include, but is not limited to, starting a new application, closing a running application, switching an application running in the foreground to a background running, switching an application running in the background to a foreground running, and the like.
  • the information of the application to be run in the foreground may include, but is not limited to, restriction information of the application for the display mode (for example, a display mode supported by the application under the setting attribute of the application), a package name of the application, and the like.
  • the obtaining application information to be run in the foreground may include, but is not limited to, acquiring a top-of-stack task in the task stack; acquiring a top-most activity of the active stack of the top-level task (ie, a top activity); and from the activity stack The topmost activity gets information about the corresponding app.
  • the display modes include a single screen terminal, a dual screen terminal, and a plurality of display modes of the multi-screen terminal.
  • the dual screen terminal may have a single A display mode, an A
  • the single A display mode refers to an application running only on one screen of the dual screen terminal (for example, a mobile phone), which is consistent with the full screen display of the single screen terminal.
  • a display mode means that for a dual screen terminal, the running application is simultaneously displayed on two screens, that is, the same content is displayed on the two screens.
  • the large A display mode refers to an application in which two screens are spliced together as one screen display operation for a dual screen terminal, and each of the two screens respectively displays a portion of the application.
  • B display mode means that for a dual screen terminal, two screens respectively display different applications.
  • Step S702 According to the package name of the application to be run in the foreground, access the corresponding blacklist or whitelist to obtain the display mode supported by the application under the blacklist or whitelist restriction.
  • the blacklist provides a display mode that is not supported by the application, and the whitelist provides a display mode supported by the application.
  • the blacklist and the whitelist may be preset in advance, or may be set by the user.
  • the blacklist and the whitelist may be automatically created or modified according to the behavior of the user using the application.
  • preset applications and a large number of commonly used applications can be tested in various display modes to preset blacklists and whitelists.
  • the user can set a blacklist and a whitelist by himself.
  • the user can add an application that does not support a certain display mode to the corresponding blacklist, or remove the discovered whitelist that does not support a certain display mode, etc. Wait.
  • the blacklist and whitelist can be automatically created or modified according to the state of the application in various display modes (such as whether an exception occurs) when the user uses the application.
  • Step S703 Obtain the currently running display mode, and check whether the application to be run in the foreground supports the currently running display mode.
  • the checking may include comparing the display mode supported by the application under the setting properties of the application with the display mode supported by the application under the blacklist and/or whitelist restrictions to obtain a list of display modes ultimately supported by the application.
  • the checking may also include comparing the list of display modes ultimately supported by the application to the currently running display mode. If the currently running display mode is included in the list of display modes that the application ultimately supports, the application supports the currently running display mode. If the currently running display mode is not included in the list of display modes that the application ultimately supports, the application does not support the currently running display mode.
  • Step S704 If the application to be run in the foreground does not support the currently running display mode, save the currently running display mode as the display mode to be restored, and automatically switch the currently running display mode to the final support of the application to be run in the foreground. Displays the display mode in the mode list.
  • Step S705 Perform foreground operation of the application in the display mode after the switching.
  • FIG. 8 is a flowchart of a display mode switching method according to an embodiment of the present disclosure. As shown in FIG. 8, the display mode switching method of the embodiment of the present disclosure may include the following steps S801 to S805.
  • the display mode switching method of the present embodiment is executed in the presence of a display mode to be restored.
  • Step S801 When the running state of the terminal changes, the information of the application to be run in the foreground is obtained.
  • Step S802 According to the package name of the application to be run in the foreground, access the corresponding blacklist or whitelist to obtain the display mode supported by the application under the blacklist or whitelist restriction.
  • Step S803 Acquire a display mode to be restored, and check whether an application to be run in the foreground supports the display mode to be restored.
  • the checking may include comparing the display mode supported by the application under the setting attribute of the application with the display mode supported by the application under the blacklist and/or whitelist restriction, and obtaining a display mode list ultimately supported by the application.
  • the checking may also include comparing the list of display modes ultimately supported by the application to the display mode to be restored. If the display mode to be restored is included in the list of display modes that the application ultimately supports, the application supports the display mode to be restored. If the display mode to be restored is not included in the display mode list that is finally supported by the application, the application does not support the display mode to be restored.
  • Step S804 If the application to be run in the foreground supports the display mode to be restored, the currently running display mode is switched to the display mode to be restored.
  • Step S805 Perform foreground operation of the application in the display mode after the switching.
  • the system of the terminal can automatically adapt the display mode supported by the application to the application, ensuring that the application can be displayed normally, and meeting the requirement that certain applications need to adopt a specific display mode for display.
  • the whole process does not require human intervention.
  • the application running in the foreground is closed or turned into the background, it can automatically restore to the default display mode set by the user (display mode to be restored), thereby greatly improving the user experience and enhancing.
  • the display quality of the application makes it possible to differentiate the display for the application.
  • the embodiment of the present disclosure further provides a storage medium, which can store program code for performing the following steps: acquiring information of an application to be run by the terminal in the foreground, and acquiring a display mode currently running by the terminal as the first display mode. Determining a display mode supported by the application to be run in the foreground as the second display mode; and when the second display mode does not include the first display mode, switching the display mode of the terminal to the second display mode.
  • the foregoing storage medium may include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • ROM Read-Only Memory
  • RAM Random Access Memory
  • a medium that can store program code may include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk.
  • the program code stored in the storage medium in this embodiment can be executed by the processor.
  • the display mode switching device when the second display mode supported by the application to be run in the foreground does not include the currently displayed first display mode, the display mode of the terminal can be automatically switched to The second display mode.
  • the technical problem that the terminal can not automatically switch the display mode in the related art is solved, the user experience is improved, the display quality of the application is enhanced, and the differentiated display of the application is realized.
  • modules or steps of the present disclosure may be implemented by a general computing device, which may be centralized on a single computing device or may be distributed over a network composed of multiple computing devices. In the above, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device and executed by the computing device, and in some cases may be performed in a different order than the present disclosure.
  • the various modules or steps of the present disclosure may be fabricated as individual integrated circuits, or portions of the modules or steps may be fabricated into a single integrated circuit. The present disclosure is not limited to any particular combination of hardware and software.

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Multimedia (AREA)
  • User Interface Of Digital Computer (AREA)
  • Controls And Circuits For Display Device (AREA)

Abstract

Provided in the present disclosure are a display mode switching method and apparatus, and a terminal, said display mode switching method comprising: acquiring information of an application to be run in the foreground by a terminal, and acquiring a currently running display mode of said terminal as a first display mode; determining a display mode that is supported by said application as a second display mode; when said second display mode does not comprise said first display mode, automatically switching the display mode of said terminal to said second display mode.

Description

显示模式切换方法及装置、终端、存储介质Display mode switching method and device, terminal, storage medium
相关申请的交叉引用Cross-reference to related applications
本申请要求于2017年9月30日提交的题为“显示切换方法及装置、终端”的中国专利申请NO.201710945145.2的优先权,该中国专利申请的内容通过引用的方式全文合并于此。The present application claims priority to Chinese Patent Application No. 201710945145.2, filed on Sep. 30,,,,,,,,,,,,,,,,,,
技术领域Technical field
本公开涉及但不限于通信领域,具体而言,涉及显示模式切换方法及装置、终端、存储介质。The present disclosure relates to, but is not limited to, the field of communications, and in particular, to a display mode switching method and apparatus, a terminal, and a storage medium.
背景技术Background technique
随着具有显示功能的终端的普及,用户对于终端的显示方式有了越来越多的要求,多屏显示和分屏显示成了研究和发展的重点。随着例如谷歌(Google)或其他操作系统对多屏显示机制和分屏显示机制的不断优化,终端上各种应用可以以不同的显示模式显示在屏幕上。With the popularity of terminals with display functions, users have more and more requirements for the display mode of terminals, and multi-screen display and split-screen display have become the focus of research and development. With the continuous optimization of multi-screen display mechanisms and split-screen display mechanisms, for example, by Google or other operating systems, various applications on the terminal can be displayed on the screen in different display modes.
相关技术中,终端的显示模式之间切换是通过用户手动操作、或者是通过(霍尔传感器)感测屏幕状态变化而触发的,考虑了用户的主观需求、或者考虑了终端屏幕状态变化,但是,无法自动适配应用的属性,导致不同的应用在终端上不能自动通过不同的显示模式来呈现给用户,在用户强制切换显示模式时,还可能出现显示错误。In the related art, the switching between the display modes of the terminal is triggered by the user manually, or by sensing the state change of the screen by (Hall sensor), taking into account the subjective needs of the user, or considering the state change of the terminal screen, but The attributes of the application cannot be automatically adapted, so that different applications cannot be automatically presented to the user through different display modes on the terminal, and display errors may occur when the user forcibly switches the display mode.
公开内容Public content
本公开的实施例提供了一种显示模式切换方法,包括:获取终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;确定所述应用支持的显示模式作为第二显示模式;以及在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。An embodiment of the present disclosure provides a display mode switching method, including: acquiring information of an application to be run by a terminal in a foreground, and acquiring a display mode currently running by the terminal as a first display mode; determining a display mode supported by the application And as the second display mode; and when the second display mode does not include the first display mode, automatically switching the display mode of the terminal to the second display mode.
本公开的实施例提供了一种显示模式切换装置,包括:获取模块,配置为获取终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;确定模块,配置为确定所述应用支持的显示模式作为第二显示模式;以及切换模块,配置为在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。An embodiment of the present disclosure provides a display mode switching apparatus, including: an obtaining module configured to acquire information of an application to be run by a terminal in a foreground, and acquire a display mode currently running by the terminal as a first display mode; and a determining module, Configuring to determine a display mode supported by the application as a second display mode; and a switching module configured to automatically switch the display mode of the terminal to the second display mode when the first display mode is not included The second display mode is described.
本公开的实施例提供了一种终端,包括处理器以及存储有所述处理器可执行的指令的存储器,所述指令被处理器执行时,执行如下操作:获取所述终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;确定所述应用支持的显示模式作为第二显示模式;以及在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。An embodiment of the present disclosure provides a terminal, including a processor and a memory storing instructions executable by the processor, when executed by the processor, performing an operation of: acquiring an application that the terminal is to run in the foreground And obtaining a display mode in which the terminal is currently running as a first display mode; determining a display mode supported by the application as a second display mode; and when the second display mode does not include the first display mode Automatically switching the display mode of the terminal to the second display mode.
本公开的实施例还提供了一种计算机可读存储介质,包括存储的程序,所述程序被运行时执行如下操作:获取终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;确定所述应用支持的显示模式作为第二显示模式;以及在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。Embodiments of the present disclosure also provide a computer readable storage medium including a stored program, the program being executed to perform operations of: acquiring information of an application to be run by a terminal in a foreground, and acquiring a display currently running by the terminal a mode as a first display mode; determining a display mode supported by the application as a second display mode; and automatically switching a display mode of the terminal to the second display mode when the first display mode is not included The second display mode is described.
附图说明DRAWINGS
附图用来提供对本公开的进一步理解,构成本申请的一部分,在附图中:The accompanying drawings are included to provide a
图1是执行本公开的实施例的显示模式切换方法的移动终端的结构框图;1 is a block diagram showing the structure of a mobile terminal that performs a display mode switching method of an embodiment of the present disclosure;
图2是根据本公开的实施例的显示模式切换方法的流程图;2 is a flowchart of a display mode switching method according to an embodiment of the present disclosure;
图3是根据本公开的实施的获取要前台运行的应用的信息的流程图;3 is a flow diagram of obtaining information of an application to be run in the foreground, in accordance with an implementation of the present disclosure;
图4是本公开的实施例的双屏终端的结构示意图;4 is a schematic structural diagram of a dual screen terminal according to an embodiment of the present disclosure;
图5是根据本公开的实施例的显示模式切换装置的结构框图;FIG. 5 is a structural block diagram of a display mode switching device according to an embodiment of the present disclosure; FIG.
图6是根据本公开的实施例的终端的结构框图;FIG. 6 is a structural block diagram of a terminal according to an embodiment of the present disclosure;
图7为本公开的实施例提供的显示模式切换方法的流程图;FIG. 7 is a flowchart of a display mode switching method according to an embodiment of the present disclosure;
图8为本公开的实施例提供的显示模式切换方法的流程图。FIG. 8 is a flowchart of a display mode switching method according to an embodiment of the present disclosure.
具体实施方式Detailed ways
下文中将参考附图并结合实施例来详细说明本公开的技术方案。本公开的实施例及其说明用于解释本公开,并不构成对本公开的不当限定。需要说明的是,在不冲突的情况下,本公开的实施例及实施方式中的各特征可以任意相互组合。The technical solutions of the present disclosure will be described in detail below with reference to the accompanying drawings in conjunction with the embodiments. The embodiments of the present disclosure and the description thereof are for explaining the present disclosure and do not constitute an undue limitation of the present disclosure. It should be noted that, in the case of no conflict, the features of the embodiments and the embodiments of the present disclosure may be combined with each other arbitrarily.
需要说明的是,本公开中的术语“第一”、“第二”仅用于区别类似的对象,而不用于描述特定的顺序或先后次序。It should be noted that the terms “first” and “second” in the present disclosure are only used to distinguish similar objects, and are not used to describe a specific order or order.
本公开的实施例所提供的显示模式切换方法及装置可以在移动终端、计算机终端或者类似的运算设备中实现。以在移动终端上实现本公开的实施例的显示模式切换方法为例,图1示出了实现本公开的实施例的显示模式切换方法的移动终端的结构框图。如图1所示,实现本公开的实施例的显示模式切换方法的移动终端10可以包括一个或多个(图中仅示出一个)处理器102、配置来存储数据的存储器104、以及配置来实现通信功能的传输装置106。处理器102可以包括但不限于诸如微处理器、微控制单元(MCU)、可编程逻辑器件(例如FPGA)等的处理装置。本领域普通技术人员可以理解,图1所示的结构仅为示意性的,其并不对移动终端10的结构造成限定。例如,移动终端10还可包括比图1中所示的更多或者更少的组件,或者可具有与图1所示不同的配置。The display mode switching method and apparatus provided by the embodiments of the present disclosure may be implemented in a mobile terminal, a computer terminal, or the like. Taking a display mode switching method of an embodiment of the present disclosure on a mobile terminal as an example, FIG. 1 shows a structural block diagram of a mobile terminal that implements a display mode switching method of an embodiment of the present disclosure. As shown in FIG. 1, a mobile terminal 10 implementing a display mode switching method of an embodiment of the present disclosure may include one or more (only one shown in the figure) processor 102, a memory 104 configured to store data, and a configuration. A transmission device 106 that implements a communication function. Processor 102 may include, but is not limited to, a processing device such as a microprocessor, a micro control unit (MCU), a programmable logic device (eg, an FPGA), and the like. Those of ordinary skill in the art will appreciate that the structure shown in FIG. 1 is merely illustrative and does not limit the structure of the mobile terminal 10. For example, the mobile terminal 10 may also include more or fewer components than those shown in FIG. 1, or may have a different configuration than that shown in FIG.
存储器104可配置来存储应用软件的程序指令/模块,如可存储本公开的实施例的显示模式切换方法对应的程序指令/模块,处理器102通过运行存储在存储器104内的程序指令/模块,从而执行各种应用功能以及数据处理,如实现本公开的实施例的显示模式切换方法。存储器104可包括诸如高速随机存储器的非易失性存储器或者诸如磁性存储装置、闪存之类的非易失性固态存储器。在一些实例中,存储器104可进一步包括相对于处理器102远程设置的存储器,这些远 程设置的存储器可以通过网络(包括但不限于互联网、企业内部网、局域网、移动通信网或其组合)连接至移动终端10。The memory 104 can be configured to store program instructions/modules of application software, such as program instructions/modules that can store display mode switching methods of embodiments of the present disclosure, by which the processor 102 runs program instructions/modules stored in the memory 104, Thereby various application functions and data processing are performed, such as a display mode switching method that implements an embodiment of the present disclosure. The memory 104 may include a nonvolatile memory such as a high speed random access memory or a nonvolatile solid state memory such as a magnetic storage device, a flash memory. In some examples, memory 104 can further include memory remotely located relative to processor 102, which can be connected to the network (including but not limited to the Internet, an intranet, a local area network, a mobile communication network, or a combination thereof) Mobile terminal 10.
传输装置106可配置为经由网络(包括移动终端10的通信供应商提供的无线网络)接收或者发送数据。在一个实例中,传输装置106包括网络接口控制器(Network Interface Controller,NIC),可通过基站与其他网络设备相连,从而可与互联网进行通讯。在一个实例中,传输装置106可以为射频(Radio Frequency,RF)模块,配置为通过无线方式与互联网进行通讯。The transmitting device 106 can be configured to receive or transmit data via a network (including a wireless network provided by a communication provider of the mobile terminal 10). In one example, the transmission device 106 includes a Network Interface Controller (NIC) that can be connected to other network devices through a base station to communicate with the Internet. In one example, the transmission device 106 can be a Radio Frequency (RF) module configured to communicate with the Internet wirelessly.
图2是根据本公开的实施例的显示模式切换方法的流程图。如图2所示,本公开的实施例的显示模式切换方法可包括如下步骤:S202,获取终端要前台运行的应用的信息,以及获取终端当前运行的显示模式作为第一显示模式;S204,确定要前台运行的应用支持的显示模式作为第二显示模式;以及S206,在第二显示模式不包括第一显示模式时,自动将终端的显示模式切换至第二显示模式。2 is a flow chart of a display mode switching method in accordance with an embodiment of the present disclosure. As shown in FIG. 2, the display mode switching method of the embodiment of the present disclosure may include the following steps: S202: acquiring information of an application that the terminal wants to run in the foreground, and acquiring a display mode currently running by the terminal as the first display mode; S204, determining The display mode supported by the application running in the foreground is the second display mode; and S206, when the second display mode does not include the first display mode, the display mode of the terminal is automatically switched to the second display mode.
通过上述步骤,在要前台运行的应用支持的第二显示模式不包括当前运行的第一显示模式时,自动将终端的显示模式切换至第二显示模式。解决了相关技术中终端不能自动切换显示模式的技术问题,提高了用户体验,增强了应用相关的显示质量,实现了应用显示的差异化。Through the above steps, when the second display mode supported by the application to be run in the foreground does not include the currently displayed first display mode, the display mode of the terminal is automatically switched to the second display mode. The technical problem that the terminal can not automatically switch the display mode in the related art is solved, the user experience is improved, the display quality related to the application is enhanced, and the application display is differentiated.
应当理解,本公开的实施例的显示模式切换方法可由单屏终端、双屏终端、多屏终端等实现,但不限于此。It should be understood that the display mode switching method of the embodiment of the present disclosure may be implemented by a single screen terminal, a dual screen terminal, a multi-screen terminal, or the like, but is not limited thereto.
图4是本公开的实施例的双屏终端的结构示意图。如图4所示,该双屏终端具有S1与S2两个屏幕,两个屏幕通过转轴或其他连接件相连。4 is a schematic structural diagram of a dual screen terminal of an embodiment of the present disclosure. As shown in FIG. 4, the dual screen terminal has two screens S1 and S2, and the two screens are connected by a rotating shaft or other connecting members.
在一些实施方式中,第二显示模式可以是一个或多个显示模式,在第二显示模式是多个显示模式时,可以以列表或集合的方式存在。将终端切换至要前台运行的应用所支持的第二显示模式中的任意显示模式,或者按照优先级顺序来选择将终端切换至要前台运行的应用所支持的第二显示模式中的显示模式。In some embodiments, the second display mode may be one or more display modes, and may exist in a list or a collection when the second display mode is a plurality of display modes. Switching the terminal to any of the second display modes supported by the application to be run in the foreground, or selecting the display mode in the second display mode supported by the application to be run in the foreground by the priority order.
在一些实施方式中,获取终端要前台运行的应用的信息可包括: 当终端的运行状态发生变化时,获取终端要前台运行的应用的信息。终端的运行状态发生变化可能会导致要前台运行的应用发生变化,而不同的应用所支持的显示模式可能会不同。In some embodiments, obtaining the information of the application that the terminal wants to run in the foreground may include: acquiring information of the application that the terminal wants to run in the foreground when the running state of the terminal changes. Changes in the operating state of the terminal may result in changes to the application running in the foreground, and the display modes supported by different applications may be different.
在本实施例中,终端的运行状态发生变化可以但不限于启动应用、关闭应用、将前台运行的应用切换到后台运行、将后台运行的应用切换到前台运行、返回主页、启动应用失败等。In this embodiment, the change of the running state of the terminal may be, but is not limited to, starting the application, closing the application, switching the application running in the foreground to the background running, switching the application running in the background to the foreground running, returning to the home page, starting the application failure, and the like.
在一些实施方式中,如图3所示,获取终端要前台运行的应用的信息可包括:S11,在终端的任务栈中获取栈顶任务;S12,获取栈顶任务的活动(Activity)栈的最顶端的活动;以及S13,从活动(Activity)栈的最顶端的活动获取对应的应用的信息。In some embodiments, as shown in FIG. 3, acquiring information of an application to be run by the terminal in the foreground may include: S11: acquiring a top-of-stack task in a task stack of the terminal; and S12, acquiring an activity stack of the top-top task. The topmost activity; and S13, the information of the corresponding application is obtained from the topmost activity of the activity stack.
在一些实施方式中,要前台运行的应用支持的第二显示模式可以由多种因素决定,如运营商推荐、应用属性、用户偏好等。例如,对于运营商推广的应用,在运营商推荐的显示模式下进行显示可能能够充分利用双屏或多屏空间。再例如,一些应用可能不支持某种显示模式,这可能由应用的开发者决定。作为示例,可将安卓(Android)系统中的应用的入口文件AndroidManifest.xml中的属性resizeableActivity设置为false,从而使得该应用不支持分屏显示模式,如果当前运行的显示模式为分屏显示模式,则要前台运行该应用时,需要将显示模式切换至单屏显示模式,否则可能会导致显示错误。此外,如果应用在某种显示模式下运行异常,则可将该应用添加至特定的黑名单或白名单。黑名单可包括应用不支持的显示模式,白名单可包括应用支持的显示模式。比如某应用(比如运营商提供的应用)仅仅支持单A显示模式,则将该应用添加至仅支持单A显示模式的白名单,这样,即使当前显示模式为双屏显示模式,要前台运行该应用时,显示模式会切换至单A显示模式。黑名单或白名单也可以根据用户偏好来建立或修改。In some embodiments, the second display mode supported by the application running in the foreground can be determined by a variety of factors, such as operator recommendations, application attributes, user preferences, and the like. For example, for an operator-promoted application, displaying in an operator-recommended display mode may be able to take full advantage of dual or multi-screen space. As another example, some applications may not support a certain display mode, which may be determined by the developer of the application. As an example, the attribute resizeableActivity in the AndroidManifest.xml of the application in the Android system may be set to false, so that the application does not support the split screen display mode, if the currently running display mode is the split screen display mode, If you want to run the application in the foreground, you need to switch the display mode to single-screen display mode, otherwise it may cause display errors. In addition, if the app is running abnormally in some display mode, the app can be added to a specific blacklist or whitelist. The blacklist may include a display mode that is not supported by the application, and the whitelist may include a display mode supported by the application. For example, if an application (such as an application provided by an operator) only supports the single A display mode, the application is added to a white list that supports only the single A display mode, so that even if the current display mode is the dual display mode, the foreground should be run. When applied, the display mode switches to single A display mode. Blacklists or whitelists can also be created or modified based on user preferences.
在一些实施方式中,确定要前台运行的应用支持的第二显示模式可包括:根据黑名单和/或白名单确定应用支持的第二显示模式。当然也可以通过临时采集应用的信息来确定应用支持的第二显示模式,如在应用是新下载的应用的情况下。In some embodiments, determining the second display mode supported by the application to be run in the foreground may include determining a second display mode supported by the application according to the blacklist and/or the whitelist. It is of course also possible to determine the second display mode supported by the application by temporarily collecting the information of the application, such as in the case where the application is a newly downloaded application.
在一些实施方式中,本公开的实施例的显示模式切换方法还可包括:在第二显示模式不包括第一显示模式时,将第一显示模式设置为待恢复的显示模式。In some embodiments, the display mode switching method of the embodiment of the present disclosure may further include setting the first display mode to the display mode to be restored when the second display mode does not include the first display mode.
在一些实施方式中,本公开的实施例的显示模式切换方法还可包括:在将第一显示模式设置为待恢复的显示模式之后,在终端的运行状态发生变化时,将终端的显示模式从第二显示模式切换至第一显示模式。这样,例如,在前台运行的支持第二显示模式的应用关闭或者转为后台运行时,可恢复运行第一显示模式,即,可实现优先使用缺省的第一显示模式。In some embodiments, the display mode switching method of the embodiment of the present disclosure may further include: after setting the first display mode to the display mode to be restored, when the operating state of the terminal changes, the display mode of the terminal is changed from The second display mode is switched to the first display mode. Thus, for example, when the application running in the foreground supporting the second display mode is turned off or turned to run in the background, the first display mode can be resumed, that is, the default first display mode can be preferentially used.
本实施例中,第一显示模式可包括以下显示模式中的至少之一:单屏终端的分屏显示模式,双屏终端的单屏显示模式,双屏终端的双屏镜像显示模式,双屏终端的双屏拼接显示模式,双屏终端的双屏分屏显示模式。第二显示模式可包括以下显示模式中的至少之一:单屏终端的分屏显示模式,双屏终端的单屏显示模式,双屏终端的双屏镜像显示模式,双屏终端的双屏拼接显示模式,双屏终端的双屏分屏显示模式。In this embodiment, the first display mode may include at least one of the following display modes: a split screen display mode of a single screen terminal, a single screen display mode of a dual screen terminal, a dual screen mirror display mode of a dual screen terminal, and a dual screen The dual screen splicing display mode of the terminal and the dual screen split screen display mode of the dual screen terminal. The second display mode may include at least one of the following display modes: a split screen display mode of the single screen terminal, a single screen display mode of the dual screen terminal, a dual screen mirror display mode of the dual screen terminal, and a dual screen stitching of the dual screen terminal. Display mode, dual screen split screen display mode for dual screen terminals.
双屏终端的单屏显示模式可简称为单A显示模式,是指对于双屏终端,仅双屏中的一个屏幕显示运行的应用,其与单屏终端的全屏显示一致。双屏终端的双屏镜像显示模式可简称为A|A显示模式,是指对于双屏终端,运行的应用同时分别显示在两个屏幕上,即,两个屏幕上显示相同的内容。双屏终端的双屏拼接显示模式可简称为大A显示模式,是指对于双屏终端,两个屏幕拼接在一起作为一个屏幕显示运行的应用,两个屏幕中的每个屏幕分别显示该应用的部分。双屏终端的双屏分屏显示模式可简称为A|B显示模式,是指对于双屏终端,两个屏幕分别显示不同的应用。当然,终端不仅限于包括两个屏幕,也可以包括三个或更多个屏幕,在终端包括多于两个的屏幕时,本公开中描述的双屏仅代表终端的任意两个屏幕,终端的其他屏幕的显示方式可类似。The single-screen display mode of the dual-screen terminal can be simply referred to as a single-A display mode, which refers to an application that operates on only one screen of the dual-screen terminal, which is consistent with the full-screen display of the single-screen terminal. The dual-screen mirroring mode of the dual-screen terminal can be simply referred to as the A|A display mode, which means that for the dual-screen terminal, the running application is simultaneously displayed on two screens, that is, the same content is displayed on the two screens. The dual-screen splicing display mode of the dual-screen terminal may be referred to as a large A display mode, which refers to an application in which two screens are spliced together as one screen display for a dual-screen terminal, and each of the two screens respectively displays the application. part. The dual-screen split-screen display mode of the dual-screen terminal can be simply referred to as the A|B display mode, which means that for the dual-screen terminal, the two screens respectively display different applications. Of course, the terminal is not limited to including two screens, and may also include three or more screens. When the terminal includes more than two screens, the dual screen described in the present disclosure only represents any two screens of the terminal, the terminal Other screens can be displayed in a similar manner.
应当理解,本公开的实施例的显示模式切换方法可借助软件加必需的通用硬件平台的方式来实现,当然也可以仅通过硬件实现。基 于这样的理解,本公开的实施例的显示模式切换方法可以以包括可执行指令的软件产品的形式提供,该软件产品可存储在存储介质(如ROM、RAM、磁碟、光盘)中,终端(例如手机、计算机、服务器、或者网络设备等)运行该软件产品来执行本公开的实施例的显示模式切换方法。It should be understood that the display mode switching method of the embodiment of the present disclosure may be implemented by means of software plus a necessary general hardware platform, and may of course be implemented only by hardware. Based on such understanding, the display mode switching method of an embodiment of the present disclosure may be provided in the form of a software product including executable instructions that may be stored in a storage medium (such as a ROM, a RAM, a disk, an optical disk), the terminal The software product is run (eg, a cell phone, a computer, a server, or a network device, etc.) to perform a display mode switching method of an embodiment of the present disclosure.
本公开的实施例还提供一种显示模式切换装置和终端,用于实现本公开的实施例的显示模式切换方法。本公开所使用的术语“模块”可以是实现预定功能的软件、硬件或其组合。本公开的实施例所描述的显示模式切换装置可以通过硬件、软件或其组合实现。Embodiments of the present disclosure also provide a display mode switching device and a terminal for implementing a display mode switching method of an embodiment of the present disclosure. The term "module" as used in this disclosure may be software, hardware or a combination thereof that implements a predetermined function. The display mode switching device described in the embodiments of the present disclosure may be implemented by hardware, software, or a combination thereof.
图5是根据本公开的实施例的显示模式切换装置的结构框图。如图5所示,本公开的实施例的显示模式切换装置可包括:获取模块40,配置为获取终端要前台运行的应用的信息,以及获取终端当前运行的显示模式作为第一显示模式;确定模块42,配置为确定要前台运行的应用支持的显示模式作为第二显示模式;以及切换模块44,配置为在第二显示模式不包括第一显示模式时,将终端的显示模式切换至第二显示模式。FIG. 5 is a structural block diagram of a display mode switching device according to an embodiment of the present disclosure. As shown in FIG. 5, the display mode switching apparatus of the embodiment of the present disclosure may include: an obtaining module 40 configured to acquire information of an application to be run by the terminal in the foreground, and acquire a display mode currently running by the terminal as the first display mode; a module 42 configured to determine a display mode supported by an application to be run in the foreground as a second display mode; and a switching module 44 configured to switch the display mode of the terminal to the second when the second display mode does not include the first display mode Display mode.
在一些实施方式中,所述显示模式切换装置还可包括:设置模块45,配置为在第二显示模式不包括第一显示模式时,将第一显示模式设置为待恢复的显示模式。In some embodiments, the display mode switching device may further include: a setting module 45 configured to set the first display mode to the display mode to be restored when the second display mode does not include the first display mode.
图6是根据本公开的实施例的终端的结构框图。如图6所示,该终端可包括:处理器50以及存储有处理器50可执行的指令的存储器52,所述指令被处理器50执行时,执行如下操作:获取终端要前台运行的应用的信息,以及获取终端当前运行的显示模式作为第一显示模式;确定要前台运行的应用支持的显示模式作为第二显示模式;以及在第二显示模式不包括第一显示模式时,将终端的显示模式切换至第二显示模式。FIG. 6 is a structural block diagram of a terminal according to an embodiment of the present disclosure. As shown in FIG. 6, the terminal may include a processor 50 and a memory 52 storing instructions executable by the processor 50. When the instructions are executed by the processor 50, the following operations are performed: acquiring an application of the terminal to be run in the foreground Information, and obtaining a display mode in which the terminal is currently running as the first display mode; determining a display mode supported by the application to be run in the foreground as the second display mode; and displaying the terminal when the second display mode does not include the first display mode The mode is switched to the second display mode.
本实施例中,第一显示模式可包括以下显示模式中的至少之一:单屏终端的分屏显示模式,双屏终端的单屏显示模式,双屏终端的双屏镜像显示模式,双屏终端的双屏拼接显示模式,双屏终端的双屏分屏显示模式。第二显示模式可包括以下显示模式中的至少之一:单屏 终端的分屏显示模式,双屏终端的单屏显示模式,双屏终端的双屏镜像显示模式,双屏终端的双屏拼接显示模式,双屏终端的双屏分屏显示模式。In this embodiment, the first display mode may include at least one of the following display modes: a split screen display mode of a single screen terminal, a single screen display mode of a dual screen terminal, a dual screen mirror display mode of a dual screen terminal, and a dual screen The dual screen splicing display mode of the terminal and the dual screen split screen display mode of the dual screen terminal. The second display mode may include at least one of the following display modes: a split screen display mode of the single screen terminal, a single screen display mode of the dual screen terminal, a dual screen mirror display mode of the dual screen terminal, and a dual screen stitching of the dual screen terminal. Display mode, dual screen split screen display mode for dual screen terminals.
双屏终端的单屏显示模式可简称为单A显示模式,是指对于双屏终端,仅双屏中的一个屏幕显示运行的应用,其与单屏终端的全屏显示一致。双屏终端的双屏镜像显示模式可简称为AA显示模式,是指对于双屏终端,运行的应用同时分别显示在两个屏幕上,即,两个屏幕上显示相同的内容。双屏终端的双屏拼接显示模式可简称为大A显示模式,是指对于双屏终端,两个屏幕拼接在一起作为一个屏幕显示运行的应用,两个屏幕中的每个屏幕分别显示该应用的部分。双屏终端的双屏分屏显示模式可简称为AB显示模式,是指对于双屏终端,两个屏幕分别显示不同的应用。当然,终端不仅限于包括两个屏幕,也可以包括三个或更多个屏幕,在终端包括多于两个的屏幕时,本公开中描述的双屏仅代表终端的任意两个屏幕,终端的其他屏幕的显示方式可类似。The single-screen display mode of the dual-screen terminal can be simply referred to as a single-A display mode, which refers to an application that operates on only one screen of the dual-screen terminal, which is consistent with the full-screen display of the single-screen terminal. The dual-screen mirroring mode of the dual-screen terminal can be simply referred to as the AA display mode, which means that for the dual-screen terminal, the running application is simultaneously displayed on two screens, that is, the same content is displayed on the two screens. The dual-screen splicing display mode of the dual-screen terminal may be referred to as a large A display mode, which refers to an application in which two screens are spliced together as one screen display for a dual-screen terminal, and each of the two screens respectively displays the application. part. The dual-screen split-screen display mode of the dual-screen terminal can be simply referred to as the AB display mode, which means that for the dual-screen terminal, the two screens respectively display different applications. Of course, the terminal is not limited to including two screens, and may also include three or more screens. When the terminal includes more than two screens, the dual screen described in the present disclosure only represents any two screens of the terminal, the terminal Other screens can be displayed in a similar manner.
需要说明的是,本公开的实施例的显示模式切换装置中的各个模块可以通过软件、硬件、或其组合来实现。例如,各个模块可通过同一处理器执行对应的软件程序来实现,或者可以以任意组合的形式通过多个处理器分别执行对应的软件程序来实现。It should be noted that each module in the display mode switching device of the embodiment of the present disclosure may be implemented by software, hardware, or a combination thereof. For example, each module may be implemented by executing the corresponding software program by the same processor, or may be implemented by executing a corresponding software program by multiple processors in any combination.
基于目前应用的具体情况、以及运营商的特殊要求,双屏终端支持单屏显示模式(单A显示模式)、双屏镜像显示模式(A|A显示模式)、双屏拼接显示模式(大A显示模式)、和双屏分屏显示模式(A|B显示模式)。但是,目前的应用,尤其是第三方应用,由于应用自身的限制,有些应用不能支持某些显示模式。比如有些应用没有考虑到双屏拼接显示模式下的显示,从而导致在双屏拼接显示模式下显示时存在显示错误(例如,界面错乱等)的问题。安卓(Android)系统中有些应用的入口文件AndroidManifest.xml中的属性resizeableActivity设置为false,从而使得该应用不支持分屏显示模式,如果在分屏显示模式下强制打开该应用,则可能会出现应用运行异常。再比如对于运营商的某些应用,可能会强制要求运行在特定 显示模式。这些现实情况都要求必须有一种基于应用的自动的显示模式切换方法来实现针对应用的显示模式的自动切换,以保证应用能够在适合的显示模式下正常运行。而对于非双屏的终端,在存在分屏显示模式等多种显示模式的情况下,也有着相同的需求。Based on the current application and the special requirements of the operator, the dual-screen terminal supports single-screen display mode (single A display mode), dual-screen mirrored display mode (A|A display mode), and dual-screen splicing display mode (large A Display mode), and dual-screen split-screen display mode (A|B display mode). However, current applications, especially third-party applications, may not support certain display modes due to the limitations of the application itself. For example, some applications do not take into account the display in the dual-screen splicing display mode, resulting in display errors (eg, interface confusion, etc.) when displayed in the dual-screen splicing display mode. In some Android applications, the property resizeableActivity in the AndroidManifest.xml of the application file is set to false, so that the application does not support the split screen display mode. If the application is forcibly opened in the split screen display mode, the application may appear. Running abnormally. For example, for some applications of the operator, it may be mandatory to run in a specific display mode. These realities require an automatic application-based display mode switching method to achieve automatic switching of the display mode for the application to ensure that the application can function properly in the appropriate display mode. For a non-dual-screen terminal, there are the same requirements in the case of multiple display modes such as a split-screen display mode.
需要说明的是,本公开的实施例的终端不仅仅限于双屏终端(如手机),还包括具有多种显示模式的单屏终端或多屏终端。It should be noted that the terminal of the embodiment of the present disclosure is not limited to a dual-screen terminal (such as a mobile phone), but also includes a single-screen terminal or a multi-screen terminal having multiple display modes.
本公开的实施例提供的显示模式切换方法、显示模式切换装置及终端实现了基于应用的显示模式的自动切换,当终端的运行状态发生变化时,例如要前台运行新的应用时,基于要前台运行的应用的属性信息、以及相应的黑名单和/或白名单,判断要前台运行的应用是否支持当前的显示模式、以及要前台运行的应用支持的显示模式。在要前台运行的应用不支持当前的显示模式的情况下,可将当前的显示模式记录为待恢复的显示模式,然后将当前的显示模式自动切换至要前台运行的应用支持的显示模式,当终端的运行状态再次发生变化时,例如,前台运行的应用关闭或转为后台运行时,可再次检查要前台运行的新的应用,如要前台运行的新的应用支持待恢复的显示模式,则将当前的显示模式恢复至待恢复的显示模式。The display mode switching method, the display mode switching device, and the terminal provided by the embodiments of the present disclosure implement automatic switching based on the display mode of the application. When the running state of the terminal changes, for example, when a new application is to be run in the foreground, The attribute information of the running application, and the corresponding blacklist and/or whitelist, determine whether the application to be run in the foreground supports the current display mode, and the display mode supported by the application running in the foreground. In the case that the application to be run in the foreground does not support the current display mode, the current display mode may be recorded as the display mode to be restored, and then the current display mode is automatically switched to the display mode supported by the application to be run in the foreground. When the running status of the terminal changes again, for example, when the application running in the foreground is closed or turned into the background, the new application to be run in the foreground can be checked again. If the new application running in the foreground supports the display mode to be restored, Restore the current display mode to the display mode to be restored.
通过本公开的实施例的显示模式切换方法、显示模式切换装置及终端,终端的系统可以自动地针对应用适配其支持的显示模式,保证了应用可以正常地显示,也满足了某些应用需要采用特定显示模式进行显示的要求,而且整个过程不需要人为的介入,在前台运行的应用关闭或转为后台运行时,又能自动恢复到用户设置的默认显示模式(待恢复的显示模式),大大提高了用户体验,增强了应用的显示质量,也使得针对应用的差异化显示成为可能。Through the display mode switching method, the display mode switching device and the terminal of the embodiment of the present disclosure, the system of the terminal can automatically adapt the display mode supported by the application to the application, ensuring that the application can be displayed normally, and also meets certain application requirements. The display mode is specified by a specific display mode, and the entire process does not require human intervention. When the application running in the foreground is closed or turned into the background, the user can automatically restore the default display mode set by the user (the display mode to be restored). The user experience is greatly improved, the display quality of the application is enhanced, and differentiated display for the application is made possible.
在实际应用中,例如,应用为了达到较好的显示效果而对双屏显示模式有特定的要求,比如对于运营商推广的某些视频应用,要求在大A显示模式下进行显示,以充分利用双屏空间。应用不支持某些显示模式的情况下,比如安卓(Android)系统中某些应用的入口文件AndroidManifest.xml中的属性resizeableActivity设置为false,则这些应用不支持分屏显示模式,在分屏显示模式下要前台运 行这些应用时,显示模式可自动切换至单屏显示模式。双屏终端中,如果应用在某些显示模式下运行或显示异常,则该应用可添加至特定的黑名单或白名单,比如某些应用(如运营商自己的应用)仅仅支持在单A显示模式下运行,可将这些应用添加至仅支持单A显示模式的白名单,这样在双屏显示模式下要前台运行这些应用时,显示模式会切换至单A显示模式。In practical applications, for example, the application has specific requirements for the dual display mode in order to achieve a better display effect. For example, for some video applications promoted by operators, it is required to display in the large A display mode to make full use of Double screen space. In the case where the application does not support some display modes, for example, the property resizeableActivity in the AndroidManifest.xml file of some applications in Android (Android) system is set to false, then these applications do not support the split screen display mode, in the split screen display mode. When you want to run these applications in the foreground, the display mode can be automatically switched to the single-screen display mode. In a dual-screen terminal, if the application runs in some display modes or displays an abnormality, the application can be added to a specific blacklist or whitelist. For example, some applications (such as the operator's own application) only support single A display. Running in mode, these applications can be added to a whitelist that only supports single-A display mode, so that when these applications are run in the foreground in dual-display mode, the display mode switches to single-A display mode.
图7为本公开的实施例提供的显示模式切换方法的流程图。如图7所示,本公开的实施例的显示模式切换方法可包括以下步骤S701至S705。FIG. 7 is a flowchart of a display mode switching method according to an embodiment of the present disclosure. As shown in FIG. 7, the display mode switching method of the embodiment of the present disclosure may include the following steps S701 to S705.
步骤S701:当终端的运行状态发生变化时,获取要前台运行的应用的信息。Step S701: When the running state of the terminal changes, the information of the application to be run in the foreground is obtained.
所述终端运行状态发生变化可包括但不限于启动新的应用、关闭运行的应用、将前台运行的应用切换到后台运行、将后台运行的应用切换到前台运行等。The change of the operating state of the terminal may include, but is not limited to, starting a new application, closing a running application, switching an application running in the foreground to a background running, switching an application running in the background to a foreground running, and the like.
所述要前台运行的应用的信息可包括但不限于该应用对于显示模式的限制信息(例如在该应用的设置属性下该应用支持的显示模式)、以及该应用的包名等。The information of the application to be run in the foreground may include, but is not limited to, restriction information of the application for the display mode (for example, a display mode supported by the application under the setting attribute of the application), a package name of the application, and the like.
所述获取要前台运行的应用信息可包括但不限于:获取任务栈中的栈顶任务;获取栈顶任务的活动栈的最顶端的活动(即top Activity);以及从活动(Activity)栈的最顶端的活动获取对应的应用的信息。The obtaining application information to be run in the foreground may include, but is not limited to, acquiring a top-of-stack task in the task stack; acquiring a top-most activity of the active stack of the top-level task (ie, a top activity); and from the activity stack The topmost activity gets information about the corresponding app.
所述的显示模式包括单屏终端、双屏终端、以及多屏终端所具有的多种显示模式。The display modes include a single screen terminal, a dual screen terminal, and a plurality of display modes of the multi-screen terminal.
双屏终端可具有单A显示模式、A|A显示模式、大A显示模式、A|B显示模式等。The dual screen terminal may have a single A display mode, an A|A display mode, a large A display mode, an A|B display mode, and the like.
所述单A显示模式是指对于双屏终端(例如手机),仅双屏中的一个屏幕显示运行的应用,其与单屏终端的全屏显示一致。The single A display mode refers to an application running only on one screen of the dual screen terminal (for example, a mobile phone), which is consistent with the full screen display of the single screen terminal.
所述A|A显示模式是指对于双屏终端,运行的应用同时分别显示在两个屏幕上,即,两个屏幕上显示相同的内容。The A|A display mode means that for a dual screen terminal, the running application is simultaneously displayed on two screens, that is, the same content is displayed on the two screens.
所述大A显示模式是指对于双屏终端,两个屏幕拼接在一起作 为一个屏幕显示运行的应用,两个屏幕中的每个屏幕分别显示该应用的部分。The large A display mode refers to an application in which two screens are spliced together as one screen display operation for a dual screen terminal, and each of the two screens respectively displays a portion of the application.
所述A|B显示模式是指对于双屏终端,两个屏幕分别显示不同的应用。The A|B display mode means that for a dual screen terminal, two screens respectively display different applications.
应当理解,对于其它双屏显示模式的自动切换、对于单屏终端或多屏终端的其他显示模式的自动切换也包括在本公开的范围内。It should be understood that automatic switching for other dual screen display modes, automatic switching of other display modes for single screen terminals or multi-screen terminals is also included within the scope of the present disclosure.
步骤S702:根据要前台运行的应用的包名,通过访问相应的黑名单或白名单,获取在黑名单或白名单限制下该应用支持的显示模式。Step S702: According to the package name of the application to be run in the foreground, access the corresponding blacklist or whitelist to obtain the display mode supported by the application under the blacklist or whitelist restriction.
所述黑名单提供了应用不支持的显示模式,所述白名单提供了应用支持的显示模式。The blacklist provides a display mode that is not supported by the application, and the whitelist provides a display mode supported by the application.
所述黑名单和所述白名单可以提前预置,也可以由用户进行设置,此外也可以根据用户使用应用的行为自动建立或修改所述黑名单和所述白名单。The blacklist and the whitelist may be preset in advance, or may be set by the user. In addition, the blacklist and the whitelist may be automatically created or modified according to the behavior of the user using the application.
例如,可对预置应用和大量常用应用进行各种显示模式下的运行状态的测试,从而预置黑名单和白名单。For example, preset applications and a large number of commonly used applications can be tested in various display modes to preset blacklists and whitelists.
例如,用户可自己设置黑名单和白名单,比如用户可将发现的不支持某种显示模式的应用添加到对应的黑名单中,或者将发现的不支持某种显示模式的移出白名单,等等。For example, the user can set a blacklist and a whitelist by himself. For example, the user can add an application that does not support a certain display mode to the corresponding blacklist, or remove the discovered whitelist that does not support a certain display mode, etc. Wait.
例如,可以根据用户使用应用时应用在各种显示模式下的状态(如是否出现异常)来自动建立或修改黑名单和白名单。For example, the blacklist and whitelist can be automatically created or modified according to the state of the application in various display modes (such as whether an exception occurs) when the user uses the application.
步骤S703:获取当前运行的显示模式,检查要前台运行的应用是否支持当前运行的显示模式。Step S703: Obtain the currently running display mode, and check whether the application to be run in the foreground supports the currently running display mode.
所述检查可包括将在应用的设置属性下该应用支持的显示模式与在黑名单和/或白名单限制下该应用支持的显示模式进行比较,以获取应用最终支持的显示模式列表。The checking may include comparing the display mode supported by the application under the setting properties of the application with the display mode supported by the application under the blacklist and/or whitelist restrictions to obtain a list of display modes ultimately supported by the application.
所述检查还可包括将应用最终支持的显示模式列表与当前运行的显示模式进行比较。如当前运行的显示模式包含于应用最终支持的显示模式列表中,则应用支持当前运行的显示模式。如当前运行的显示模式不包含于应用最终支持的显示模式列表中,则应用不支持当前运行的显示模式。The checking may also include comparing the list of display modes ultimately supported by the application to the currently running display mode. If the currently running display mode is included in the list of display modes that the application ultimately supports, the application supports the currently running display mode. If the currently running display mode is not included in the list of display modes that the application ultimately supports, the application does not support the currently running display mode.
步骤S704:如要前台运行的应用不支持当前运行的显示模式,则将当前运行的显示模式保存为待恢复的显示模式,并将当前运行的显示模式自动切换为要前台运行的应用最终支持的显示模式列表中的显示模式。Step S704: If the application to be run in the foreground does not support the currently running display mode, save the currently running display mode as the display mode to be restored, and automatically switch the currently running display mode to the final support of the application to be run in the foreground. Displays the display mode in the mode list.
步骤S705:在切换后的显示模式下进行应用的前台运行。Step S705: Perform foreground operation of the application in the display mode after the switching.
图8为本公开的实施例提供的显示模式切换方法的流程图。如图8所示,本公开的实施例的显示模式切换方法可包括以下步骤S801至S805。FIG. 8 is a flowchart of a display mode switching method according to an embodiment of the present disclosure. As shown in FIG. 8, the display mode switching method of the embodiment of the present disclosure may include the following steps S801 to S805.
本实施例的显示模式切换方法在存在待恢复的显示模式的情况下执行。The display mode switching method of the present embodiment is executed in the presence of a display mode to be restored.
步骤S801:当终端的运行状态发生变化时,获取要前台运行的应用的信息。Step S801: When the running state of the terminal changes, the information of the application to be run in the foreground is obtained.
步骤S802:根据要前台运行的应用的包名,通过访问相应的黑名单或白名单,获取在黑名单或白名单限制下该应用支持的显示模式。Step S802: According to the package name of the application to be run in the foreground, access the corresponding blacklist or whitelist to obtain the display mode supported by the application under the blacklist or whitelist restriction.
步骤S803:获取待恢复的显示模式,检查要前台运行的应用是否支持待恢复的显示模式。Step S803: Acquire a display mode to be restored, and check whether an application to be run in the foreground supports the display mode to be restored.
所述检查可包括将在应用的设置属性下该应用支持的显示模式与在黑名单和/或白名单限制下该应用支持的显示模式进行比较,获取应用最终支持的显示模式列表。The checking may include comparing the display mode supported by the application under the setting attribute of the application with the display mode supported by the application under the blacklist and/or whitelist restriction, and obtaining a display mode list ultimately supported by the application.
所述检查还可包括将应用最终支持的显示模式列表与待恢复的显示模式进行比较。如待恢复的显示模式包含于应用最终支持的显示模式列表中,则应用支持待恢复的显示模式。如待恢复的显示模式不包含于应用最终支持的显示模式列表中,则应用不支持待恢复的显示模式。The checking may also include comparing the list of display modes ultimately supported by the application to the display mode to be restored. If the display mode to be restored is included in the list of display modes that the application ultimately supports, the application supports the display mode to be restored. If the display mode to be restored is not included in the display mode list that is finally supported by the application, the application does not support the display mode to be restored.
步骤S804:如要前台运行的应用支持待恢复的显示模式,将当前运行的显示模式切换至待恢复的显示模式。Step S804: If the application to be run in the foreground supports the display mode to be restored, the currently running display mode is switched to the display mode to be restored.
步骤S805:在切换后的显示模式下进行应用的前台运行。Step S805: Perform foreground operation of the application in the display mode after the switching.
通过本公开的实施例的显示模式切换方法,终端的系统可以自动地针对应用适配其支持的显示模式,保证了应用可以正常地显示,满足了某些应用需要采用特定显示模式进行显示的要求,整个过程不 需要人为的介入,在前台运行的应用关闭或转为后台运行时,又能自动恢复到用户设置的默认显示模式(待恢复的显示模式),从而大大提高了用户体验,增强了应用的显示质量,使得针对应用的差异化显示成为可能。Through the display mode switching method of the embodiment of the present disclosure, the system of the terminal can automatically adapt the display mode supported by the application to the application, ensuring that the application can be displayed normally, and meeting the requirement that certain applications need to adopt a specific display mode for display. The whole process does not require human intervention. When the application running in the foreground is closed or turned into the background, it can automatically restore to the default display mode set by the user (display mode to be restored), thereby greatly improving the user experience and enhancing. The display quality of the application makes it possible to differentiate the display for the application.
本公开的实施例还提供了一种存储介质,该存储介质可以存储用于执行以下步骤的程序代码:获取终端要前台运行的应用的信息,以及获取终端当前运行的显示模式作为第一显示模式;确定要前台运行的应用支持的显示模式作为第二显示模式;在第二显示模式不包括第一显示模式时,将终端的显示模式切换至第二显示模式。The embodiment of the present disclosure further provides a storage medium, which can store program code for performing the following steps: acquiring information of an application to be run by the terminal in the foreground, and acquiring a display mode currently running by the terminal as the first display mode. Determining a display mode supported by the application to be run in the foreground as the second display mode; and when the second display mode does not include the first display mode, switching the display mode of the terminal to the second display mode.
本实施例中,上述存储介质可以包括但不限于U盘、只读存储器(ROM,Read-Only Memory)、随机存取存储器(RAM,Random Access Memory)、移动硬盘、磁碟或者光盘等各种可以存储程序代码的介质。In this embodiment, the foregoing storage medium may include, but is not limited to, a U disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a mobile hard disk, a magnetic disk, or an optical disk. A medium that can store program code.
本实施例中的存储介质中存储的程序代码可由处理器执行。The program code stored in the storage medium in this embodiment can be executed by the processor.
通过本公开的实施例的显示模式切换方法、显示模式切换装置及终端,在要前台运行的应用支持的第二显示模式不包括当前运行的第一显示模式时,终端的显示模式可自动切换至第二显示模式。解决了相关技术中终端不能自动切换显示模式的技术问题,提高了用户体验,增强了应用的显示质量,实现了应用的差异化显示。With the display mode switching method, the display mode switching device, and the terminal of the embodiment of the present disclosure, when the second display mode supported by the application to be run in the foreground does not include the currently displayed first display mode, the display mode of the terminal can be automatically switched to The second display mode. The technical problem that the terminal can not automatically switch the display mode in the related art is solved, the user experience is improved, the display quality of the application is enhanced, and the differentiated display of the application is realized.
显然,本领域的技术人员应该明白,上述的本公开的各模块或各步骤可以通过通用的计算装置来实现,它们可以集中在单个计算装置上、或者可分布在多个计算装置所组成的网络上,它们可以通过计算装置可执行的程序代码来实现,从而,可以将它们存储在存储装置中并由计算装置来执行,在某些情况下,可以以不同于本公开的顺序执行所示出或描述的步骤,也可将本公开的各模块或各步骤分别制作成各个集成电路,或者将各模块或各步骤中的部分模块或步骤制作成单个集成电路。本公开不限制于任何特定的硬件和软件的结合。Obviously, those skilled in the art should understand that the above modules or steps of the present disclosure may be implemented by a general computing device, which may be centralized on a single computing device or may be distributed over a network composed of multiple computing devices. In the above, they may be implemented by program code executable by the computing device, such that they may be stored in the storage device and executed by the computing device, and in some cases may be performed in a different order than the present disclosure. Alternatively, the various modules or steps of the present disclosure may be fabricated as individual integrated circuits, or portions of the modules or steps may be fabricated into a single integrated circuit. The present disclosure is not limited to any particular combination of hardware and software.
所描述的实施例仅为示例性实施例,并不用于限制本公开的范围,对于本领域的技术人员来说,可以对本公开的实施例进行各种更改和变化。凡在本公开的构思范围之内,对本公开的实施例所作的任何修改、等同替换、变型等均应视为落入本公开的保护范围之内。The described embodiments are merely exemplary embodiments, and are not intended to limit the scope of the disclosure, and various modifications and changes can be made to the embodiments of the present disclosure. Any modifications, equivalents, variations, etc. to the embodiments of the present disclosure are considered to be within the scope of the present disclosure.

Claims (12)

  1. 一种显示模式切换方法,包括:A display mode switching method includes:
    获取终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;Obtaining, by the terminal, information about an application running in the foreground, and acquiring a display mode currently running by the terminal as the first display mode;
    确定所述应用支持的显示模式作为第二显示模式;以及Determining a display mode supported by the application as a second display mode;
    在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。When the second display mode does not include the first display mode, the display mode of the terminal is automatically switched to the second display mode.
  2. 根据权利要求1所述的方法,其中,获取终端要前台运行的应用的信息包括:The method according to claim 1, wherein the obtaining information of the application that the terminal wants to run in the foreground comprises:
    在所述终端的运行状态发生变化时,获取终端要前台运行的应用的信息。When the running state of the terminal changes, the information of the application that the terminal wants to run in the foreground is acquired.
  3. 根据权利要求2所述的方法,其中,所述终端的运行状态发生变化包括以下变化中的至少之一:The method of claim 2, wherein the change in the operational state of the terminal comprises at least one of the following changes:
    启动应用、关闭应用、将前台运行的应用切换到后台运行、将后台运行的应用切换到前台运行。Start the application, close the application, switch the application running in the foreground to the background, and switch the application running in the background to the foreground.
  4. 根据权利要求1所述的方法,其中,获取终端要前台运行的应用的信息包括:The method according to claim 1, wherein the obtaining information of the application that the terminal wants to run in the foreground comprises:
    在所述终端的任务栈中获取栈顶任务;Obtaining a stack top task in a task stack of the terminal;
    获取所述栈顶任务的活动栈中的最顶端的活动;以及Obtaining the topmost activity in the activity stack of the top-of-stack task;
    从所述活动栈中的最顶端的活动获取对应应用的信息。The information of the corresponding application is obtained from the topmost activity in the activity stack.
  5. 根据权利要求1所述的方法,其中,确定所述应用支持的第二显示模式包括:The method of claim 1, wherein determining the second display mode supported by the application comprises:
    通过黑名单或白名单确定所述应用支持的第二显示模式,其中,所述黑名单包括应用不支持的显示模式列表,所述白名单包括应用支持的显示模式列表。The second display mode supported by the application is determined by a blacklist or a whitelist, where the blacklist includes a display mode list that is not supported by the application, and the whitelist includes a display mode list supported by the application.
  6. 根据权利要求1所述的方法,还包括:The method of claim 1 further comprising:
    在所述第二显示模式不包括所述第一显示模式时,将所述第一显示模式设置为待恢复的显示模式。When the second display mode does not include the first display mode, the first display mode is set to a display mode to be restored.
  7. 根据权利要求6所述的方法,还包括:The method of claim 6 further comprising:
    在所述终端的运行状态再次发生变化时,将所述第二显示模式切换至所述第一显示模式。The second display mode is switched to the first display mode when the operating state of the terminal changes again.
  8. 根据权利要求1所述的方法,其中,The method of claim 1 wherein
    所述第一显示模式包括以下显示模式中的至少之一:单屏终端的分屏显示模式,双屏终端的单屏显示模式,双屏终端的双屏镜像显示模式,双屏终端的双屏拼接显示模式,双屏终端的双屏分屏显示模式;The first display mode includes at least one of the following display modes: a split screen display mode of a single screen terminal, a single screen display mode of a dual screen terminal, a dual screen mirror display mode of a dual screen terminal, and a dual screen of a dual screen terminal Splicing display mode, dual screen split screen display mode of dual screen terminal;
    所述第二显示模式包括以下显示模式中的至少之一:单屏终端的分屏显示模式,双屏终端的单屏显示模式,双屏终端的双屏镜像显示模式,双屏终端的双屏拼接显示模式,双屏终端的双屏分屏显示模式。The second display mode includes at least one of the following display modes: a split screen display mode of a single screen terminal, a single screen display mode of a dual screen terminal, a dual screen mirror display mode of a dual screen terminal, and a dual screen of a dual screen terminal Splicing display mode, dual-screen split-screen display mode of dual-screen terminal.
  9. 一种显示模式切换装置,包括:A display mode switching device includes:
    获取模块,配置为获取终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;Obtaining a module, configured to acquire information about an application that the terminal wants to run in the foreground, and obtain a display mode in which the terminal is currently running as the first display mode;
    确定模块,配置为确定所述应用支持的显示模式作为第二显示模式;以及a determining module configured to determine a display mode supported by the application as a second display mode;
    切换模块,配置为在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。And a switching module configured to automatically switch the display mode of the terminal to the second display mode when the second display mode does not include the first display mode.
  10. 根据权利要求9所述的装置,还包括:The apparatus of claim 9 further comprising:
    设置模块,配置为在所述第二显示模式不包括所述第一显示模式时,将所述第一显示模式设置为待恢复的显示模式。And a setting module configured to set the first display mode to a display mode to be restored when the second display mode does not include the first display mode.
  11. 一种终端,包括处理器以及存储有所述处理器可执行的指令的存储器,所述指令被处理器执行时,执行如下操作:A terminal includes a processor and a memory storing instructions executable by the processor, the instructions being executed by the processor, performing the following operations:
    获取所述终端要前台运行的应用的信息,以及获取所述终端当前运行的显示模式作为第一显示模式;Obtaining, by the terminal, information about an application running in the foreground, and acquiring a display mode currently running by the terminal as the first display mode;
    确定所述应用支持的显示模式作为第二显示模式;以及Determining a display mode supported by the application as a second display mode;
    在所述第二显示模式不包括所述第一显示模式时,自动将所述终端的显示模式切换至所述第二显示模式。When the second display mode does not include the first display mode, the display mode of the terminal is automatically switched to the second display mode.
  12. 一种计算机可读存储介质,包括存储的程序,所述程序被运行时执行如权利要求1至8中任一项所述的方法。A computer readable storage medium comprising a stored program, the program being executed to perform the method of any one of claims 1 to 8.
PCT/CN2018/108634 2017-09-30 2018-09-29 Display mode switching method and apparatus, terminal and storage medium WO2019062912A1 (en)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201710945145.2A CN108205411A (en) 2017-09-30 2017-09-30 Display changeover method and device, terminal
CN201710945145.2 2017-09-30

Publications (1)

Publication Number Publication Date
WO2019062912A1 true WO2019062912A1 (en) 2019-04-04

Family

ID=62603963

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2018/108634 WO2019062912A1 (en) 2017-09-30 2018-09-29 Display mode switching method and apparatus, terminal and storage medium

Country Status (2)

Country Link
CN (1) CN108205411A (en)
WO (1) WO2019062912A1 (en)

Families Citing this family (15)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108205411A (en) * 2017-09-30 2018-06-26 中兴通讯股份有限公司 Display changeover method and device, terminal
CN109271122B (en) * 2018-09-03 2022-07-01 高新兴科技集团股份有限公司 File display method, device and equipment based on double display screens
CN109327610A (en) * 2018-09-21 2019-02-12 Oppo(重庆)智能科技有限公司 Display control method and relevant apparatus
CN109710135A (en) * 2018-12-29 2019-05-03 努比亚技术有限公司 Split screen display available control method, terminal and computer readable storage medium
CN110049181A (en) * 2019-02-28 2019-07-23 努比亚技术有限公司 Using display control method, terminal and computer readable storage medium
CN110072012B (en) * 2019-04-28 2021-11-09 维沃移动通信有限公司 Reminding method for screen state switching and mobile terminal
CN112181329B (en) * 2019-07-04 2023-08-04 杭州海康威视系统技术有限公司 Data display method and device
CN111147659A (en) * 2019-11-11 2020-05-12 珠海格力电器股份有限公司 Display control method and device, electronic equipment and storage medium
CN112346685B (en) * 2020-10-26 2022-07-01 努比亚技术有限公司 Screen-off and screen-projection control method and device and computer readable storage medium
CN112596883B (en) * 2020-12-25 2023-10-24 深圳市欢太科技有限公司 Application switching method and device, storage medium and electronic equipment
CN112748832B (en) 2021-01-19 2022-11-22 联想(北京)有限公司 Information processing method, information processing device, electronic equipment and storage medium
CN114968144A (en) * 2021-02-27 2022-08-30 华为技术有限公司 Splicing display method, electronic equipment and system
CN114217763B (en) * 2022-02-22 2022-05-20 麒麟软件有限公司 Window double-screen cooperative display method compatible with Android application on Linux
CN116723256A (en) * 2022-02-28 2023-09-08 荣耀终端有限公司 Display method of electronic equipment with folding screen
CN116954542B (en) * 2023-09-18 2024-03-08 荣耀终端有限公司 Display method and electronic equipment

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648694A (en) * 2016-12-30 2017-05-10 深圳超多维科技有限公司 Display switching method, device, electronic device and computer readable storage medium
CN108205411A (en) * 2017-09-30 2018-06-26 中兴通讯股份有限公司 Display changeover method and device, terminal

Family Cites Families (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101102358A (en) * 2006-07-07 2008-01-09 乐金电子(昆山)电脑有限公司 Processing method for display mode of portable terminal
US20110157322A1 (en) * 2009-12-31 2011-06-30 Broadcom Corporation Controlling a pixel array to support an adaptable light manipulator
US9075612B2 (en) * 2013-05-10 2015-07-07 Jinrong Yang System and method for managing display power consumption
CN104679467B (en) * 2013-11-29 2017-12-29 联想(北京)有限公司 A kind of display mode switching method and electronic equipment
US9946373B2 (en) * 2014-07-31 2018-04-17 Dell Products, Lp System and method for using single-display application programs on a multi-display device
CN105446680A (en) * 2015-11-11 2016-03-30 上海斐讯数据通信技术有限公司 Screen mirroring and extension methods and systems and terminal device
CN106502647A (en) * 2016-09-27 2017-03-15 深圳市金立通信设备有限公司 A kind of method of split screen application compatible processing and terminal
CN107102800A (en) * 2017-03-28 2017-08-29 联想(北京)有限公司 The display methods of message and the electronic equipment for showing message

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106648694A (en) * 2016-12-30 2017-05-10 深圳超多维科技有限公司 Display switching method, device, electronic device and computer readable storage medium
CN108205411A (en) * 2017-09-30 2018-06-26 中兴通讯股份有限公司 Display changeover method and device, terminal

Also Published As

Publication number Publication date
CN108205411A (en) 2018-06-26

Similar Documents

Publication Publication Date Title
WO2019062912A1 (en) Display mode switching method and apparatus, terminal and storage medium
US10324707B2 (en) Method, apparatus, and computer-readable storage medium for upgrading a ZigBee device
US20150333971A1 (en) Method and device for managing processes of application program
EP3073379B1 (en) Firmware recovery method, device and terminal
EP3532925B1 (en) Electronic device and method for displaying history of executed application thereof
US11934848B2 (en) Control display method and electronic device
RU2641257C2 (en) Device management method and device
US20170105131A1 (en) Electronic device and method for implementing service thereof
US20160105540A1 (en) Apparatus and method for displaying user interface
AU2017219385A1 (en) Electronic device and method of application data display therefor
RU2628246C2 (en) Upgrade method, apparatus and device
KR102276272B1 (en) Apparatas and method for adding a homescreen page in an electronic device
EP2755411A1 (en) Apparatus and method for providing integrated device information on a wireless device supporting a first and a second type of wireless communication
EP3211527A1 (en) Multi-screen sharing based application management method and device, and storage medium
KR102294040B1 (en) Method and apparatus for transmitting and receiving data
EP2784661B1 (en) Computer program product, information processing method, and information processing apparatus
CN110430604B (en) Network control method, system, electronic equipment and storage medium
US20160308768A1 (en) Electronic device and method for operating communication of the same
CN107577472B (en) Software installation method and device and computer readable storage medium
US11368360B2 (en) Electronic device, and software setting method based on subscriber identity module in electronic device
CN103813117A (en) Image output system and image signal generation apparatus
KR20150138742A (en) Method for processing contents and electronic device thereof
KR20180020401A (en) Method for controlling communication network connection, storage medium and electronic device therefor
CN104424333A (en) Method and system for loading table data
US8812293B2 (en) Apparatus and method for changing language in mobile communication terminal

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 18862448

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

32PN Ep: public notification in the ep bulletin as address of the adressee cannot be established

Free format text: NOTING OF LOSS OF RIGHTS PURSUANT TO RULE 112(1) EPC (EPO FORM 1205A DATED 07.09.2020)

122 Ep: pct application non-entry in european phase

Ref document number: 18862448

Country of ref document: EP

Kind code of ref document: A1