WO2016150325A1 - 分屏运行应用的方法及装置 - Google Patents

分屏运行应用的方法及装置 Download PDF

Info

Publication number
WO2016150325A1
WO2016150325A1 PCT/CN2016/076567 CN2016076567W WO2016150325A1 WO 2016150325 A1 WO2016150325 A1 WO 2016150325A1 CN 2016076567 W CN2016076567 W CN 2016076567W WO 2016150325 A1 WO2016150325 A1 WO 2016150325A1
Authority
WO
WIPO (PCT)
Prior art keywords
split screen
application
page
mark
split
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Ceased
Application number
PCT/CN2016/076567
Other languages
English (en)
French (fr)
Inventor
颜伟民
盛春冬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Alibaba Group Holding Ltd
Original Assignee
Alibaba Group Holding Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Alibaba Group Holding Ltd filed Critical Alibaba Group Holding Ltd
Publication of WO2016150325A1 publication Critical patent/WO2016150325A1/zh
Anticipated expiration legal-status Critical
Ceased legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING OR CALCULATING; 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

Definitions

  • the present application relates to the field of software technologies, and in particular, to a method and an apparatus for split screen operation applications.
  • the architecture of electronic devices such as mobile phones and tablet computers generally includes: hardware, operating system, framework layer, and application layer.
  • the framework layer is mainly responsible for receiving user input events, processing, and feeding back the results of the processing to the user in the form of text, images, sounds, vibrations, and the like.
  • existing framework layers typically use the same stack to manage data for all applications, making it difficult to distinguish between different split screens, so on the same screen Only one application can get focus, receive user input events, and interact with the user; while other applications run in the background and cannot interact with the user.
  • the prior art has some split screen technical solutions, mainly by modifying the data structure of the framework layer, and changing the data structure originally using the same stack for data management to the data structure for managing different split screen data by using different stacks, so that To achieve multi-tasking multi-window operation in the same screen.
  • aspects of the present application provide a method and apparatus for running a split screen application, which is used to implement a split screen running application without modifying the data structure of the framework layer.
  • An aspect of the present application provides a method for running a split screen application, including:
  • the application is run on a split screen according to the split screen mark.
  • an apparatus for operating a split screen including:
  • a receiving module configured to receive a split screen instruction for instructing the split screen to run the application
  • a marking module configured to set a split screen mark for the application according to the split screen instruction
  • a split screen module configured to run the application in a split screen according to the split screen mark.
  • a split screen instruction for instructing a split screen running application is received, and according to the split screen instruction, a split screen mark is set for the application, and the application is run by the split screen according to the split screen mark. Since the application that needs to be split screen can be marked by the split screen mark, the data structure of the stack layer change stack can be modified, and the purpose of running the application on the split screen can be achieved.
  • FIG. 1 is a schematic flowchart of a method for running a split screen application according to an embodiment of the present application
  • FIG. 2 is a schematic diagram of a sidebar according to an embodiment of the present application.
  • FIG. 3 is a schematic diagram of a split screen preview interface according to an embodiment of the present application.
  • FIG. 4 is a schematic diagram of a data structure of an AMS according to an embodiment of the present application.
  • FIG. 5 is a schematic diagram of a data structure of a WMS according to an embodiment of the present application.
  • Figure 6a is an overall UML diagram provided by an embodiment of the present application.
  • 6b is a schematic flowchart of a split screen running application implemented by using a UML diagram according to an embodiment of the present disclosure
  • FIG. 7 is a schematic structural diagram of an apparatus for running a split screen according to an embodiment of the present application.
  • FIG. 1 is a schematic flowchart diagram of a method for running a split screen application according to an embodiment of the present application.
  • the method can be performed by the framework layer, but is not limited thereto. As shown in Figure 1, the method includes:
  • a split screen command may be issued to instruct the split screen to run the application. This embodiment does not limit the manner in which the split screen command is issued.
  • a split screen launch entry can be provided to the user for the user to issue a launch command for launching the application, and the launch command issued by the split screen launch entry actually instructs the split screen to run the application.
  • the above-mentioned split screen instruction may specifically be a start command issued by the user through the split screen start entry for starting the application.
  • the above-mentioned split-screen boot entry can have various implementations, such as a sidebar application set on the screen.
  • the left part of the screen shown in FIG. 2 is a sidebar in which icons of various applications supporting split screen operation, such as icons of applications such as notes, videos, albums, information, and browsers, are preset in advance.
  • icons of various applications supporting split screen operation such as icons of applications such as notes, videos, albums, information, and browsers, are preset in advance.
  • the user can issue a start command for instructing the split screen to run the application by dragging an application's icon onto the home screen (the right portion in FIG. 2).
  • the user can also operate an icon of an application in the sidebar by clicking, touching, hovering, etc., thereby implementing a startup instruction for instructing the split screen to run the application through the sidebar.
  • the split screen startup portal may be a split screen preview interface
  • the split screen preview interface may be one or more.
  • the two solid line boxes on the main screen are split screen preview interfaces.
  • the user can call up or hide the split screen preview interface by long pressing the Home button, or the user can press or hold the power button or volume adjustment button to call up or hide the split screen preview interface.
  • the long press of various buttons can be distinguished from the existing long press operation by long press time.
  • the user can drag an icon of an application to the split screen preview interface, so that a startup instruction for instructing the split screen to run the application is sent through the split screen preview interface.
  • the user can click on the add symbol on the split screen preview interface, such as “+”, to add an application to the split screen preview interface, thereby enabling the launch of the application to be indicated by the split screen preview interface for instructing the split screen to run the application. instruction.
  • API application program interface
  • context.startActivity is used to start a page (Activity).
  • the framework layer can set a split screen mark for the application that needs to be split screen according to the split screen instruction.
  • the split screen mark can identify that the application needs to be split screen, and on the other hand, can be combined with other Split screens are distinguished.
  • the framework layer is mainly responsible for interacting with the user and is responsible for processing the user interface, the framework layer sets the split screen markup for the application, which is actually setting the split screen mark for the data of the application layer in the framework layer, so that it can be understood
  • the application needs to be split screen and the split screen corresponding to the application can be distinguished from other split screens.
  • the framework layer manages the application through a task list (TaskRecord). Based on this, the framework layer sets the split screen markup for the application according to the split screen instruction, including: according to the split screen instruction, in the application program A split screen mark is set in the task list, and the task list corresponds to a page that the application needs to display on a split screen. That is, through the task list, it is possible to determine the page that the application needs to display in a split screen.
  • a task list can store an application's page record (ActivityRecord).
  • ActivityRecord also has only the framework layer, which is used to store the basic information of the page that the application needs to display on a split screen.
  • the basic information of the page generally includes: the name of the page, the identifier of the application to which the page belongs, and the like.
  • the AMS includes a page stack manager (ActivityStackSuperVior), and the ActivityStackSuperVior is managed by the page stack (ActivityStack).
  • ActivityStackSuperVior the ActivityStackSuperVior is managed by the page stack (ActivityStack).
  • TaskRecord each TaskRecord includes multiple ActivityRecord, that is, each ActivityRecord belongs to a TaskRecord, each ActivityRecord is responsible for managing an application's page (Activity), that is, the application's internal Activity has an ActivityRecord.
  • the WMS includes a task stack (TaskStack), and the TaskStack includes a plurality of tasks (Tasks), and each Task corresponds to a plurality of application window tokens (AppWindowToken).
  • the task stack in the WMS corresponds to the page stack (ActivityStack) in the AMS shown in Figure 4, and the two and their substructures are kept in sync. That is to say, the data structures in the WMS and the AMS are correspondingly related.
  • the TaskRecord in the AMS corresponds to the Task in the WMS
  • the ActivityRecord in the AMS corresponds to the AppWindowToken in the WMS.
  • the mTasks of the TaskStack in the WMS need to be consistent with the mTaskHistory order of the ActivityStack in the AMS.
  • the above ActivityRecord is mainly used to describe a single Activity, which is the basic unit in ActivityStack; the ActivityRecord IBinder object can be expressed as ActivityRecord::Token, which can be regarded as the local handle of the remote object, which can be used for LPC and can be used as a unique identifier in the mapping. (unique ID), often dual-use.
  • the mActivities in the above TaskRecord are a list of ActivityRecords, which are sorted in historical order. ActivityRecord is managed indirectly through the TaskRecord layer.
  • the above ActivityStackSupervisor is the manager of the ActivityStack.
  • the TaskRecord can be used to identify an application, and the split screen mark is set in the TaskRecord to achieve the purpose of marking and distinguishing the split screen of the application.
  • the pages that the application needs to display on a split screen generally include a first page (main activity) and a non-first page.
  • the front page refers to the first page to be displayed.
  • the process of setting up split screen markers in the application's task list will vary depending on the type of page you want to split.
  • a specific implementation of setting a split screen mark includes:
  • the page that needs to be displayed on the split screen is the first page, since it is the first page of the application, there is no task linked list, so it is necessary to create a task linked list for the first page, and obtain a split screen mark according to the split screen instruction.
  • the screen mark is set in the created task list; in addition, a page linked list is created for the first page, the page linked list is located in the task linked list, and basic information of the first page needs to be stored in the page linked list;
  • the existing task linked list may be a task linked list corresponding to the first page, or may be a task linked list that does not previously share the non-first page of the task linked list with the first page, and obtain a split screen mark, and set the split screen mark in the new task linked list.
  • a page linked list is also created for the non-first page, the page linked list is located in the created new task linked list, and the basic information of the non-first page needs to be stored in the page linked list; if the non-first page and the first page In the shared task list, since the split screen mark already exists in the task list corresponding to the first page, only the page linked list is created for the non-first page, and the basic information of the non-first page is stored in the page linked list.
  • the split screen flag may be included in the split screen command.
  • obtaining the split screen mark may specifically: obtaining the split screen mark from the split screen command.
  • an intent message may be sent by calling the context.startActivity interface, and a split screen mark is added to the message.
  • the split screen command does not carry the split screen mark, but the frame layer itself generates a split screen mark for different applications according to the split screen instruction.
  • the framework layer directly uses the split-screen instructions as split screen markers.
  • the framework layer can know that the application needs to be divided into screens according to the split screen mark, and the application can be corresponding to other applications.
  • the split screens are separated to achieve the purpose of running the application in split screen.
  • the framework layer runs the application according to the split screen mark
  • the split screen is configured to: set the split screen parameter of the split screen window for the application according to the split screen mark, where the split screen parameter is mainly used to indicate the score
  • the size and position of the screen window may include information such as the coordinates, width, and height of the upper left corner of the split screen window on the entire screen; and the split screen parameters of the split screen window are provided to the application to supply the program.
  • the split screen parameter the page that needs to be displayed by the split screen is displayed in the split screen window.
  • the value of the split screen mark may be preset, and different values correspond to different split screen numbers.
  • the split screen mark has a value of 2, which means that it needs to be divided into two screens; A value of 3 means that it needs to be divided into three screens; a split screen marker has a value of 4, which means that 4 screens need to be split.
  • the usage mode of each screen can also be preset.
  • an implementation manner of setting a split screen parameter for a split screen window according to a split screen mark includes: dividing the entire screen into at least two sub screens according to the split screen mark, specifically, according to the split screen mark The value determines the number of divided sub-screens; determines the target sub-screen where the application's split-screen window is located; and sets the split-screen parameters of the split-screen window according to the screen parameters of the target sub-screen.
  • the order of use of the sub-screens is preset, and the sub-screen in which the split screen window corresponding to the current application is located is determined according to the order of use.
  • the sub-screen with the location may be randomly selected as the sub-screen where the split screen window corresponding to the current application is located. It is worth noting that the screen parameters of the sub-screen are mainly used to indicate the size and position of the sub-screen.
  • the framework layer may specifically send a first message to the application to notify the application to prepare a page that needs to be displayed by the split screen; send a second message to the application, where the second message includes
  • the split screen parameter of the split screen window determines the split screen window by the application program; for the application, the first message sent by the frame layer is received, and the page that needs to be displayed by the screen is prepared according to the first message, and is received by the frame layer.
  • the second message obtains the split screen parameter from the second message, determines the position of the split screen window on the screen according to the split screen parameter, and further sends a message to the frame layer to notify the frame layer after preparing the page that needs to be displayed by the split screen.
  • the page is prepared; after receiving the message sent by the application for notifying the prepared page, the framework layer sends a third message to the application to instruct the application to display the prepared page in the split screen window.
  • each Activity of the application is associated with a Window object.
  • the inheritance class of this Window object is com.android.internal.policy.impl.PhoneWindow, and the inheritance of the Window object.
  • the class provides a setAttributes(WindowManager.LayoutPrams) method, which can make some settings for the Activity property. For example, you can set the top left corner coordinates (x, y), width (width), height (height), etc. in the Activity property. parameter.
  • the application can call this method to set the coordinates, width and height of the upper left corner of the Activity, so that an Activity only occupies the area where the split screen window is located, and let other activities occupy the rest of the screen, so that the application can be ready.
  • the page is displayed in the split screen window, which realizes the purpose of the application split screen operation.
  • the application may need to display various dialogs in addition to displaying the page in a split screen.
  • the framework layer can also display the application's dialog box in the corresponding split screen window of the application.
  • the application needs to display the dialog box, it is determined that the dialog box is associated with the currently displayed page of the split screen window; according to the split screen parameter of the split screen window, the size of the dialog box and the popup position are determined; according to the size of the dialog box and The pop-up position pops up a dialog box on the split screen window.
  • the size of the corresponding window container (container) of the dialog box can be limited to the size of the associated split screen window, and the maximum size of the dialog box can only be displayed as the size of the window container, which can be smaller than the window container. If the dialog box is smaller, then The normal display does not fill the window container.
  • a full screen mode may be adopted to improve screen utilization. Based on this, before setting the split screen markup for the application, it can be judged whether the application is the first running application, and if the judgment result is yes, it is prohibited to set the split screen mark in the task list, thereby prohibiting setting for the application.
  • Split screen mark if the judgment result is no, the split screen mark is set to the task list, so as to achieve the purpose of running the application by split screen. It should be noted that, in the case that the judgment result is negative, it is also required to send a message including the split screen parameters corresponding to the other already running applications to other already running applications, so that other applications according to the split screen parameters. Display the pages that need to be displayed in other split screens corresponding to other applications.
  • the embodiment receives the split screen instruction for indicating the split screen running application, sets the split screen mark for the application according to the split screen instruction, and runs the application program according to the split screen mark. Since the application that needs to be split screen can be marked by the split screen mark, the data structure of the frame layer does not need to be modified, so that the application of the split screen running application can be achieved. In addition, by controlling the size and position of the split screen window corresponding to a single page, there is greater freedom, which makes the split screen scheme more flexible.
  • UML Unified Modeling Language
  • the UML diagram of the present application includes an application portion, a split screen entry portion, and a framework layer.
  • the application part includes: component adjuster (ActivityThread), window adjuster (WindowScalor) and page (Activity), WindowScalor is a tool to control Activity zoom; split screen entry part includes: multi-window controller (MultiWindowController), multi-window management MultiWindowManager and MultiWindowManagerService; the framework layer includes: StackManager (ActivityStackSuperVior), Activity Stack, TaskRecord, ActivityRecord, and Floating Window Layer (FloatWindowLayor).
  • Figure 6b shows the flow of a split-screen running application based on a UML diagram. A detailed description of the process is as follows:
  • the user invokes the context.startActivity interface provided by the Android system through the split-screen startup portal on the terminal device (for example, the sidebar or the split-screen preview interface) to the framework layer in the Android system (the framework layer here mainly refers to the image in FIG. 6b).
  • ActivityStackSuperVior sends an intent message, and adds a split screen mark to the intent message, which is marked as a flag, and is used to instruct the split screen to run the application while issuing an instruction to launch the application to the framework layer.
  • the framework layer After receiving the intent message transmitted by the context.startActivity interface, the framework layer enters the startup page (StartActivityLocked) process, and needs to determine whether the flag in the intent message needs to be removed, so that it is determined whether the flag in the intent message needs to be removed.
  • the process can be recorded as startActivityUncheckedLocked.
  • This operation mainly has the ActivityStackSuperVior in Figure 6b indicating the ActivityStack to complete. It is worth noting that the "Locked" in the above process is only to indicate that the method flow is thread-safe, and Locked itself has no specific meaning.
  • the framework layer determines whether to remove the flag (removeFloatFlagIfNeeded) according to whether the application is the first application to run, and if it is the first application to run, it needs to be removed if It is not the first application to request to run, it will not be removed. If you need to enter the full screen state, the page blocked by the desktop will be cleared (finishNoneFloatAcitivityUnderHome) to run the application in full screen. If it is necessary to enter the split screen state, it is determined that the split screen parameter of the split screen window needs to be set according to the flag. So, enter the default process of starting the Activity in the framework layer.
  • ActivityStack determines whether to remove the flag (removeFloatFlagIfNeeded) according to whether the application is the first application to run, and if it is the first application to run, it needs to be removed if It is not the first application to request to run, it will not be removed. If you need to enter the full screen state, the page blocked by the desktop will be cleared (finishN
  • the constructor of the TaskRecord will fetch the data from the intent message. Since the intent message contains the split-screen flag, ie flag, it will get the flag and save it to Inside TaskRecord, the TaskRecord will be marked as needing to be split.
  • the ActivityStack will instruct the ActivitySupervisor to enter the RealStartActivityLocked process of the ActivitySupervisor.
  • the framework layer requests the application to prepare the page to be displayed, specifically sending the first message to the application to request the application to prepare the page to be displayed; further, sending the second message to the application, passing the second message Passing the split screen parameter of the split screen window to the application, and determining the split screen window by the application program; when the application prepares the page, sending a notification message to the framework layer, and the framework layer receives the notification After the message, a third message is sent to the application to instruct the application to display the prepared page in the split screen window. For the application, after receiving the third message, you can set the size of the main Activity to make it suitable for the split-screen window. This process can be mainly completed by the ActivitySupervisor, ActivityRecord, ActivityThread, WindowScalor and Activity in Figure 6b.
  • the application can call FloatWindowLayor.layoutActivityRecord() to construct a LayoutParams object and assign values to the top left corner coordinates (x, y), width (width), height (height) of the LayoutParams object.
  • FloatWindowLayor.layoutActivityRecord() the main function of FloatWindowLayor.layoutActivityRecord() is to set the location of the main Activity and specifically position it to the split screen window. Then, the application calls the setAttributes(WindowManager.LayoutPrams) method of the main Activity to set the properties of the main Activity.
  • the realStartActivityLocked process can be directly executed, and in the realStartActivityLocked process, the application will also set the non-main Activit to The same size as the main Activity.
  • the non-main Activity For a non-main Activity, if the non-main Activity does not share the same TaskRecord with the main Activity, you need to find out whether there is already a TaskRecord corresponding to the other Activity of the application. Specifically, you can determine whether the package name (packageName) corresponding to the TaskRecord exists with the application. The package name is the same. If it exists, the flag in the TaskRecord is set to the current non-main Activity TaskRecord, ensuring that the non-main Activity and the main Activity correspond to the same flag. After that, enter the realStartActivityLocked process, and in the realStartActivityLocked process, the application will also set the non-main Activit to the same size as the main Activity.
  • packageName package name
  • the present application runs the application by split screen according to the split screen mark by setting a split screen mark for the application. Since the application that needs to be split screen can be marked by the split screen mark, the data structure of the frame layer does not need to be modified, so that the application of the split screen running application can be achieved.
  • FIG. 7 is a schematic structural diagram of an apparatus for running a split screen according to an embodiment of the present application. As shown in FIG. 7, the device includes a receiving module 71, a marking module 72, and a split screen module 73.
  • the receiving module 71 is configured to receive a split screen instruction for indicating a split screen running application
  • a marking module 72 configured to set a split screen mark for the application according to the split screen instruction
  • the split screen module 73 is configured to run the application in a split screen according to the split screen mark.
  • the marking module 72 is specifically configured to:
  • a split screen mark is set in the application's task list, and the task list corresponds to a page that the application needs to display on a split screen.
  • the marking module 72 is specifically configured to:
  • a task linked list is created for the first page, and according to the split screen instruction, the split screen mark is obtained, and the split screen mark is set in the task linked list;
  • the marking module 72 is specifically configured to:
  • a split screen mark is generated according to the split screen command.
  • the split screen module 73 is specifically configured to:
  • the split screen parameters are provided to the application, and the application program displays the page in the split screen window according to the split screen parameters.
  • the split screen module 73 is specifically configured to:
  • the second message includes a split screen parameter, and the application program determines the split screen window
  • a third message is sent to the application to instruct the application to display the page in the split screen window.
  • the split screen module 73 is specifically configured to:
  • the split screen module 73 is further configured to:
  • the application's dialog box is displayed in the split screen window.
  • the split screen module 73 is specifically configured to:
  • the determination dialog box is associated with the currently displayed page of the split screen window
  • a dialog box pops up in the split screen window.
  • the apparatus of this embodiment further includes: a determining module, configured to determine whether the application is the first running application; if the determination result is yes, the prohibiting marking module sets the split screen flag to the task linked list If the result of the determination is no, the trigger tag module sets the split screen tag to the task list.
  • the split screen command is a startup command sent by the user through the split screen startup entry to start the application.
  • the device provided in this embodiment receives a split screen instruction for instructing a split screen running application, and sets a split screen mark for the application according to the split screen instruction, and runs the application program according to the split screen mark. Since the application that needs to be split screen can be marked by the split screen mark, the data structure of the frame layer does not need to be modified, so that the application of the split screen running application can be achieved.
  • the disclosed system, apparatus, and method may be implemented in other manners.
  • the device embodiments described above are merely illustrative.
  • the division of the unit is only a logical function division.
  • there may be another division manner for example, multiple units or components may be combined or Can be integrated into another system, or some features can be ignored or not executed.
  • the mutual coupling or direct coupling or communication connection shown or discussed may be an indirect coupling or communication connection through some interface, device or unit, and may be in an electrical, mechanical or other form.
  • the units described as separate components may or may not be physically separated, and the components displayed as units may or may not be physical units, that is, may be located in one place, or may be distributed to multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of the embodiment.
  • each functional unit in each embodiment of the present invention may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit.
  • the above integrated unit can be implemented in the form of hardware or in the form of hardware plus software functional units.
  • the above-described integrated unit implemented in the form of a software functional unit can be stored in a computer readable storage medium.
  • the above software functional unit is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device, etc.) or a processor to perform the methods of the various embodiments of the present invention. Part of the steps.
  • the foregoing storage medium includes: a U disk, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk, or an optical disk, and the like, which can store program codes. .

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Human Computer Interaction (AREA)
  • Physics & Mathematics (AREA)
  • General Engineering & Computer Science (AREA)
  • General Physics & Mathematics (AREA)
  • User Interface Of Digital Computer (AREA)
  • Stored Programmes (AREA)

Abstract

本申请提供一种分屏运行应用的方法及装置。方法包括:接收用于指示分屏运行应用程序的分屏指令;根据所述分屏指令,为所述应用程序设置分屏标记;根据所述分屏标记,分屏运行所述应用程序。本申请可以在不修改框架层的数据结构的基础上,实现分屏运行应用的目的。

Description

分屏运行应用的方法及装置
本申请要求2015年03月26日递交的申请号为201510135127.9、发明名称为“分屏运行应用的方法及装置”的中国专利申请的优先权,其全部内容通过引用结合在本申请中。
技术领域
本申请涉及软件技术领域,尤其涉及一种分屏运行应用的方法及装置。
背景技术
目前,手机、平板电脑等电子设备的架构一般包括:硬件、操作系统、框架层、应用层。框架层主要负责接收用户的输入事件、进行处理以及将处理的结果通过文字、图像、声音、震动等形式反馈给用户。随着电子设备的处理能力越来越强,电子设备可以支持多个应用同时工作,但是现有框架层一般使用同一堆栈管理所有应用的数据,导致较难区分不同分屏,所以在同一屏幕上只有一个应用可以获得焦点,能够接收用户的输入事件,和用户交互;而其他应用在后台运行,无法和用户交互。现有技术存在一些分屏技术方案,主要是通过对框架层的数据结构进行修改,将原来使用同一堆栈进行数据管理的数据结构,改成使用不同堆栈分别管理不同分屏数据的数据结构,以便于实现同屏多任务多窗口运行。
上述实现多任务多窗口运行的方案需要对堆栈的数据结构进行修改,工作量较大,实现起来较为困难,且很容易引入新的漏洞(bug)。针对该问题,亟需一种不用改动堆栈的数据结构即可分屏运行应用的方案。
发明内容
本申请的多个方面提供一种分屏运行应用的方法及装置,用以在不修改框架层的数据结构的基础上,实现分屏运行应用的目的。
本申请的一方面,提供一种分屏运行应用的方法,包括:
接收用于指示分屏运行应用程序的分屏指令;
根据所述分屏指令,为所述应用程序设置分屏标记;
根据所述分屏标记,分屏运行所述应用程序。
本申请的另一方面,提供一种分屏运行应用的装置,包括:
接收模块,用于接收用于指示分屏运行应用程序的分屏指令;
标记模块,用于根据所述分屏指令,为所述应用程序设置分屏标记;
分屏模块,用于根据所述分屏标记,分屏运行所述应用程序。
在本申请中,接收用于指示分屏运行应用程序的分屏指令,根据该分屏指令,为应用程序设置分屏标记,根据分屏标记,分屏运行应用程序。由于通过分屏标记可以标记出需要分屏运行的应用程序,所以不需要修改框架层改动堆栈的数据结构,便可以达到分屏运行应用程序的目的。
附图说明
为了更清楚地说明本发明实施例中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作一简单地介绍,显而易见地,下面描述中的附图是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动性的前提下,还可以根据这些附图获得其他的附图。
图1为本申请一实施例提供的分屏运行应用的方法的流程示意图;
图2为本申请一实施例提供的侧边栏的示意图;
图3为本申请一实施例提供的分屏预览界面的示意图;
图4为本申请一实施例提供的AMS的数据结构示意图;
图5为本申请一实施例提供的WMS的数据结构示意图;
图6a为本申请一实施例提供的整体UML图;
图6b为本申请一实施例提供的基于UML图实现的分屏运行应用程序的流程示意图;
图7为本申请一实施例提供的分屏运行应用的装置的结构示意图。
具体实施方式
为使本发明实施例的目的、技术方案和优点更加清楚,下面将结合本发明实施例中的附图,对本发明实施例中的技术方案进行清楚、完整地描述,显然,所描述的实施例是本发明一部分实施例,而不是全部的实施例。基于本发明中的实施例,本领域普通技术人员在没有作出创造性劳动前提下所获得的所有其他实施例,都属于本发明保护的范围。
针对现有技术存在的问题,本申请提供一种分屏运行应用的方法,可以在不修改堆栈的数据结构的基础上,实现分屏运行应用程序的目的。图1为本申请一实施例提供的分屏运行应用的方法的流程示意图。该方法可由框架层来执行,但不限于此。如图1所示,该方法包括:
101、接收用于指示分屏运行应用程序的分屏指令。
102、根据上述分屏指令,为应用程序设置分屏标记。
103、根据上述分屏标记,分屏运行应用程序。
在本实施例中,当需要分屏运行应用程序时,可以发出分屏指令,用来指示分屏运行应用程序。本实施例对发出分屏指令的方式不做限定。
例如,可以向用户提供一分屏启动入口,用于供用户发出用于启动应用程序的启动指令,通过该分屏启动入口发出的启动指令,实际上指示分屏运行该应用程序。基于此,上述分屏指令具体可以是用户通过分屏启动入口发出的用于启动应用程序的启动指令。
上述分屏启动入口可以有各种实现方式,例如可以是设置于屏幕上的侧边栏应用。如图2所示屏幕的左侧部分为侧边栏,在该侧边栏中预先设置有支持分屏运行的各种应用的图标,例如便签、视频、相册、信息和浏览器等应用的图标。例如,通过点击图2中侧边栏的圆弧可以隐藏或显示侧边栏,或长时间不操作已显示的侧边栏会动态自己隐藏,只保留圆弧在主屏幕上,但不限于这种方式。例如,还可以通过操作各种物理键来显示或隐藏侧边栏。
例如,用户可以通过拖动某个应用的图标至主屏幕(图2中的右侧部分)上,从而实现通过该侧边栏发出用于指示分屏运行该应用的启动指令。或者,用户也可以通过点击、触控、悬停等方式操作侧边栏中某个应用的图标,从而实现通过该侧边栏发出用于指示分屏运行该应用的启动指令。
或者,上述分屏启动入口可以是分屏预览界面,分屏预览界面可以是一个或多个。如图3所示,主屏幕上的两个实线框为分屏预览界面。例如,用户可以通过长按Home按钮调出或隐藏分屏预览界面,或者用户可以通过长按开机键或音量调节键调出或隐藏分屏预览界面。值得说明的是,这里长按各种按键的操作可以通过长按时间与已有长按操作相区分。
例如,用户可以通过拖动某个应用的图标至分屏预览界面上,从而实现通过该分屏预览界面发出用于指示分屏运行该应用的启动指令。或者,用户可以点击分屏预览界面上的添加符号,如“+”,来添加某个应用到分屏预览界面上,从而实现通过该分屏预览界面发出用于指示分屏运行该应用的启动指令。
以Android系统为例,无论是侧边栏还是分屏预览界面,都可以调用Android系统提供的应用程序接口(API),如context.startActivity发出分屏指令。context.startActivity用来启动一个页面(Activity)。
框架层接收到分屏指令后,可以根据分屏指令,为需要分屏运行的应用程序设置分屏标记,通过该分屏标记一方面可以标识该应用程序需要分屏,另一方面可以与其他分屏相区分。由于框架层主要负责与用户之间的交互,负责对用户界面进行处理,因此,框架层为应用程序设置分屏标记,实际上是为应用程序在框架层的数据设置分屏标记,这样可以了解到该应用程序需要分屏运行并且可以将该应用程序对应的分屏与其他分屏相区分。
在一可选实施方式中,框架层通过任务链表(TaskRecord)来管理应用程序,基于此,框架层根据分屏指令,为应用程序设置分屏标记的过程包括:根据分屏指令,在应用程序的任务链表中设置分屏标记,该任务链表对应于应用程序需要分屏展示的页面。即通过该任务链表可以确定应用程序需要分屏展示的页面。例如,任务链表可以存储应用程序的页面记录(ActivityRecord)。ActivityRecord也只存在框架层,用于存储应用程序需要分屏展示的页面的基本信息。页面的基本信息一般包括:该页面的名称、该页面所属的应用程序的标识等。
例如,以Android系统为例,在框架层的活动管理服务(ActivityManagerService,AMS)中,如图4所示,该AMS包括一个页面堆栈管理器(ActivityStackSuperVior),该ActivityStackSuperVior通过页面堆栈(ActivityStack)管理多个TaskRecord,每个TaskRecord包括多个ActivityRecord,即每个ActivityRecord都属于一个TaskRecord,每个ActivityRecord负责管理应用程序的一个页面(Activity),即应用程序的内个Activity都对应有一个ActivityRecord。
另外,在框架层的窗口管理服务(WindowManagerService,WMS)中也有类似的结构。如图5所示,该WMS包括一个任务堆栈(TaskStack),该TaskStack包括多个任务(Task),每个Task对应多个应用窗口令牌(AppWindowToken)。WMS里的任务堆栈(TaskStack)对应图4所示AMS中的页面堆栈(ActivityStack),这两者及其子结构保持同步。也就是说,WMS和AMS中的数据结构是有对应关系的,例如AMS中的TaskRecord对应于WMS中的Task,AMS中的ActivityRecord对应于WMS中的AppWindowToken。另外,WMS中TaskStack的mTasks需要和AMS中ActivityStack的mTaskHistory顺序保持一致。
上述ActivityRecord主要用于描述单个Activity,是ActivityStack中的基本单元;ActivityRecord的IBinder对象可以表示为ActivityRecord::Token,可以看作远程对象的本地句柄,可用于LPC,又可用来作映射中的唯一标识(unique ID),经常是两用的。
上述TaskRecord中的mActivities是ActivityRecord的列表,它们是按照历史顺序排序的。ActivityRecord是通过TaskRecord这一层间接地被管理着。
上述ActivityStackSupervisor是ActivityStack的管理者。
基于Android系统框架层对应用程序需要展示的页面的管理,可以通过TaskRecord来标识一个应用程序,将分屏标记设置在TaskRecord中,达到标记和区分应用程序的分屏的目的。
应用程序需要分屏展示的页面一般包括首页面(main Activity)和非首页面。首页面是指首个要展示的页面。根据要分屏展示的页面类型的不同,在应用程序的任务链表中设置分屏标记的过程也会有所不同。则一种设置分屏标记的具体实施方式包括:
当需要分屏展示的页面是首页面时,由于是该应用程序的首个页面,尚不存在任务链表,故需要为该首页面创建任务链表,根据分屏指令,获得分屏标记,将分屏标记设置在所创建的任务链表中;另外,还需要为该首页面创建页面链表,该页面链表位于任务链表中,并且需要将该首页面的基本信息存储到页面链表中;
当需要分屏展示的页面是非首页面时,若该非首页面不与首页面共用任务链表,则为该非首页面创建一新任务链表,从应用程序对应的已存在的任务链表(这里已存在的任务链表可以是首页面对应的任务链表,也可以是之前不与首页面共用任务链表的非首页面对应的任务链表)中获取分屏标记,将分屏标记设置在新任务链表中;另外,还需要为该非首页面创建页面链表,该页面链表位于所创建的新任务链表中,并且需要将该非首页面的基本信息存储到页面链表中;若该非首页面与首页面共用任务链表,由于首页面对应的任务链表中已经存在分屏标记,所以只需为该非首页面创建页面链表,将该非首页面的基本信息存储到页面链表中即可。
在一可选实施方式中,分屏指令中可以包括分屏标记。基于此,上述根据分屏指令,获得分屏标记具体可以是:从分屏指令中获取分屏标记。以Android系统为例,在通过调用Android系统提供的context.startActivity接口发出分屏指令时,具体可以通过调用context.startActivity接口发出意图(intent)消息,该消息中添加分屏标记。
或者,分屏指令中不携带分屏标记,而是由框架层自己根据分屏指令,为不同应用程序生成分屏标记。例如,框架层直接将分屏指令作为分屏标记。
在为应用程序设置分屏标记后,在应用程序的整个运行过程中,框架层就可以根据该分屏标记,获知该应用程序需要分屏运行,且可以将该应用程序与其他应用程序对应的分屏区分开,从而实现分屏运行应用程序的目的。
在一可选实施方式中,框架层根据分屏标记,分屏运行应用程序具体为:根据分屏标记,为应用程序设置分屏窗口的分屏参数,这里的分屏参数主要用于指示分屏窗口的大小及位置,具体的,分屏参数可以包括分屏窗口在整个屏幕上的左上角坐标、宽度以及高度等信息;将分屏窗口的分屏参数提供给应用程序,以供应用程序根据分屏参数将需要分屏展示的页面展示在分屏窗口中。
在一可选实施方式中,可以预先设置分屏标记的取值,不同取值对应不同的分屏个数,例如分屏标记取值为2,意味着需要分为两屏;分屏标记取值为3,意味着需要分为三屏;分屏标记取值为4,意味着需要分屏4屏。可选的,每一屏上可以运行一个应用程序,或者也可以同时运行多个应用程序。每一屏的使用模式也可以预先设定。
基于上述,一种根据分屏标记,为应用程序设置分屏窗口的分屏参数的实施方式包括:根据分屏标记,将整个屏幕划分为至少两个子屏幕,具体,可以根据分屏标记的取值确定所划分的子屏幕的个数;确定该应用程序的分屏窗口所在的目标子屏幕;根据目标子屏幕的屏幕参数,设置分屏窗口的分屏参数。例如,预先设定子屏幕的使用顺序,根据该使用顺序来确定当前应用程序对应的分屏窗口所在的子屏幕。或者,也可以随机选择有位置的子屏幕作为当前应用程序对应的分屏窗口所在的子屏幕。值得说明的是,子屏幕的屏幕参数主要用于指示该子屏幕的大小及位置。
可选的,若一个子屏幕上运行一个应用程序,则一个子屏幕可以直接作为一个分屏窗口,但不限于此。在获得应用程序的分屏窗口的分屏参数后,框架层具体可以向应用程序发送第一消息,以通知应用程序准备需要分屏展示的页面;向应用程序发送第二消息,第二消息包括分屏窗口的分屏参数,以供应用程序确定分屏窗口;对应用程序来说,接收框架层发送的第一消息,根据第一消息准备需要分屏展示的页面,并接收框架层发送的第二消息,从第二消息中获取分屏参数,根据分屏参数确定分屏窗口在屏幕上的位置,进一步当准备好需要分屏展示的页面后,向框架层发送消息,以通知框架层已经准备好页面;框架层在接收到应用程序发送的用于通知准备好页面的消息后,向应用程序发送第三消息,以指示应用程序将准备好的页面展示在分屏窗口中。
以Android系统为例,在Android系统中,应用程序的每个Activity都关联一个窗口(Window)对象,这个Window对象的继承类是com.android.internal.policy.impl.PhoneWindow,该Window对象的继承类提供了一个setAttributes(WindowManager.LayoutPrams)方法,该方法可以对Activity属性做一些设置,例如可以设置Activity属性中的左上角坐标(x,y)、宽度(width)、高度(height)等 参数。基于此,应用程序可以调用该方法设置Activity的左上角坐标、宽度、高度,从而让一个Activity只占据分屏窗口所在区域,而让其他Activity占据屏幕的其余区域,这样应用程序就可以将准备好的页面展示在分屏窗口中,进而实现应用分屏运行的目的。
在一可选实施方式中,应用程序除了需要分屏展示页面之外,还可能需要展示各种对话框。基于此,框架层还可以在应用程序对应的分屏窗口中展示应用程序的对话框。
具体的,当应用程序需要展示对话框时,确定该对话框关联于分屏窗口当前展示的页面;根据分屏窗口的分屏参数,确定对话框的大小及弹出位置;根据对话框的大小及弹出位置,在分屏窗口上弹出对话框。具体的,可以将对话框对应的窗口容器(Container)的大小限制为关联的分屏窗口的大小,对话框最大只能显示成窗口容器大小,可以比窗口容器小,如果对话框更小,那就正常显示,不充满窗口容器。
在一可选实施方式中,若申请分屏运行的应用程序是首个运行的应用,那么可以采用全屏方式,以提高屏幕利用率。基于此,在为应用程序设置分屏标记之前,可以判断应用程序是否是首个运行的应用,若判断结果为是,则禁止将分屏标记设置在任务链表中,从而禁止为该应用程序设置分屏标记;若判断结果为否,则将分屏标记设置到任务链表中,从而达到分屏运行应用程序的目的。值得说明的是,对于判断结果为否的情况,还需要向其他已经运行的应用程序发送包含所述其他已经运行的应用程序对应的分屏参数的消息,以使其他应用程序根据该分屏参数将需要展示的页面展示在其他应用程序对应的其他分屏窗口中。
由上述可见,本实施例通过接收用于指示分屏运行应用程序的分屏指令,根据分屏指令,为应用程序设置分屏标记,根据分屏标记,分屏运行应用程序。由于通过分屏标记可以标记出需要分屏运行的应用程序,所以不需要修改框架层的数据结构,便可以达到分屏运行应用程序的目的。另外,通过对单个页面对应的分屏窗口的大小及位置进行控制,具有更大的自由度,使得分屏方案更加灵活。
下面以Android系统为例,详细说明本申请技术方案的实施过程。如图6a所示,为本申请的整体统一建模语言(Unified Modeling Language,UML)图。本申请的UML图包括:应用程序部分、分屏入口部分和框架层。应用程序部分包括:组件调节器(ActivityThread)、窗口调节器(WindowScalor)和页面(Activity),WindowScalor是一个控制Activity缩放的工具;分屏入口部分包括:多窗口控制器(MultiWindowController)、多窗口管理器(MultiWindowManager)和多窗口管理服务(MultiWindowManagerService);框架层包括:堆栈管理器(ActivityStackSuperVior)、 页面堆栈(ActivityStack)、任务链表(TaskRecord)、页面记录(ActivityRecord)和浮动窗口层(FloatWindowLayor)。图6b所示为基于UML图实现的分屏运行应用程序的流程。对该流程的详细说明如下:
用户通过终端设备上的分屏启动入口(例如侧边栏或分屏预览界面)调用Android系统提供的context.startActivity接口,向Android系统中的框架层(这里的框架层主要是指图6b中的ActivityStackSuperVior)发送intent消息,并在该intent消息中添加一分屏标记,记为flag,用于在向框架层发出启动应用程序的指令的同时,指示分屏运行该应用程序。
考虑到运行第一个应用程序时,一般会进入全屏状态,而不是分屏,这样有利于提高屏幕利用率。基于此,框架层收到context.startActivity接口传输的intent消息后,进入启动页面(StartActivityLocked)流程,并需要判断是否需要移除intent消息中的flag,于是启动判断是否需要移除intent消息中的flag的流程,该流程可记为startActivityUncheckedLocked。该操作主要有图6b中的ActivityStackSuperVior指示ActivityStack来完成。值得说明的是,上述流程中的”Locked”只是为了提示该方法流程是线程安全的,Locked本身没有具体意义。
具体的,框架层(主要是指ActivityStack)根据该应用程序是否是首个请求运行的应用,来确定是否要移除flag(removeFloatFlagIfNeeded),如果是首个请求运行的应用,则需要移除,如果不是首个请求运行的应用,则不移除。如果需要进入全屏状态,则把被桌面挡住的页面都先清空(finishNoneFloatAcitivityUnderHome),以便于全屏运行应用程序。如果需要进入分屏状态,则确定需要根据flag,设置分屏窗口的分屏参数。于是,进入框架层默认的启动Activity的流程。
对于应用的首页面(main Activity),首先新建一个TaskRecord,此时,TaskRecord的构造函数会从intent消息里面取数据,由于intent消息里面包含分屏标记,即flag,因此会获取flag将其存到TaskRecord里面,这样该TaskRecord就会被标记为需要分屏。TaskRecord处理好后,ActivityStack会指示ActivitySupervisor进入ActivitySupervisor的真正启动页面(realStartActivityLocked)流程。
在realStartActivityLocked流程中,框架层会请求应用程序准备需要展示的页面,具体向应用程序发送第一消息,以请求应用程序准备需要展示的页面;进一步,向应用程序发送第二消息,通过第二消息将分屏窗口的分屏参数传递给应用程序,以供应用程序确定分屏窗口;当应用程序准备好页面后,向框架层发送通知消息,框架层收到通知消 息后,向应用程序发送第三消息,以指示应用程序将准备好的页面展示在分屏窗口中。对应用程序来说,在接收到第三消息后,可以设置main Activity的大小,以使其与分屏窗口相适宜。该过程主要可由图6b中的ActivitySupervisor、ActivityRecord、ActivityThread、WindowScalor和Activity几部分完成。
具体的,应用程序可以调用FloatWindowLayor.layoutActivityRecord(),构造一个LayoutParams对象并对LayoutParams对象的左上角坐标(x,y)、宽度(width)、高度(height)等属性赋值。
在此处,FloatWindowLayor.layoutActivityRecord()的主要功能是设置main Activity的位置,具体将其位置定位到分屏窗口处。然后,应用程调用main Activity的setAttributes(WindowManager.LayoutPrams)方法设置main Activity的属性。
对于非main Activity,如果该非main Activity与main Activity是共享同一个TaskRecord,由于flag已经存在TaskRecord里面了,因此,可以直接realStartActivityLocked流程,并且在realStartActivityLocked流程中,应用程序也会将非main Activit设置成与main Activity一样的大小。
对于非main Activity,如果非main Activity与main Activity不共享同一个TaskRecord,需要查找是否已经存在该应用程序的其他Activity对应的TaskRecord,具体可以判断是否存在TaskRecord对应的包名(packageName)与该应用程序的包名相同,若存在,则则取该TaskRecord中的flag设置到当前非main Activity的TaskRecord中,保证非main Activity与main Activity对应相同的flag。之后,进入realStartActivityLocked流程,并且在realStartActivityLocked流程中,应用程序也会将非main Activit设置成与main Activity一样的大小。
由上述可见,本申请通过为应用程序设置分屏标记,根据分屏标记,分屏运行应用程序。由于通过分屏标记可以标记出需要分屏运行的应用程序,所以不需要修改框架层的数据结构,便可以达到分屏运行应用程序的目的。
需要说明的是,对于前述的各方法实施例,为了简单描述,故将其都表述为一系列的动作组合,但是本领域技术人员应该知悉,本申请并不受所描述的动作顺序的限制,因为依据本申请,某些步骤可以采用其他顺序或者同时进行。其次,本领域技术人员也应该知悉,说明书中所描述的实施例均属于优选实施例,所涉及的动作和模块并不一定是本申请所必须的。
在上述实施例中,对各个实施例的描述都各有侧重,某个实施例中没有详述的部分, 可以参见其他实施例的相关描述。
图7为本申请一实施例提供的分屏运行应用的装置的结构示意图。如图7所示,该装置包括:接收模块71、标记模块72和分屏模块73。
接收模块71,用于接收用于指示分屏运行应用程序的分屏指令;
标记模块72,用于根据分屏指令,为应用程序设置分屏标记;
分屏模块73,用于根据分屏标记,分屏运行应用程序。
在一可选实施方式中,标记模块72具体用于:
根据分屏指令,在应用程序的任务链表中设置分屏标记,任务链表对应于应用程序需要分屏展示的页面。
在一可选实施方式中,标记模块72具体用于:
当需要分屏展示的页面是首页面时,为首页面创建任务链表,根据分屏指令,获得分屏标记,将分屏标记设置在任务链表中;
当需要分屏展示的页面是非首页面时,若非首页面不与首页面共用任务链表,则为非首页面创建一新任务链表,从应用程序对应的已存在的任务链表中获取分屏标记,将分屏标记设置在新任务链表中。
在一可选实施方式中,标记模块72具体用于:
从分屏指令中获取分屏标记;或者
根据分屏指令,生成分屏标记。
在一可选实施方式中,分屏模块73具体用于:
根据分屏标记,为应用程序设置分屏窗口的分屏参数;
将分屏参数提供给应用程序,以供应用程序根据分屏参数将页面展示在分屏窗口中。
在一可选实施方式中,分屏模块73具体用于:
向应用程序发送第一消息,以通知应用程序准备页面;
向应用程序发送第二消息,第二消息包括分屏参数,以供应用程序确定分屏窗口;
在接收到应用程序发送的用于通知准备好页面的消息后,向应用程序发送第三消息,以指示应用程序将页面展示在分屏窗口中。
在一可选实施方式中,分屏模块73具体用于:
根据分屏标记,将整个屏幕划分为至少两个子屏幕;
确定分屏窗口所在的目标子屏幕;
根据目标子屏幕的屏幕参数,设置分屏窗口的分屏参数。
在一可选实施方式中,分屏模块73还用于:
在分屏窗口中展示应用程序的对话框。
在一可选实施方式中,分屏模块73具体用于:
当应用程序需要展示对话框时,确定对话框关联于分屏窗口当前展示的页面;
根据分屏窗口的分屏参数,确定对话框的大小及弹出位置属性参数;
根据对话框的大小及弹出位置,在分屏窗口中弹出对话框。
在一可选实施方式中,本实施例的装置还包括,判断模块,用于判断应用程序是否是首个运行的应用;若判断结果为是,则禁止标记模块将分屏标记设置到任务链表中;若判断结果为否,则触发标记模块将分屏标记设置到任务链表中。
可选的,上述分屏指令为用户通过分屏启动入口发出的用于启动应用程序的启动指令。
本实施例提供的装置,接收用于指示分屏运行应用程序的分屏指令,根据分屏指令,为应用程序设置分屏标记,根据分屏标记,分屏运行应用程序。由于通过分屏标记可以标记出需要分屏运行的应用程序,所以不需要修改框架层的数据结构,便可以达到分屏运行应用程序的目的。
所属领域的技术人员可以清楚地了解到,为描述的方便和简洁,上述描述的系统,装置和单元的具体工作过程,可以参考前述方法实施例中的对应过程,在此不再赘述。
在本发明所提供的几个实施例中,应该理解到,所揭露的系统,装置和方法,可以通过其它的方式实现。例如,以上所描述的装置实施例仅仅是示意性的,例如,所述单元的划分,仅仅为一种逻辑功能划分,实际实现时可以有另外的划分方式,例如多个单元或组件可以结合或者可以集成到另一个系统,或一些特征可以忽略,或不执行。另一点,所显示或讨论的相互之间的耦合或直接耦合或通信连接可以是通过一些接口,装置或单元的间接耦合或通信连接,可以是电性,机械或其它的形式。
所述作为分离部件说明的单元可以是或者也可以不是物理上分开的,作为单元显示的部件可以是或者也可以不是物理单元,即可以位于一个地方,或者也可以分布到多个网络单元上。可以根据实际的需要选择其中的部分或者全部单元来实现本实施例方案的目的。
另外,在本发明各个实施例中的各功能单元可以集成在一个处理单元中,也可以是各个单元单独物理存在,也可以两个或两个以上单元集成在一个单元中。上述集成的单元既可以采用硬件的形式实现,也可以采用硬件加软件功能单元的形式实现。
上述以软件功能单元的形式实现的集成的单元,可以存储在一个计算机可读取存储介质中。上述软件功能单元存储在一个存储介质中,包括若干指令用以使得一台计算机设备(可以是个人计算机,服务器,或者网络设备等)或处理器(processor)执行本发明各个实施例所述方法的部分步骤。而前述的存储介质包括:U盘、移动硬盘、只读存储器(Read-Only Memory,ROM)、随机存取存储器(Random Access Memory,RAM)、磁碟或者光盘等各种可以存储程序代码的介质。
最后应说明的是:以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的精神和范围。

Claims (22)

  1. 一种分屏运行应用的方法,其特征在于,包括:
    接收用于指示分屏运行应用程序的分屏指令;
    根据所述分屏指令,为所述应用程序设置分屏标记;
    根据所述分屏标记,分屏运行所述应用程序。
  2. 根据权利要求1所述的方法,其特征在于,所述根据所述分屏指令,为所述应用程序设置分屏标记,包括:
    根据所述分屏指令,在所述应用程序的任务链表中设置所述分屏标记,所述任务链表对应于所述应用程序需要分屏展示的页面。
  3. 根据权利要求2所述的方法,其特征在于,所述根据所述分屏指令,在所述应用程序的任务链表中设置所述分屏标记,包括:
    当需要分屏展示的页面是首页面时,为所述首页面创建任务链表,根据所述分屏指令,获得所述分屏标记,将所述分屏标记设置在所述任务链表中;
    当需要分屏展示的页面是非首页面时,若所述非首页面不与所述首页面共用任务链表,则为所述非首页面创建一新任务链表,从所述应用程序对应的已存在的任务链表中获取所述分屏标记,将所述分屏标记设置在所述新任务链表中。
  4. 根据权利要求3所述的方法,其特征在于,所述根据所述分屏指令,获得所述分屏标记,包括:
    从所述分屏指令中获取所述分屏标记;或者
    根据所述分屏指令,生成所述分屏标记。
  5. 根据权利要求2所述的方法,其特征在于,所述根据所述分屏标记,分屏运行所述应用程序,包括:
    根据所述分屏标记,为所述应用程序设置分屏窗口的分屏参数;
    将所述分屏参数提供给所述应用程序,以供所述应用程序根据所述分屏参数将所述页面展示在所述分屏窗口中。
  6. 根据权利要求5所述的方法,其特征在于,所述将所述分屏参数提供给所述应用程序,以供所述应用程序根据所述分屏参数将所述页面展示在所述分屏窗口中,包括:
    向所述应用程序发送第一消息,以通知所述应用程序准备所述页面;
    向所述应用程序发送第二消息,所述第二消息包括所述分屏参数,以供所述应用程序确定所述分屏窗口;
    在接收到所述应用程序发送的用于通知准备好所述页面的消息后,向所述应用程序发送第三消息,以指示所述应用程序将所述页面展示在所述分屏窗口中。
  7. 根据权利要求5所述的方法,其特征在于,所述根据所述分屏标记,为所述应用程序设置分屏窗口的分屏参数,包括:
    根据所述分屏标记,将整个屏幕划分为至少两个子屏幕;
    确定所述分屏窗口所在的目标子屏幕;
    根据所述目标子屏幕的屏幕参数,设置所述分屏窗口的分屏参数。
  8. 根据权利要求5所述的方法,其特征在于,所述根据所述分屏标记,分屏运行所述应用程序,还包括:
    在所述分屏窗口中展示所述应用程序的对话框。
  9. 根据权利要求8所述的方法,其特征在于,在所述分屏窗口中展示所述应用程序的对话框,包括:
    当所述应用程序需要展示对话框时,确定所述对话框关联于所述分屏窗口当前展示的页面;
    根据所述分屏窗口的分屏参数,确定所述对话框的大小及弹出位置属性参数;
    根据所述对话框的大小及弹出位置,在所述分屏窗口中弹出所述对话框。
  10. 根据权利要求3所述的方法,其特征在于,所述将所述分屏标记设置在所述任务链表中之前,包括:
    判断所述应用程序是否是首个运行的应用;
    若判断结果为是,则禁止将所述分屏标记设置到所述任务链表中;
    若判断结果为否,则将所述分屏标记设置到所述任务链表中。
  11. 根据权利要求1-10任一项所述的方法,其特征在于,所述分屏指令为用户通过分屏启动入口发出的用于启动所述应用程序的启动指令。
  12. 一种分屏运行应用的装置,其特征在于,包括:
    接收模块,用于接收用于指示分屏运行应用程序的分屏指令;
    标记模块,用于根据所述分屏指令,为所述应用程序设置分屏标记;
    分屏模块,用于根据所述分屏标记,分屏运行所述应用程序。
  13. 根据权利要求12所述的装置,其特征在于,所述标记模块具体用于:
    根据所述分屏指令,在所述应用程序的任务链表中设置所述分屏标记,所述任务链表对应于所述应用程序需要分屏展示的页面。
  14. 根据权利要求13所述的装置,其特征在于,所述标记模块具体用于:
    当需要分屏展示的页面是首页面时,为所述首页面创建任务链表,根据所述分屏指令,获得所述分屏标记,将所述分屏标记设置在所述任务链表中;
    当需要分屏展示的页面是非首页面时,若所述非首页面不与所述首页面共用任务链表,则为所述非首页面创建一新任务链表,从所述应用程序对应的已存在的任务链表中获取所述分屏标记,将所述分屏标记设置在所述新任务链表中。
  15. 根据权利要求14所述的装置,其特征在于,所述标记模块具体用于:
    从所述分屏指令中获取所述分屏标记;或者
    根据所述分屏指令,生成所述分屏标记。
  16. 根据权利要求13所述的装置,其特征在于,所述分屏模块具体用于:
    根据所述分屏标记,为所述应用程序设置分屏窗口的分屏参数;
    将所述分屏参数提供给所述应用程序,以供所述应用程序根据所述分屏参数将所述页面展示在所述分屏窗口中。
  17. 根据权利要求16所述的装置,其特征在于,所述分屏模块具体用于:
    向所述应用程序发送第一消息,以通知所述应用程序准备所述页面;
    向所述应用程序发送第二消息,所述第二消息包括所述分屏参数,以供所述应用程序确定所述分屏窗口;
    在接收到所述应用程序发送的用于通知准备好所述页面的消息后,向所述应用程序发送第三消息,以指示所述应用程序将所述页面展示在所述分屏窗口中。
  18. 根据权利要求16所述的装置,其特征在于,所述分屏模块具体用于:
    根据所述分屏标记,将整个屏幕划分为至少两个子屏幕;
    确定所述分屏窗口所在的目标子屏幕;
    根据所述目标子屏幕的屏幕参数,设置所述分屏窗口的分屏参数。
  19. 根据权利要求16所述的装置,其特征在于,所述分屏模块还用于:
    在所述分屏窗口中展示所述应用程序的对话框。
  20. 根据权利要求19所述的装置,其特征在于,所述分屏模块具体用于:
    当所述应用程序需要展示对话框时,确定所述对话框关联于所述分屏窗口当前展示的页面;
    根据所述分屏窗口的分屏参数,确定所述对话框的大小及弹出位置属性参数;
    根据所述对话框的大小及弹出位置,在所述分屏窗口中弹出所述对话框。
  21. 根据权利要求14所述的装置,其特征在于,还包括:
    判断模块,用于判断所述应用程序是否是首个运行的应用;若判断结果为是,则禁止所述标记模块将所述分屏标记设置到所述任务链表中;若判断结果为否,则触发所述标记模块将所述分屏标记设置到所述任务链表中。
  22. 根据权利要求12-21任一项所述的装置,其特征在于,所述分屏指令为用户通过分屏启动入口发出的用于启动所述应用程序的启动指令。
PCT/CN2016/076567 2015-03-26 2016-03-17 分屏运行应用的方法及装置 Ceased WO2016150325A1 (zh)

Applications Claiming Priority (2)

Application Number Priority Date Filing Date Title
CN201510135127.9A CN106155768B (zh) 2015-03-26 2015-03-26 分屏运行应用的方法及装置
CN201510135127.9 2015-03-26

Publications (1)

Publication Number Publication Date
WO2016150325A1 true WO2016150325A1 (zh) 2016-09-29

Family

ID=56978991

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2016/076567 Ceased WO2016150325A1 (zh) 2015-03-26 2016-03-17 分屏运行应用的方法及装置

Country Status (2)

Country Link
CN (1) CN106155768B (zh)
WO (1) WO2016150325A1 (zh)

Cited By (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018177149A1 (zh) * 2017-03-31 2018-10-04 捷开通讯(深圳)有限公司 终端及其屏幕的分屏显示方法、存储装置
CN110377260A (zh) * 2019-08-29 2019-10-25 湖北亿咖通科技有限公司 一种多屏显示系统及方法
CN111736928A (zh) * 2020-06-22 2020-10-02 Oppo(重庆)智能科技有限公司 一种画中画模式启动方法、装置及计算机可读存储介质
CN114063958A (zh) * 2021-11-16 2022-02-18 上海哔哩哔哩科技有限公司 页面分屏显示方法及装置
CN116701795A (zh) * 2022-10-18 2023-09-05 荣耀终端有限公司 页面显示方法和电子设备
CN118626182A (zh) * 2023-03-07 2024-09-10 华为技术有限公司 切换应用程序的方法、电子设备

Families Citing this family (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107391117B (zh) * 2017-06-28 2021-06-18 阿里巴巴(中国)有限公司 轻应用的分屏处理方法、设备及电子设备
CN107506200A (zh) * 2017-09-12 2017-12-22 深圳市金立通信设备有限公司 一种屏幕内容切换方法、终端及计算机可读存储介质
CN112261220A (zh) * 2020-09-18 2021-01-22 湖北亿咖通科技有限公司 应用于终端的分屏显示方法

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249235A1 (en) * 2008-03-25 2009-10-01 Samsung Electronics Co. Ltd. Apparatus and method for splitting and displaying screen of touch screen
CN103605524A (zh) * 2013-11-26 2014-02-26 广东欧珀移动通信有限公司 一种在移动终端分屏运行程序的方法及装置
CN103870112A (zh) * 2014-02-17 2014-06-18 联想(北京)有限公司 一种信息处理方法及电子设备
CN104049866A (zh) * 2014-06-25 2014-09-17 深圳市中兴移动通信有限公司 一种移动终端及其分屏的实现方法和装置

Family Cites Families (13)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8678901B1 (en) * 2005-09-07 2014-03-25 Bally Gaming System gaming
US8437256B2 (en) * 2006-01-10 2013-05-07 Utbk, Llc Systems and methods to provide communication connections
US8473851B2 (en) * 2008-02-27 2013-06-25 Cisco Technology, Inc. Multi-party virtual desktop
US8600446B2 (en) * 2008-09-26 2013-12-03 Htc Corporation Mobile device interface with dual windows
CN103034390B (zh) * 2011-09-30 2016-09-21 汉王科技股份有限公司 用于移动终端的多个分屏间移动应用程序的方法及装置
CN102411479B (zh) * 2011-12-27 2014-02-12 汉王科技股份有限公司 便携式电子设备的分屏切换方法及装置
CN103365525B (zh) * 2012-03-28 2017-05-10 百度在线网络技术(北京)有限公司 移动终端及用于移动终端的多窗口显示方法
CN103558959B (zh) * 2013-10-31 2016-08-17 青岛海信移动通信技术股份有限公司 一种应用于Android平台的显示窗口的方法和装置
CN106557320B (zh) * 2013-10-31 2020-01-17 青岛海信移动通信技术股份有限公司 一种应用于Android平台的启动活动的方法和装置
CN104346216A (zh) * 2014-05-30 2015-02-11 广州三星通信技术研究有限公司 电子设备的多任务执行方法和设备
CN104182196A (zh) * 2014-08-26 2014-12-03 深圳市中兴移动通信有限公司 分屏显示的方法和移动终端
CN104238949B (zh) * 2014-10-12 2017-10-03 福州瑞芯微电子股份有限公司 一种分屏显示方法和装置
CN104461242B (zh) * 2014-12-08 2017-12-01 深圳市嘉乐派科技有限公司 一种基于Android操作系统的多窗口界面实现方法

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20090249235A1 (en) * 2008-03-25 2009-10-01 Samsung Electronics Co. Ltd. Apparatus and method for splitting and displaying screen of touch screen
CN103605524A (zh) * 2013-11-26 2014-02-26 广东欧珀移动通信有限公司 一种在移动终端分屏运行程序的方法及装置
CN103870112A (zh) * 2014-02-17 2014-06-18 联想(北京)有限公司 一种信息处理方法及电子设备
CN104049866A (zh) * 2014-06-25 2014-09-17 深圳市中兴移动通信有限公司 一种移动终端及其分屏的实现方法和装置

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO2018177149A1 (zh) * 2017-03-31 2018-10-04 捷开通讯(深圳)有限公司 终端及其屏幕的分屏显示方法、存储装置
US11256400B2 (en) 2017-03-31 2022-02-22 Jrd Communication (Shenzhen) Ltd Terminal, split-screen display method for screen thereof, and storage device
CN110377260A (zh) * 2019-08-29 2019-10-25 湖北亿咖通科技有限公司 一种多屏显示系统及方法
CN110377260B (zh) * 2019-08-29 2024-01-05 亿咖通(湖北)技术有限公司 一种多屏显示系统及方法
CN111736928A (zh) * 2020-06-22 2020-10-02 Oppo(重庆)智能科技有限公司 一种画中画模式启动方法、装置及计算机可读存储介质
CN114063958A (zh) * 2021-11-16 2022-02-18 上海哔哩哔哩科技有限公司 页面分屏显示方法及装置
CN116701795A (zh) * 2022-10-18 2023-09-05 荣耀终端有限公司 页面显示方法和电子设备
CN118626182A (zh) * 2023-03-07 2024-09-10 华为技术有限公司 切换应用程序的方法、电子设备

Also Published As

Publication number Publication date
CN106155768B (zh) 2020-03-31
CN106155768A (zh) 2016-11-23

Similar Documents

Publication Publication Date Title
WO2016150325A1 (zh) 分屏运行应用的方法及装置
US12511023B2 (en) Operating method for multiple windows and electronic device supporting the same
US10613701B2 (en) Customizable bladed applications
US8732287B2 (en) System for managing a virtualization solution and management server and method for managing the same
US20200319763A1 (en) Method and device for managing tab window indicating application group including heterogeneous applications
TWI534694B (zh) 用於管理沉浸式環境的電腦實施方法及運算裝置
US10970101B2 (en) System and method for dynamically configuring virtual displays and virtual inputs for different remote sessions that each present content for a virtual machine
AU2014296339B2 (en) Multi-monitor full screen mode in a windowing environment
KR20160013162A (ko) 다수의 디스플레이들을 위한 사용자 인터페이스 요소
JP4782042B2 (ja) 電子計算機及びソフトウェアによるユーザインタフェースの実現方法
US20150205498A1 (en) Automatic wallpaper image changer for a computing device
EP2763131A1 (en) Method and electronic device for configuring screen
WO2017167126A1 (zh) 一种窗口显示方法、信息交互方法及系统
WO2020006669A1 (zh) 一种图标切换方法、显示gui的方法及电子设备
CN112286612A (zh) 信息显示方法、装置及电子设备
WO2024193418A1 (zh) 页面配置方法、电子设备及存储介质
CN110879732A (zh) 应用图标桌面管理的方法、设备和存储介质
HK1230314B (zh) 分屏运行应用的方法及装置
CN108351757A (zh) 移动终端以及应用程序
HK1230314A1 (zh) 分屏運行應用的方法及裝置
HK1230314A (zh) 分屏运行应用的方法及装置
US9582158B2 (en) Efficient usage of screen real estate on an electronic device
CN119415193A (zh) 应用显示方法、电子设备及存储介质
WO2025092865A1 (zh) 用于切换视图的方法、装置、设备和介质
TW201324348A (zh) 手持式裝置上介面程式集的動畫播放系統及其方法

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: 16767702

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 16767702

Country of ref document: EP

Kind code of ref document: A1