Display method, electronic device, storage medium, and program product
By detecting the background running status of the corresponding application of the floating ball and creating new startup parameter information, the application abnormality problem during the switching of the floating window is solved, ensuring that the floating window is displayed normally and improving the user experience.
Patent Information
- Application Number
- CN202410515231.X
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-25
- Publication Date
- 2025-08-22
- Estimated Expiration
- 2044-04-25
AI Technical Summary
When switching to the floating window again after switching to the floating window, the application startup abnormality or display abnormality may occur, especially when the application cannot resume the display normally after being cleaned up in the background.
By detecting whether the corresponding application of the floating ball is in the background running state, if it is not in the background running, create new startup parameter information to start the application in the floating window display mode to ensure information integrity.
It effectively avoids abnormal display of floating windows, ensures that the application can be pulled up and displayed normally, and improves the user experience.
Smart Images

Figure CN118535059B_ABST
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of electronic devices, and in particular to a display method, electronic device, storage medium, and program product. Background Art
[0002] A floating window is an interactive window that is displayed in a floating manner on top of the desktop of an electronic device or the currently displayed application page, and a page of a certain application can be displayed in it. Currently, when electronic devices use floating windows to implement multi-tasking interaction scenarios, they provide a function to switch the floating window to a floating ball display, so that users can use the floating ball to open the floating window corresponding to the corresponding application running in the background again, thereby operating the application. However, in some cases, such as when the application running in the background corresponding to the floating ball is automatically cleared due to insufficient memory but the floating ball is not checked and cleared, in the process of opening the corresponding floating window again through the floating ball, there may be abnormal problems such as application startup exceptions and the displayed floating window disappearing immediately, which may bring a bad user experience. Summary of the Invention
[0003] Multiple aspects of the present application provide a display method, electronic device, storage medium and program product, so that when the floating ball is restored to a floating window, the corresponding application can be pulled up normally, thereby avoiding the problem of application display abnormality (such as the displayed floating window disappearing immediately).
[0004] In a first aspect, the present application provides a display method, which is applied to an electronic device. The display method includes:
[0005] Displaying at least one floating ball; wherein one of the floating balls is formed by switching a floating window to a contracted state, and one floating window is used to display a page of an application;
[0006] When an operation on a target floating ball is detected, determining whether a target application corresponding to the target floating ball is in a background running state; the target floating ball is one of the at least one floating ball;
[0007] When the target application is not in a background running state, creating startup parameter information of the target application, wherein the page display mode included in the startup parameter information is a floating window display mode;
[0008] The target application is started based on the startup parameter information, and during the startup process, a page of the target application is displayed in a floating window.
[0009] In a second aspect, the present application provides an electronic device, which includes: a memory and a processor; wherein,
[0010] The memory is used to store programs;
[0011] The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the display methods provided in other aspects of the present application;
[0012] In a third aspect, the present application provides a computer-readable storage medium. The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, the steps of the display method provided in other aspects of the present application are implemented.
[0013] In a fourth aspect, the present application provides a computer program product. The computer program product includes a computer program, and when the computer program is executed by a processor, the processor is enabled to implement the steps of the display method provided in other aspects of the present application.
[0014] In the technical solutions provided by the embodiments of the present application, at least one floating ball is displayed on the electronic device. A floating ball is formed by switching a floating window to a retracted state, and a floating window is used to display a page of an application. When it is determined that the target application corresponding to the operated target floating ball is not in the background running state, the startup parameter information of the target application will be recreated. The page display mode contained in the startup parameter information is the floating window display mode, so that based on the startup parameter information, the page of the target application will be displayed in a floating window during the startup of this target application. Because the solution of the present application is based on the recreated startup parameter information to pull up the target application when the target application that is not running in the background is switched from the floating ball display mode to the floating window display mode for display, there will basically be no problems such as lack of necessary information in the process of pulling up the target application, thereby effectively ensuring that the target application can be pulled up normally, so that when the page of the target application is displayed again through the floating window, there will be no abnormal problems such as flickering. BRIEF DESCRIPTION OF THE DRAWINGS
[0015] The drawings described herein are used to provide a further understanding of the present application and constitute a part of the present application. The illustrative embodiments of the present application and their descriptions are used to explain the present application and do not constitute an improper limitation on the present application. In the drawings:
[0016] Figure 1 A schematic diagram of a process for applying a floating window or floating ball display on an existing electronic device provided by an exemplary embodiment of the present application;
[0017] Figure 2 A schematic diagram of a physical form of an electronic device provided by an exemplary embodiment of the present application;
[0018] Figure 3 and Figure 4A schematic diagram showing the principle of displaying an application page in the form of a floating window and switching the floating window to a floating ball form provided by an exemplary embodiment of the present application;
[0019] Figure 5 A schematic diagram showing a principle of displaying an application page in a floating window provided by another exemplary embodiment of the present application;
[0020] Figure 6 A schematic diagram illustrating the principle of switching a floating ball to a floating window provided by an exemplary embodiment of the present application;
[0021] Figure 7 and Figure 8 A schematic diagram showing the cause of display abnormality when switching the floating ball to the floating window provided by an exemplary embodiment of the present application;
[0022] Figure 9 A schematic diagram of a flow chart of a display method provided in one embodiment of the present application;
[0023] Figure 10 A schematic diagram showing that when an application process running in the background is closed in the existing solution provided by the exemplary embodiment of the present application, the corresponding floating ball is not deleted at the same time;
[0024] Figure 11 A schematic diagram of deleting a corresponding floating ball while closing an application process running in the background provided by an exemplary embodiment of the present application;
[0025] Figure 12 A schematic diagram illustrating a cold start of an application provided by an exemplary embodiment of the present application;
[0026] Figure 13 A schematic diagram of a hot start of an application provided by an exemplary embodiment of the present application;
[0027] Figure 14 A schematic diagram of the corresponding page display process when switching the floating ball of an application to a floating window and a schematic diagram of the deletion and update process of the floating ball are provided as another exemplary embodiment of the present application;
[0028] Figure 15 A schematic structural diagram of an electronic device provided as an exemplary embodiment of the present application. DETAILED DESCRIPTION
[0029] To make the purpose, technical solutions, and advantages of this application more clear, the technical solutions of this application will be clearly and completely described below in conjunction with the specific embodiments of this application and the corresponding drawings. Obviously, the embodiments described are only part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.
[0030] In the embodiments of the present application, to facilitate a clear description of the technical solutions of the embodiments of the present application, terms such as "first" and "second" are used to distinguish between identical items or similar items with substantially identical functions and effects. For example, the first acceleration sensor and the second acceleration sensor are merely used to distinguish between different acceleration sensors and do not limit their order. Those skilled in the art will understand that terms such as "first" and "second" do not limit the quantity or execution order, and that terms such as "first" and "second" do not necessarily mean that they are different.
[0031] It should be noted that, in this application, words such as "exemplary" or "for example" are used to indicate examples, illustrations or explanations. Any embodiment or design scheme described in this application as "exemplary" or "for example" should be interpreted as being more preferred or more advantageous than other embodiments or design schemes. Specifically, the use of words such as "exemplary" or "for example" is intended to present related concepts in a concrete way. In addition, "at least one" in this application refers to one or more, and "plurality" refers to two or more. "And / or" describes the association relationship of associated objects, indicating that three relationships may exist. For example, A and / or B can mean: A exists alone, A and B exist at the same time, B exists alone, wherein A and B can be singular or plural, etc. The character " / " generally indicates that the previous and subsequent associated objects are in an "or" relationship. "At least one of the following items" or similar expressions refers to any combination of these items, including any combination of single items or plural items. For example, at least one of a, b and c can represent: a, b, c, a, b and c, a and b, a and c, b and c.
[0032] The technical solution provided by this application is described in detail below with reference to the accompanying drawings.
[0033] First, in order to facilitate a better understanding of the present application, the background on which the present application is based is described in detail.
[0034] In daily production, people often need to use electronic devices such as smartphones to handle multiple tasks at the same time, such as work, study, social interaction, entertainment, etc. In order to meet people's multitasking needs, most electronic devices provide multitasking functions, such as split-screen function, multi-window function, floating window function, etc. Among them, the floating window function is a multitasking interaction method implemented by electronic devices using floating windows, which allows the page of any application to be displayed on the desktop (main screen) of the electronic device or on the upper layer of other currently displayed application pages through a small window (called a floating window), so that users can open another application through the floating window without leaving the current application, and operate two applications at the same time.
[0035] Currently, when electronic devices use floating windows to provide multi-tasking interaction scenarios, the floating window can also be switched to a floating ball display. For example, see Figure 1 Combined with Figures 2 to 5 As shown, when a user uses the electronic device 100 and has a multi-tasking scenario requirement, such as watching a video while viewing an album or chatting, the application that needs to be resident (i.e., suspended display) can be displayed in the form of a floating window in the following three ways, but not limited to:
[0036] Take the gallery application as an example,
[0037] The first method: swipe out the application from the side. Figure 3 In response to the user's first sliding operation (such as sliding from the right or left edge of the display screen of the electronic device 100 from the outside to the inside), the electronic device 100 will display a sidebar 11 on the display screen. There are multiple application logos (icons and / or names) on the sidebar 11, such as WeChat logo, SMS logo, email logo, memo logo, gallery logo, etc. Click on the gallery logo in the sidebar 11, and the page of the gallery application, such as the album page (the home page), will be displayed in the form of a floating window 21 on the upper layer of the desktop of the electronic device 100.
[0038] The second method: multi-tasking interface method. Specifically: see Figure 4 In response to the user's second sliding operation (such as sliding upward from the bottom of the electronic device), the electronic device 100 displays a multitasking interface 4, in which the multitasking interface 4 is associated with application page cards P and application identifiers, and a floating window control 41 of multiple applications with background running processes; when the user's operation (such as clicking) on the floating window control 41 corresponding to the gallery application is detected, the floating window 21 corresponding to the gallery application will be displayed, and the page of the gallery application displayed in the floating window 21 is the same as the page of the gallery application displayed in the multitasking interface 4.
[0039] The third method: sliding the application page. For details, see Figure 5In response to an operation (such as a click operation) triggered by a user on the application identifier of the gallery application displayed on its desktop, the electronic device 100 displays the album page P1 of the gallery application in full screen; when a third sliding operation (such as sliding upward from the bottom) triggered by the user on the album page P1 is detected and the sliding meets certain preset requirements (such as the upward sliding distance is greater than or equal to the preset distance, etc.), an intermediate page is displayed and a sliding window control 41, a split-screen control S, a reduced-display album page P1, etc. are displayed on the intermediate page; when it is detected that the user continues to slide the album page P1 and slides the album page P1 to the position of the floating window control 41 and releases it, the album page is first displayed in the first floating window 21-1; further, when an operation (such as a click) triggered by the user on the first floating window 21-1 is detected, the album page is displayed in the second floating window 21-2. Compared with the second floating window 21-2, the first floating window 21-1 hides some controls, such as the minimize control 211 and the drag control 212.
[0040] The floating window 21 or the second floating window 21-2 corresponding to the gallery application has a minimize control 211, a drag control 212, etc. When the floating window needs to be temporarily closed, one way is: as shown in FIG. Figure 3 As shown in (d) to (e), the user can operate the minimize control 211, and the electronic device responds to this operation by shrinking the floating window 21 into a floating ball 311 and adding it to the floating ball set 31 for display; another way is: as can be seen Figure 4 As shown in (d) to (e), the user can operate the drag control 212 to drag the floating window 21 to a boundary of the display screen to switch the floating window 21 to the floating ball form and add it to the floating ball set 31 for display.
[0041] In the above example, the floating ball set 31 is used to store floating balls, and each floating ball displays an application icon of a corresponding application. When multiple floating balls are stored therein, the multiple floating balls are stacked and arranged in a preset order; wherein, the preset order may be the order in which the floating balls are added to the floating ball set, such as the later the floating ball is added to the floating ball set, the higher the arrangement may be. Moreover, the floating ball set 31 is displayed on one side of the electronic device and can also be moved to other sides of the electronic device, so that when the user needs to restore the floating window that was folded up before, he can directly restore it by operating the floating ball in the floating ball set (that is, open the corresponding application or switch applications in the form of a floating window again). wherein, when the floating ball is restored to the floating window display form, the electronic device will restore the previously displayed page (the application page displayed in the floating window before it switched to the floating ball form) and display it in the floating window. For example, see Figure 6, still taking the gallery application as an example, when the gallery application was previously opened in the floating window mode, the album page of the gallery application was displayed in the floating window. After the floating window corresponding to the gallery application is switched to the floating ball form and added to the floating ball set, if the gallery application needs to be opened in the floating window mode again, when the floating ball set 31 only contains the floating ball corresponding to the gallery application, such as Figure 6 As shown in (b2) and (c2) in FIG, clicking on the floating ball set 31 (i.e. clicking on the floating ball corresponding to the gallery application) will directly display the floating window corresponding to the gallery application again on the display screen and the floating window will still display the album page displayed previously; if the floating ball set 31 contains multiple floating balls, such as Figure 6 As shown in (b1), (c1) and (d) in the figure, when the floating ball set 31 is clicked, the interface F corresponding to the floating ball set 31 will be displayed along one side of the display screen. The interface F includes the application identifier (such as icon and / or name) and the floating window view V of the application corresponding to each floating ball. When the floating window view V corresponding to the gallery application in the interface F is clicked, the floating window of the gallery application will be restored on the display screen and the album page displayed in the floating window will still be the album page displayed before. However, for some special pages such as voice / video call pages, application internal pages that require login and / or verification to enter, when they are directly restored to display in a floating window, display abnormalities may occur. For example, during the restoration display process, it is normal for the electronic device to pull up the corresponding application, but because the corresponding page display of the application lacks the information it must rely on or security-related verification information, the application itself will actively end the process of the current page, causing the displayed floating window to disappear immediately. This will give the user a visual experience of flickering application page display, and the user has no way to actively restore it.
[0042] To better understand the aforementioned abnormal issues that may occur when restoring the floating window through the floating ball, several detailed examples are given below.
[0043] Example 1: See Figure 7 As shown, user 1 opens a social software such as WeChat application on an electronic device in the form of a floating window, and uses the WeChat application to make a video call with another user 2. During the video call, user 1 needs to do other things, such as operating other applications such as email on the electronic device. In order to avoid the WeChat application blocking other applications that need to be operated, user 1 operates the minimize control on the floating window corresponding to the WeChat application, so that the WeChat application is reduced to a floating ball 312 displayed on one side of the electronic device (as shown in FIG. Figure 7As shown in (d) in the figure), the video call process of the WeChat application is running in the background. While user 1 is operating other applications such as email, the other party (user 2) hangs up the video call with user 1, but at this time the WeChat application will still be displayed on the interface of the electronic device in the form of a floating ball 312. After user 1 has finished operating other applications, he clicks on the floating ball 312, and wants to restore the video call page of the WeChat application by clicking on the floating ball 312. However, since the other party has hung up the video call, that is, the video call process of the WeChat application has ended, and there is no video call process running in the background. Therefore, at this time, the electronic device responds to the user 1's click operation on the floating ball 312. Although it can normally pull up the WeChat application, it is unable to directly restore the video call page from the background and restore it in the form of a floating window. As a result, when user 1 clicks on the floating ball 312, it flashes on the interface of the electronic device, and the displayed floating window (possibly only a small part of the floating window) disappears immediately.
[0044] Example 2, see Figure 8 As shown, the user operates the ## banking application on the electronic device and enters the login page P31, home page P32, ..., and account details page P3m of the ## banking application in sequence. The processes corresponding to the login page P31, home page P32, ..., and account details page P3m form a hierarchical task stack in the background according to the order. When the user enters the ## banking application through Figure 5 In the manner shown, the account details page P3m at the top is displayed in the form of a floating window, and then the floating window is operated to display the ## banking application in the form of a floating ball 313. Due to reasons such as insufficient memory and too long background residence time, the system of the electronic device recycles the login page P31, home page P32, etc. located below the account details page P3m. Since the display of each page of the ## banking application after logging in generally requires verification of the login account information entered during login, after the user clicks the floating ball 313, the login page P31, home page P32, etc. located below the account details page P3m are recycled by the system, causing the task stack on which the account details page display depends to be destroyed, thereby causing the display of the account details page P3m to lack the necessary The lower-level page process information that needs to be relied on, and thus the security-related verification information that must be relied on (login account information) is also missing. At this time, the electronic device responds to the user's click operation on the floating ball 313. Although its system pulls up the floating window corresponding to the ## bank application, the ## bank application itself will feel that it is difficult to determine whether it is an illegal login due to the lack of the login account information and / or the information relationship brought by the previous page that it relies on, and it will be determined to be an abnormal startup state. For this reason, it will immediately close the started page process, and abnormal problems such as flickering display will occur.
[0045] The display anomaly problem that may occur during the process of restoring the corresponding application page in the form of a floating window through the floating ball described above will cause great inconvenience to the user in using the electronic device and a poor user experience.
[0046] In order to solve the above-mentioned display abnormality problem, the present application provides a display technology solution. In the present application solution, the process of restoring the floating ball to a floating window is adjusted, mainly by identifying the background running status of the application process to be pulled up in advance for advance processing, so that the corresponding application can be pulled up normally when the floating ball is restored to a floating window, so as to avoid display abnormalities and the like. Specifically, when the electronic device detects that the user has operated (such as clicking) the floating ball, it scans all application processes running in the background on it to determine whether the corresponding application to be started is running in the background based on the scan results, and then executes the corresponding processing strategy based on the determined background running results. For example, if the application to be started is running in the background, the background running page process of the application can be switched to the foreground through the application hot start method (calling recent(), specifically startActivityFromRecents()) to be displayed through the floating window; if the application to be started is not running in the background, and the reason for not running in the background is that the application process is killed or recycled by the system due to reasons such as too long a stay time in the background or insufficient device memory, the corresponding page of the application is pulled up in the form of a floating window through a cold start method.
[0047] Among them, startActivityFromRecents() is used to start an activity (such as a page) from the recent tasks Recents. The details of application hot start and application cold start will be described below and will not be detailed here.
[0048] Note: Pulling up the application in the context of this application is also called opening the application, which means that after the user operates (such as clicking) the application icon, the system automatically starts and jumps to the specified page.
[0049] The floating window display technology solutions provided by various embodiments of the present application are described in detail below.
[0050] Figure 9 FIG1 shows a flow chart of a display method provided by an exemplary embodiment of the present application, wherein the execution subject of the method is an electronic device. Figure 2 As shown, the electronic device 100 can be, but is not limited to, a smartphone, a tablet computer, etc. A smartphone can be, for example, a foldable phone or a regular straight-panel phone. A foldable phone refers to an electronic product that can change the size of the device through a foldable screen. The structure of the electronic device 100 will be described in detail in other embodiments below. Figure 9As shown, the display method provided in this embodiment includes the following steps:
[0051] 101. Display at least one floating ball; wherein one of the floating balls is formed by switching a floating window to a contracted state, and one floating window is used to display a page of an application;
[0052] 102. When an operation on a target floating ball is detected, determining whether a target application corresponding to the target floating ball is in a background running state; the target floating ball is one of the at least one floating ball;
[0053] 103. When the target application is not in a background running state, create startup parameter information of the target application, wherein the page display mode included in the startup parameter information is a floating window display mode;
[0054] 104. Start the target application based on the startup parameter information, and display the target application page in a floating window during the startup process.
[0055] In the above 101, at least one floating ball can be displayed at any position on the display screen of the electronic device. The embodiment of the present application does not limit the specific display position of the floating ball. In some embodiments, the floating ball can be displayed on one side of the display screen to reduce obstruction of the display screen and improve the user experience. In addition, the floating ball can be circular, semicircular, translucent, square, or any other shape. The embodiment of the present application does not specifically limit the shape and other appearance of the floating ball. The floating ball displays the application icon of the corresponding application.
[0056] When implementing it, see Figure 3 、 Figure 4 and Figure 6 As shown, a floating ball set can be displayed on the display screen of an electronic device, and the floating ball set stores and displays at least one floating ball. When the floating ball set stores multiple (two or more) floating balls, the multiple floating balls can be stacked and arranged in a certain order for display. For example, according to the order in which multiple floating balls are added to the floating ball set, the later the floating balls are added, the higher the layer can be arranged. The latest (i.e., the latest) floating ball added is arranged at the top layer, such as Figure 6 The floating ball 311 corresponding to the gallery application shown in FIG is the most recently added floating ball to the floating ball set. In addition, when multiple floating balls are stacked and displayed in the floating ball set, the display color of the floating balls can also be set, such as the display color of the multiple floating balls can be gradually faded according to the stacking order.
[0057] It should be noted here that when the number of at least one floating ball that needs to be displayed is less than or equal to a preset number threshold (such as 1), the at least one floating ball may not be temporarily added to the floating ball set for display. For example, assuming that the preset number threshold is 1, and currently only the floating ball corresponding to the gallery application needs to be displayed on the display screen, the action of adding the floating ball to the floating ball set can be performed for the floating ball part, and the floating ball can be directly displayed on one side of the display screen; further, when it is detected that there is another floating ball corresponding to the WeChat application that needs to be displayed, the floating ball corresponding to the WeChat application can be added to the floating ball set and the floating ball corresponding to the gallery application can be moved into the floating ball set, so that the floating balls corresponding to the WeChat application and the gallery application are displayed through the floating ball set, and the floating ball corresponding to the WeChat application is on the upper layer of the floating ball corresponding to the gallery application.
[0058] Based on the above content, in one possible implementation, the above 101 “displaying at least one floating ball” includes:
[0059] 1011. Display a floating ball set; the floating ball set displays the at least one floating ball in a stacked manner.
[0060] In this embodiment, each displayed floating ball is formed by switching a corresponding floating window to a contracted state, and a floating window is used to display a page of a corresponding application.
[0061] In addition to the application page, the floating window also displays some controls, such as Figure 3 , a full-screen control 210, a minimize control 211, a drag control 212, and an exit control (or close control) 213 may also be displayed. Among them, the full-screen control 210 is used to display the floating window in full screen (that is, switch the application page from the floating window display mode to the full-screen display mode), the minimize control 211 is used to minimize the floating window to a floating ball, the drag control 212 is used to move the floating window position, and the exit control 213 is used to exit (or close) the floating window. In addition, the user can operate the corresponding controls on the floating window (such as the minimize control 211 or the drag control 212) to shrink the floating window to a floating ball form. For example, see Figure 3 As shown in (d) and (e), a floating window 21 of a gallery application is displayed on the electronic device. The floating window 21 displays an album page of the gallery application, a minimize control 211, a drag control 212, etc. When a user clicks on the minimize control 211, the floating window 21 is shrunk to a floating ball 311 and added to the floating ball set 31 for display; or, see Figure 4As shown in (d) and (e), when it is detected that the user operates the drag control 212 to move the floating window 21 to a side edge (such as the right side) of the electronic device, the floating window 21 will also be shrunk to the floating ball 311 and added to the floating ball set 31 for display.
[0062] After the floating window is switched to the floating ball form, the page process of the corresponding application will run in the background (that is, the page process is switched from the foreground running state to the background running state), and the general operation of the floating ball will restore it to the previously shrunk floating window. In other words, the general operation of the floating ball will restore the page to the corresponding floating window display form, and the page displayed in the floating window after restoration is still the previous page (the page that was displayed in the floating window before it was shrunk to the floating ball). However, considering that the user actively closes the application page process running in the background, the corresponding floating ball will still remain on the display. For example, see Figure 10 As shown, assuming that the currently displayed floating ball set 31 includes a floating ball corresponding to the gallery application and a floating ball corresponding to the memo application, in response to an upward sliding operation triggered by the user, a multitasking interface 4 is displayed, in which all application pages running in the background are displayed, such as Figure 10 As shown in (b11) to (b13) in FIG, after the user clears the album page process running in the background by swiping up on the album page corresponding to the gallery application in the multitasking interface 4, and then clicks anywhere in the gray area in the multitasking interface F to restore the desktop of the electronic device, the floating ball set 31 displayed on the upper layer of the desktop still displays the floating ball corresponding to the album application; or Figure 10 As shown in (b21) to (b23) in the figure, the user clicks the delete control 42 in the multitasking interface 4 to clean all application page processes (including the album page process of the gallery application and the note page process of the memo application) that are not in the locked state and run in the background. Then, the user directly jumps to the desktop of the electronic device. The floating ball set 31 displayed on the upper layer of the desktop still has the floating balls corresponding to the gallery application and the memo application (see Figure 10 (c) in the above combination Figure 10 In the example described, after the user actively cleans up the application page process, the floating ball of the corresponding application still remains on the desktop, and linkage cleaning cannot be achieved. The user cannot manually clean up the floating ball that still remains, which affects the user experience. For example: Figure 10The described example may cause the user to mistakenly believe that the corresponding running application, such as the gallery application, has not been closed successfully, and when the user opens the multitasking interface again, the interface does not display the page process corresponding to the gallery application, or a prompt message such as "No application has been recently run" is displayed; on the other hand, it may also cause the user to mistakenly believe that the gallery application can be directly opened again in the form of a floating window through the floating ball corresponding to the gallery application that is still resident and displayed on the desktop. In fact, if the user clicks on the floating ball corresponding to the gallery application, the page process of the gallery application has been actively cleared by the user, resulting in a lack of information that the floating window display must rely on, which will result in a failure to display the gallery application normally in the form of a floating window, and the user cannot actively restore it. In response to the above problems, in order to improve the user experience, the embodiment of the present application provides a linkage cleaning solution for the corresponding floating ball when the user actively cleans the application process running in the background.
[0063] That is, the method provided in this embodiment may further include the following steps:
[0064] S1. When detecting a user-triggered closing operation on an application process running in the background on the electronic device, updating the at least one displayed floating ball to delete the floating window of the corresponding application corresponding to the closed application process.
[0065] Specifically, when it is detected that the user uses the multi-tasking interface (such as Figure 10 When the application process running in the background on the electronic device is closed by the multitasking interface 4) shown in the figure or the application management interface provided by the setting application, the update logic of the at least one floating ball displayed is executed.
[0066] For example, assuming that the currently displayed floating ball set 31 includes floating balls corresponding to the gallery application, the shopping application, and the memo application, see Figure 11 As shown in (a1) and (b11) to (b12), when it is detected that the user clears the application process of the gallery application running in the background through the multitasking interface 4, or, see Figure 11 See also Figure 11As shown in (a2) and (b21) to (b22), when it is detected that the user closes the application process of the gallery application running in the background by operating the forced stop control on the application information interface 51 of the gallery application provided by the setting application, the floating ball information in the floating ball set will be obtained, and the floating ball information includes the application identifier associated with each floating ball; then, according to the application identifier of the gallery application, the floating ball information is traversed in a loop to determine the target floating ball whose associated application identifier among all the floating balls in the floating ball set is consistent with the application identifier of the gallery application, and the target floating ball is deleted to achieve the update of the floating ball set 31. The target floating ball is a floating ball with a gallery application identifier (such as a gallery application icon). As Figure 11 As shown in (c) and (d) in the figure, the updated floating ball set 31 no longer contains the floating ball corresponding to the gallery application. The application identifier can be an application icon and / or an application name (application package name), and accordingly, the target floating ball whose associated application identifier among all the floating balls in the floating ball set is consistent with the application identifier of the gallery application is determined, including:
[0067] Performing image similarity analysis on the application icon associated with each floating ball in the floating ball set and the application icon of the gallery application using an image recognition algorithm to obtain an image similarity value; determining the floating ball corresponding to the image similarity value greater than or equal to a preset similarity threshold as the target floating ball; and / or,
[0068] Through the text recognition algorithm, a text similarity analysis is performed on the application name associated with each floating ball in the floating ball set and the application name of the gallery application to obtain a text similarity value; the floating ball corresponding to the text similarity value greater than or equal to the preset text similarity threshold is determined as the target floating ball.
[0069] Based on the above example content, the “detection of a user-triggered shutdown operation on an application process running in the background of the electronic device” in S1 includes but is not limited to any of the following:
[0070] In response to the user's operation of opening the multitasking interface, the multitasking interface is displayed; wherein, application information of applications running in the background is presented on the multitasking interface, and the application information includes an associated display application identifier and an application page card, and the application page card is used to display the last frame page image executed by the corresponding application when the multitasking interface opening operation is detected; when a deletion operation triggered by the user on the application page card presented in the multitasking interface is detected, it is determined that a shutdown operation triggered by the application process running in the background on the user's electronic device is detected; the deletion operation triggered on the application page card here includes but is not limited to: operating the application page card to slide upward to flip the application card to the back of the display screen and after the flipping angle to the back is greater than or equal to the preset angle, the display screen stops displaying the application page card, and the application page card disappears, that is, the application page card is deleted; operating the delete control displayed in the multitasking interface to delete all application page cards in the multitasking interface with one click.
[0071] In response to the user's operation of opening application management, an application management interface is displayed; wherein, multiple application identifiers are presented in the application management interface; in response to the user's operation on a target application identifier among the multiple application identifiers (such as a click operation), an application information interface of the application corresponding to the target application identifier is displayed; when an operation triggered by the user on the stop control in the application information interface is detected, it is determined that the user's application closing operation indicated by the target application identifier running in the background is detected.
[0072] In the above 102, when at least one floating ball is stored in the displayed floating ball set, an operation on the target floating ball is detected, including but not limited to any of the following:
[0073] If the suspended ball set includes only one suspended ball, the suspended ball set is the target suspended ball, and if an operation (such as a click or touch) on the suspended ball set is detected, it is determined that an operation on the target suspended ball is detected;
[0074] If the floating ball set includes multiple floating balls, and the target floating ball is one of the multiple floating balls, when an operation on the floating ball set is detected, the interface of the floating ball set is displayed, and the application logo and floating window view of each floating ball corresponding to the application are presented on the interface; when an operation on the floating window view of the application corresponding to the target floating ball in the interface is monitored (such as a click, etc.), it is determined that an operation on the target floating ball is detected.
[0075] When an operation on the target floating ball is detected, it is possible to determine whether the target application corresponding to the target floating ball is in the background running state based on the application process information of all applications running in the background on the electronic device. Therefore, in a specific implementation scheme, the above step 102 "when an operation on the target floating ball is detected, determining whether the target application corresponding to the target floating ball is in the background running state" can be implemented using the following steps:
[0076] 1021. When an operation on the target floating ball is detected, obtain information about application processes running in the background on the electronic device;
[0077] 1022. Determine whether there is an application process associated with the application identifier of the target application in the application process information;
[0078] 1023. If yes, determine that the target application is in background running state;
[0079] 1024. If not, determine that the target application is not in the background running state.
[0080] Each application can run one or more processes in the background. A process refers to an instance of an application when it is executed. The reason why the information of the application processes running in the background on the electronic device is obtained only when the user's operation on the target floating ball is detected is that: generally, the efficiency of obtaining the information of the application processes running in the background is very high, and the acquisition can be completed in milliseconds. Therefore, even if the acquisition of the application process information running in the background is performed only after the operation on the floating ball is detected, it is imperceptible to the user and will not bring a bad experience. If the information of the application processes running in the background is obtained before the user operates the floating ball, a timed refresh operation needs to be performed to delete the floating ball of the corresponding application that is not running in the background. Since the user's intention is difficult to accurately determine, it is difficult to know when the user clicks the floating ball, and thus it is impossible to clearly determine the refresh timing. If the refresh is performed at a certain interval, such as 1 second, the power consumption of the electronic device is relatively large.
[0081] The above-obtained information about application processes running in the background may include the process identifier of the application process (such as the process identifier number or process name) and the corresponding application identifier (such as the application package name). The application process information is traversed in a loop to filter the application processes containing the application identifier (such as the application package name) associated with the target application, thereby determining whether the target application is in the background running state based on the filtering results. For example, if any application process associated with the application identifier of the target application is filtered, it can be directly determined that the target application is in the background running state. Conversely, if no application process associated with the application identifier of the target application is filtered, it can be determined that the target application is not in the background running state.
[0082] For example, the main logic program code for determining whether the target application is in the background running state may be as follows:
[0083]
[0084] In the program code shown in the example above, isRunningProcess(Context context, StringPackageName) is a private, static, and Boolean encapsulation function defined to determine whether the target application is in the background running state. After the user clicks the target floating ball, the application information of the target application corresponding to the target floating ball (such as the running context (such as the running environment), the application package name PackageName) will be passed into the encapsulation function. Among them, the application package name (PackageName) is the unique identifier of the application, that is, the name used to uniquely identify the application. The application package name usually uses the reverse domain name (reverse domainname) naming method, such as "com.example.appname", to ensure its global uniqueness.
[0085] In the aforementioned isRunningProcess wrapper function, ActivityManager primarily provides an interface for interacting with running Activities in the system. Before implementing functions such as information retrieval through ActivityManager, consider that passing in invalid parameters may affect system stability, such as causing crashes, freezes, or shutdowns. Therefore, it's necessary to first verify whether passed parameters such as context and PackageName are valid. For example, this can be done by checking whether context is null or whether the device's system is in the lock screen state. If so, a false output indicates that the passed context is invalid, halting subsequent retrieval and other logic. KeyguardUpdateMonitor.getInstance(context).isOcclude() can be used to verify whether the device is in the lock screen state. KeyguardUpdateMonitor is a class that monitors lock / unlock events and monitors lock screen information changes. getInstance(context) obtains an instance of the KeyguardUpdateMonitor class. isOccluded() checks whether the device is currently locked.
[0086] After that, the context.getSystemService() method in ActivityManager (interface manager) is called first to obtain the system service so that various operations can be performed through the system service. For example, the parameter passed to context.getSystemService() is CTIVITY_SERVICE, which indicates that the ActivityManager service is obtained, and the information of the running application process can be obtained through the ActivityManager service. Furthermore, the getRunningAppProcess() method is called to obtain the information of the application process running in the background on the electronic device and generate a process list List; among them, the application process running in the background includes processes with an interface (such as browsing the web, etc.) and processes without an interface (such as MP3 players, network service processes for uploading and downloading data in the background, etc.). Each element in the process list is a variable of type RuningAppProcessInfo, which stores detailed information of each application process running in the background, such as process name processName, process ID, user ID, application identifier of the corresponding application (such as application package name), etc.; then, if the process list List is not an empty set null and the size size is greater than 0 (that is, it indicates that the number of process elements contained in the list is greater than 0), the stream() method is called to loop poll the process list List in a stream manner, and the filter() method is called during the loop polling process to filter and determine whether the process list List contains an application process with the application package name of the target application, and through the use of findAng(), once it is determined that the process list List contains any one (one or more) processes with the application package name of the target application, a true value is returned, indicating that the target application is in the background running state; conversely, if it is determined that the process list List does not contain a process with the application package name of the target application, the default value false defined for isRunningProcess is returned, indicating that the target application is closed and is not running in the background.
[0087] Based on the above example, when an operation on the target floating ball is detected, the following steps are also included:
[0088] S21. Obtain application information of a target application corresponding to a target floating ball, where the application information includes operating environment information;
[0089] S22. When it is determined that the operating environment information of the target application meets the preset requirements, triggering execution to obtain application process information currently running in the background on the electronic device;
[0090] The running environment information of the target application meeting the preset requirements includes: the running environment information is not an empty set and reflects that the electronic device is not in a locked screen state.
[0091] Scenarios that may cause the aforementioned target application to not be running in the background include, but are not limited to: the target application has been running in the background for too long (e.g., greater than or equal to a set time threshold) or has been recycled or killed due to system memory shortage. In these scenarios, the electronic device's system is unable to actively monitor and clean the floating ball corresponding to the recycled or killed application process, so the corresponding floating ball remains displayed on the electronic device.
[0092] In the scenario where the target application is not running in the background, you can cold start the application to open the target application page in the floating window display mode, thereby avoiding display abnormalities (such as flickering) that occur after the application display switches from the floating ball display mode to the floating window display mode.
[0093] An application cold start occurs when an application is restarted after it has never been launched, has been shut down by the system, or has been manually shut down. This means that when the application is launched, there is no background process for that application. The system then creates a new process and assigns it to the application to start it. This startup method is called a cold start. Simply put, an application cold start occurs when an application goes from a dead (closed) state to an active state.
[0094] For example, see Figure 12 After the user closes the shopping app by clearing its current cached data through the multitasking interface, and then clicks the shopping app icon on the electronic device's desktop again, the electronic device's system, in response to the click, recreates a process to launch the shopping app. During the launch process, an animated entry page P0 is first displayed, followed by the shopping app's home page P1. This launch process is a cold start, essentially recreating the entire shopping app display process.
[0095] Currently, all application cold start methods display the application's page in full-screen display mode when launching the application, and cannot display the application's page in floating window display mode. In this embodiment, when launching an application using the application cold start method, the corresponding windownmode (window mode / window type) parameter can be added to the application's full-screen launch parameter information to construct the corresponding launch parameter information, thereby enabling the application's page to be displayed in the form of a floating window based on this launch parameter information. The application's full-screen launch parameter information includes, but is not limited to, intent and ActivityOptions. Intent is the intent, which represents the target object to be launched and can be the identifier of the application to be launched (such as the application package name). ActivityOptions is a launch setting parameter that can indicate the display mode in which the target object is launched. Currently, this parameter indicates that the target object is launched in full-screen display mode. In this embodiment, a specific windownmode parameter is added to the ActivityOptions parameter, thereby constructing the final launch parameter information based on the intent parameter and the ActivityOptions after adding windownmode. The windownmode parameter includes, but is not limited to, the size and style of the window (for floating windows) (such as a rectangle with rounded corners). By passing the constructed launch parameter information to the application launch function context.startActivity(launchIntent, tempOption.toBundle()) and executing this function, the page can be directly displayed in the form of a floating window after the application is launched. After the launch parameter information is passed, launchIntent is changed to intent, tempOption is changed to ActivityOptions, and toBundle() is a parameter transmission mechanism that can be used to package the bulk parameter data in ActivityOptions and transmit it to the electronic device system.
[0096] It's worth noting that in addition to the added windownmode, the ActivityOptions parameter can also include other parameters, such as setLockTaskEnabled(boolean lockTaskMode), which sets whether the Activity should be launched in locked task mode. For a detailed description of other parameters that can be included in ActivityOptions, see the existing full-screen startup parameters, which will not be detailed here.
[0097] Based on the above content, in one possible technical solution, the above 103 "creating startup parameter information of the target application" may specifically include:
[0098] 1031. Obtain full-screen startup parameter information of the target application, wherein the full-screen startup parameter information includes: application package name (intent) and startup setting parameters (ActivityOptions);
[0099] 1032. Add a floating window display mode parameter (windownmode) to the startup setting parameters.
[0100] Furthermore, the above-mentioned step 104 of “starting the target application based on the startup parameter information, and displaying the target application page in a floating window during the startup process” includes:
[0101] 1041. Call the application startup function context.startActivity();
[0102] 1042. Write the application package name corresponding to the target application and the startup setting parameters with floating window display mode parameters added thereto into the application startup function to obtain the assigned application startup function.
[0103] 1043. Start the target application through the assigned application startup function, and display the target application page in a floating window during the startup process.
[0104] The technical solution provided by this embodiment is that at least one floating ball is displayed on the electronic device. A floating ball is formed by switching a floating window to a retracted state, and a floating window is used to display a page of an application. When it is determined that the target application corresponding to the operated target floating ball is not in the background running state, the startup parameter information of the target application will be recreated. The page display mode contained in the startup parameter information is the floating window display mode, so that based on the startup parameter information, the page of the target application will be displayed in a floating window during the startup of this target application. Because the present application solution is based on the recreated startup parameter information to pull up the target application when switching the target application that is not running in the background from the floating ball display mode to the floating window display mode for display, there will be basically no problems such as lack of necessary information in the process of pulling up the target application, thereby effectively ensuring that the target application can be pulled up normally, so that when the target application page is displayed through the floating window again, there will be no abnormal problems such as flickering.
[0105] The above describes the execution logic for switching the target application's page corresponding to the target floating ball to a floating window display mode using an application cold restart in response to an operation on the target floating ball when the target application is not running in the background. If it is determined that the target application corresponding to the target floating ball is running in the background, the target application's page can be restored to a floating window display mode using an application hot restart.
[0106] An app hot launch is when an app is already running in the background. When you reopen the app, it can be directly switched to the foreground and resumed. This is called launching an app from within its existing process.
[0107] For example, see Figure 13 As shown, the shopping application is in the background running state. When the user clicks the shopping application icon on the desktop again, the home page P1 of the shopping application will be directly restored instead of being displayed as shown in FIG. Figure 12 The cold start method of the application shown in FIG, needs to first display an entry animation page P0 and then display the home page P1 of the shopping application. Figure 13 The startup and display process of the shopping application described above is an application hot start method, which is essentially to directly switch the background running process of the application to the foreground for restoration and display.
[0108] To bring an app's background process to the foreground and resume display, you can call the recent() method, for example, by calling the startActivityFromRecents() method. For details on how to use startActivityFromRecents() to bring a background process to the foreground, see the existing content.
[0109] Based on the above content, the method provided in this embodiment may further include the following steps:
[0110] 105. When the target application is in the background running state, switch the target application to the foreground running and restore the page of the target application to be displayed in the floating window;
[0111] Among them, the page corresponding to the process of the target application closest to the current time is displayed through the floating window. For example, taking the target application as WeChat application, a home page process and a group chat page process of WeChat application are running in the background on the electronic device. The group chat page process depends on the home page process, that is, the creation time of the group chat page process is later than the home page process. When the target application is switched to the foreground and the page of the target application is restored to be displayed through the floating window, the group chat page is specifically displayed in the floating window; if the user closes the group chat page process, the page that the group chat page depends on, that is, the home page, is specifically displayed in the floating window.
[0112] In summary, the display method provided in this embodiment can be simplified as follows:
[0113] See also Figure 14 As shown, when a user uses an application on an electronic device, if there is a need for multi-tasking (such as watching a video while chatting on WeChat or operating a page while watching a video), the application that needs to be resident can be run in the foreground in floating window display mode. If you need to temporarily close the floating window because you need to perform other tasks (such as operating other applications) while using the floating window, you can switch the floating window display to the floating ball by operating the corresponding control on the floating window (such as the minimize control). After switching to the floating ball, the application
[0114] Running in the background. When the user actively removes (such as removing through multitasking) one or more application processes, the electronic device actively calls the system interface to remove the corresponding floating ball. Furthermore, when other tasks are completed, you can click the floating ball to restore the previously folded floating window. Specifically, after clicking the floating ball, the system scans all application processes running on the electronic device, and determines whether the target application is running in the background based on the scan results and the application package name of the target application corresponding to the clicked floating ball; if it is running in the background, it directly calls the system multitasking startup related process (such as calling recent) to pull up the target application to display it as a floating window; if the application process of the target application has been killed or recycled by the system due to reasons such as too long a stay in the background or tight memory of the electronic device, the cold start method (constructing startup parameter information (with WindowModew (floating window type) added therein) is used to pull up the main page of the target application in the form of a floating window, so as to avoid the display abnormality problem that occurs after the floating ball on the application is switched to a floating window.
[0115] The display method provided in the aforementioned embodiments of the present application can be applied to electronic devices. The electronic devices can be smartphones (foldable phones, candy-bar phones), tablet computers, wearable devices, etc. The embodiments of the present application do not impose any restrictions on the specific type of electronic devices.
[0116] For example, Figure 15 A schematic diagram of the structure of an electronic device provided by an exemplary embodiment of the present application is shown in FIG. Figure 15 As shown, the electronic device may include: a processor and a memory; wherein the memory is used to store programs; the processor is coupled to the memory and is used to execute the programs stored in the memory, so that the electronic device implements the steps of the various methods provided in other embodiments of the present application mentioned above.
[0117] In addition to the above, the electronic device may also include: an external memory interface, a universal serial bus (USB) interface, a charging management module, a power management module, a battery, an antenna, a mobile communication module, a wireless communication module, an audio module, a speaker, a receiver, a microphone, a headphone jack, a sensor module, a button, a motor, an indicator, a camera, a subscriber identification module (SIM) card interface, a display screen, etc. Among them, the sensor module includes an acceleration sensor, a pressure sensor, a gyroscope sensor, an air pressure sensor, a magnetic sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc.
[0118] Specifically, the above-mentioned memory is an internal memory, which can be used to store computer-pointable program codes, and the executable program codes include instructions. The internal memory may include a program storage area and a data storage area. The program storage area may store an operating system, an application required for at least one function (such as a sound imitation function, an image playback function, etc.), etc. The data storage area may store data created during the use of the electronic device (such as audio data, a phone book, messages, pictures, videos), etc. In addition, the internal memory may include a high-speed random access memory, and may also include a non-volatile memory, such as at least one disk storage device, a flash memory, a universal flash storage (UFS), etc. The processor executes various functional applications and data processing of the electronic device by running instructions stored in the internal memory, and / or instructions stored in a memory provided in the processor.
[0119] The processor may include one or more processing units, for example, an application processor (AP), a modem processor, a graphics processing unit (GPU), an image signal processor (ISP), a controller, a video codec, a digital signal processor (DSP), a baseband processor, and / or a neural-network processing unit (NPU). The different processing units may be independent devices or integrated into one or more processors. The controller may generate operation control signals based on instruction opcodes and timing signals to control instruction fetching and execution.
[0120] Furthermore, the processor may be provided with a memory for storing instructions and data. In some embodiments, the memory in the processor is a cache memory. This memory can store instructions or data that have just been used by the processor or are being recycled. If the processor needs to use the instruction or data again, it can directly retrieve it from the memory. This avoids duplicate accesses, reduces processor latency, and thus improves system efficiency.
[0121] In some embodiments, the processor may include one or more interfaces. The interfaces may include an inter-integrated circuit (I2C) interface, an inter-integrated circuit sound (I2S) interface, a pulse code modulation (PCM) interface, a universal asynchronous receiver / transmitter (UART) interface, a mobile industry processor interface (MIPI), a general-purpose input / output (GPIO) interface, a subscriber identity module (SIM) interface, and / or a universal serial bus (USB) interface.
[0122] The I2C interface is a bidirectional synchronous serial bus that includes a serial data line (SDA) and a serial clock line (DCL). In some embodiments, the processor may include multiple I2C bus lines. The processor can be coupled to a touch sensor, a charger, a flash, a camera, etc. through different I2C bus interfaces. For example, the processor can be coupled to a touch sensor through the I2C interface, allowing the processor and the touch sensor to communicate through the I2C bus interface, thereby realizing the touch function of the electronic device.
[0123] The I2S interface can be used for audio communication. In some embodiments, the processor can include multiple I2S buses. The processor can be coupled to the audio module via the I2S bus to enable communication between the processor and the audio module. In some embodiments, the audio module can transmit audio signals to the wireless communication module via the I2S interface, enabling the function of answering calls via Bluetooth.
[0124] The PCM interface can also be used for audio communication, sampling, quantizing, and encoding analog signals. In some embodiments, the audio module and the wireless communication module can be coupled via a PCM bus interface. In some embodiments, the audio module can also transmit audio signals to the wireless communication module via the PCM interface, enabling the function of answering calls via a Bluetooth headset. Both the I2S interface and the PCM interface can be used for audio communication.
[0125] The UART interface is a universal serial data bus used for asynchronous communication. This bus can be a bidirectional communication bus. It converts the data to be transmitted between serial and parallel communication. In some embodiments, the UART interface communicates with the Bluetooth module in the wireless communication module to implement Bluetooth functionality. In some embodiments, the audio module can transmit audio signals to the wireless communication module via the UART interface, enabling the playback of music through Bluetooth headphones.
[0126] MIPI interfaces can be used to connect processors to peripheral devices such as displays and cameras. MIPI interfaces include the camera serial interface (CSI) and the display serial interface (DSI). In some embodiments, the processor and camera communicate via the CSI interface to enable the electronic device's camera function. The processor and display communicate via the DSI interface to enable the electronic device's display function.
[0127] The GPIO interface can be configured through software. It can be configured as either a control signal or a data signal. In some embodiments, the GPIO interface can be used to connect the processor to a camera, display, wireless communication module, audio module, sensor, etc. The GPIO interface can also be configured as an I2C interface, I2S interface, UART interface, MIP interface, etc.
[0128] A USB interface is an interface that complies with USB standard specifications. Specifically, it can be a Mini USB interface, a Micro USB interface, a USB Type C interface, etc. A USB interface can be used to connect a charger to charge an electronic device, or to transfer data between an electronic device and a peripheral device. It can also be used to connect headphones to play audio through the headphones. This interface can also be used to connect other electronic devices, such as augmented reality (AR) devices, etc.
[0129] It is understood that the interface connection relationship between the modules illustrated in the embodiments of the present application is only for illustrative purposes and does not constitute a structural limitation on the electronic device. In other embodiments of the present application, the electronic device may also adopt different interface connection methods from the above embodiments, or a combination of multiple interface connection methods.
[0130] The external memory interface connects to an external memory card, such as a Micro SD card, to expand the storage capacity of an electronic device. The external memory card communicates with the processor through the external memory interface, enabling data storage. For example, files such as music and videos can be stored on the external memory card.
[0131] The power management module connects the battery to the processor. The power management module interfaces with the battery's input to power the processor, memory, display, camera, and wireless communication module. The power management module can also monitor parameters such as battery capacity, battery cycle count, and battery health (leakage, impedance). In other embodiments, the power management module can also be located within the processor.
[0132] The wireless communication function of the electronic device can be realized through the corresponding antenna, mobile communication module, wireless communication module, modem processor and baseband processor.
[0133] Antennas are used to transmit and receive electromagnetic wave signals. Each antenna in an electronic device can be used to cover a single or multiple communication frequency bands. Different antennas can also be reused to improve antenna utilization. For example, antennas can be reused as diversity antennas for wireless local area networks. In other embodiments, antennas can be used in conjunction with tuning switches.
[0134] The mobile communication module can provide solutions for wireless communications such as 2G / 3G / 4G / 5G, which can be applied to electronic devices. The mobile communication module may include at least one filter, a switch, a power amplifier, a low noise amplifier (LNA), etc. The mobile communication module can receive electromagnetic waves through the corresponding antenna, and filter, amplify, and process the received electromagnetic waves, and transmit them to the modulation and demodulation processor for demodulation. The mobile communication module can also amplify the signal modulated by the modulation and demodulation processor, and convert it into electromagnetic waves for radiation through the corresponding antenna. In some embodiments, at least some of the functional modules of the mobile communication module can be set in the processor. In some embodiments, at least some of the functional modules of the mobile communication module can be set in the same device as at least some of the modules of the processor.
[0135] The wireless communication module can provide wireless communication solutions for electronic devices, including wireless local area networks (WLAN) (such as wireless fidelity (Wi-Fi) networks), Bluetooth (BT), global navigation satellite system (GNSS), frequency modulation (FM), near field communication (NFC), infrared (IR), etc. The wireless communication module can be one or more devices that integrate at least one communication processing module. The wireless communication module receives electromagnetic waves via the corresponding antenna, modulates the frequency of the electromagnetic wave signal and filters it, and sends the processed signal to the processor. The wireless communication module can also receive the signal to be sent from the processor, modulate the frequency of the signal, amplify it, and convert it into electromagnetic waves for radiation through the antenna 106b.
[0136] In some embodiments, a mobile communication module of an electronic device is coupled to a corresponding antenna, and a wireless communication module is coupled to a corresponding antenna, so that the electronic device can communicate with a network and other devices via wireless communication technologies. The wireless communication technologies may include global system for mobile communications (GSM), general packet radio service (GPRS), code division multiple access (CDMA), wideband code division multiple access (WCDMA), time-division code division multiple access (TD-SCDMA), long term evolution (LTE), BT, GNSS, WLAN, NFC, FM, and / or IR technology. The GNSS may include global positioning system (GPS), global navigation satellite system (GLONASS), Beidou navigation satellite system (BDS), quasi-zenith satellite system (QZSS), and / or satellite-based augmentation system (SBAS).
[0137] Electronic devices implement display functions through a GPU (Graphics Processing Unit), a display, and an application processor. The GPU connects the display and the application processor. The GPU performs mathematical and geometric calculations for graphics rendering. A processor may include one or more GPUs, which execute program instructions to generate or modify display information.
[0138] Electronic devices can implement shooting functions through an ISP, camera, video codec, GPU, display, and application processor. The ISP is used to process data fed back by the camera. For example, when taking a photo, the shutter is opened, and light is transmitted through the lens to the camera's photosensitive element. The light signal is converted into an electrical signal, which is then transmitted to the ISP for processing and converted into an image visible to the naked eye. The ISP can also perform algorithmic optimization on image noise, brightness, and skin color. The ISP can also optimize parameters such as exposure and color temperature of the captured scene. In some embodiments, the ISP can be installed in the camera.
[0139] The display screen is used to display images, videos, text, etc. The display screen can be a touch screen including a display panel. The display panel can be a liquid crystal display (LCD), an organic light-emitting diode (OLED), an active-matrix organic light-emitting diode or an active-matrix organic light-emitting diode (AMOLED), a flexible light-emitting diode (FLED), a MiniLED, a MicroLed, a Micro-oLed, a quantum dot light-emitting diode (QLED), etc. In some embodiments, the foldable electronic device can include one or N display screens, where N is a positive integer greater than one.
[0140] The camera is used to capture still images or videos. The object generates an optical image through the lens and projects it onto the photosensitive element. The photosensitive element can be a charge coupled device (CCD) or a complementary metal-oxide-semiconductor (CMOS) phototransistor. The photosensitive element converts the light signal into an electrical signal, and then passes the electrical signal to the ISP for conversion into a digital image signal. The ISP outputs the digital image signal to the DSP for processing. The DSP converts the digital image signal into an image signal in a standard RGB, YUV or other format. In some embodiments, the foldable electronic device may include 1 or N cameras, where N is a positive integer greater than 1.
[0141] Video codecs are used to compress or decompress digital video. Foldable electronic devices can support one or more video codecs. This allows them to play or record videos in a variety of encoding formats, such as Moving Picture Experts Group (MPEG) 1, MPEG2, MPEG3, and MPEG4.
[0142] The NPU is a neural network (NN) computing processor. Drawing on the structure of biological neural networks, such as the transmission patterns between neurons in the human brain, it rapidly processes input information and can continuously self-learn. The NPU enables intelligent cognitive applications in foldable electronic devices, such as image recognition, facial recognition, speech recognition, and text comprehension.
[0143] Electronic devices can implement audio functions such as music playback and recording through audio modules, speakers, microphones, headphone jacks, and application processors.
[0144] The audio module is used to convert digital audio information into analog audio signal output, and is also used to convert analog audio input into digital audio signals. The audio module can also be used to encode and decode audio signals. In some embodiments, the audio module can be provided in the processor, or some functional modules of the audio module can be provided in the processor.
[0145] A speaker, also known as a horn, is used to convert electrical audio signals into sound signals. Electronic devices can use speakers to listen to music or make hands-free calls.
[0146] A microphone, also known as a "microphone" or "microphone," is used to convert sound signals into electrical signals. When making a call or sending a voice message, the user can speak by placing their mouth close to the microphone, inputting the sound signal into the microphone. An electronic device may be provided with at least one microphone. In other embodiments, an electronic device may be provided with two microphones, which, in addition to collecting sound signals, may also implement noise reduction. In other embodiments, an electronic device may be provided with three, four, or more microphones, which may also collect sound signals, reduce noise, identify the sound source, implement directional recording, and so on.
[0147] The headphone jack is used to connect wired headphones. It can be a USB port, a 3.5mm Open Mobile Terminal Platform (OMTP) standard port, or a cellular telecommunications industry association of the USA (CTIA) standard port.
[0148] The pressure sensor is used to sense pressure signals and convert them into electrical signals. In some embodiments, the pressure sensor can be set on the display screen. There are many types of pressure sensors, such as resistive pressure sensors, inductive pressure sensors, capacitive pressure sensors, etc. A capacitive pressure sensor can be composed of at least two parallel plates made of conductive material. When a force acts on the pressure sensor, the capacitance between the electrodes changes. The electronic device determines the intensity of the pressure based on the change in capacitance. When a touch operation is applied to the display screen, the electronic device detects the intensity of the touch operation based on the pressure sensor. The electronic device can also calculate the location of the touch based on the detection signal of the pressure sensor. In some embodiments, touch operations acting on the same touch position but with different touch operation intensities can correspond to different operation instructions. For example: when a touch operation with a touch operation intensity less than a first pressure threshold acts on a short message application icon, an instruction to view the short message is executed. When a touch operation with a touch operation intensity greater than or equal to the first pressure threshold acts on a short message application icon, an instruction to create a new short message is executed.
[0149] The gyroscope sensor can be used to determine the motion posture of the electronic device. In some embodiments, the angular velocity of the electronic device around three axes (i.e., x, y, and z axes) can be determined by the gyroscope sensor. The gyroscope sensor can be used for anti-shake shooting. For example, when the shutter is pressed, the gyroscope sensor detects the angle of the electronic device's shake, calculates the distance that the lens module needs to compensate based on the angle, and allows the lens to offset the shake of the electronic device through reverse movement to achieve anti-shake. The gyroscope sensor can also be used for navigation and somatosensory game scenes.
[0150] The air pressure sensor is used to measure air pressure. In some embodiments, the electronic device calculates altitude using the air pressure value measured by the air pressure sensor to assist in positioning and navigation.
[0151] The magnetic sensor includes a Hall sensor. The electronic device can utilize the magnetic sensor to detect the opening and closing of a flip case. In some embodiments, when the electronic device is a flip phone, the electronic device can detect the opening and closing of the flip cover using the magnetic sensor and, based on the detected opening and closing status of the case or flip cover, set features such as automatic unlocking of the flip cover.
[0152] Accelerometers detect the magnitude of acceleration in all directions (typically three axes) of an electronic device. When the device is stationary, they can detect the magnitude and direction of gravity. They can also be used to identify the device's posture, enabling applications such as switching between landscape and portrait modes and pedometers.
[0153] A distance sensor is used to measure distance. Electronic devices can measure distance using infrared or laser technology. In some embodiments, when photographing a scene, the electronic device can use the distance sensor to measure distance for rapid focusing.
[0154] The proximity light sensor may include, for example, a light emitting diode (LED) and a light detector, such as a photodiode. The light emitting diode may be an infrared light emitting diode. The electronic device emits infrared light outward through the light emitting diode. The electronic device uses a photodiode to detect infrared reflected light from nearby objects. When sufficient reflected light is detected, it can be determined that there is an object near the electronic device. When insufficient reflected light is detected, it can be determined that there is no object near the electronic device. The electronic device can use the proximity light sensor to detect when the user holds the electronic device close to the ear to talk, so as to automatically turn off the screen to save power. The proximity light sensor can also be used in leather case mode and pocket mode to automatically unlock and lock the screen.
[0155] The ambient light sensor senses ambient light brightness. Electronic devices can adaptively adjust touchscreen brightness based on the perceived ambient light level. The ambient light sensor also automatically adjusts white balance when taking photos. It can also work in conjunction with the proximity sensor to detect whether the device is in a pocket to prevent accidental touches. The fingerprint sensor collects fingerprints. Electronic devices can use these fingerprints to unlock devices, access app locks, take photos, answer calls, and more.
[0156] The temperature sensor is used to detect temperature. In some embodiments, the electronic device uses the temperature detected by the temperature sensor to implement a temperature processing strategy. For example, when the temperature reported by the temperature sensor exceeds a threshold, the electronic device reduces the performance of a processor located near the temperature sensor to reduce power consumption and implement thermal protection. In other embodiments, when the temperature is lower than another threshold, the electronic device heats the battery module to prevent the electronic device from shutting down abnormally due to low temperature. In other embodiments, when the temperature is lower than yet another threshold, the electronic device boosts the output voltage of the battery module to prevent abnormal shutdown due to low temperature.
[0157] A touch sensor, also known as a "touch control device," can be located on a display screen. The touch sensor and the display screen together form a touch screen, also known as a "touch screen." The touch sensor is used to detect touch operations applied to or near the touch sensor. The touch sensor can transmit the detected touch operations to an application processor to determine the type of touch event. Visual output related to the touch operations can be provided through the display screen. In other embodiments, the touch sensor can also be located on the surface of the electronic device, in a location different from the display screen.
[0158] The bone conduction sensor can acquire vibration signals. In some embodiments, the bone conduction sensor can acquire vibration signals from the vibrating bones of the human body. The bone conduction sensor can also contact the human pulse to receive blood pressure signals. In some embodiments, the bone conduction sensor can also be set in headphones to form bone conduction headphones. The audio module can parse the voice signal based on the vibration signal of the vibrating bones of the human body acquired by the bone conduction sensor to implement voice functions. The application processor can parse heart rate information based on the blood pressure signals acquired by the bone conduction sensor to implement heart rate detection functions.
[0159] In addition, the electronic device may also include Figure 11 Other components not shown include buttons (including power buttons, volume buttons, etc.), motors, indicators, and a SIM card interface. The buttons can be mechanical or touch-sensitive. The electronic device can receive key input and generate key signal input related to the user settings and function control of the electronic device. The motor can generate vibration prompts. The motor can be used for incoming call vibration prompts or for touch vibration feedback. For example, touch operations on different applications (such as taking photos, playing audio, etc.) can correspond to different vibration feedback effects. Touch operations on different areas of the display can also correspond to different vibration feedback effects. Different application scenarios (such as time reminders, receiving messages, alarms, games, etc.) can also correspond to different vibration feedback effects. Touch vibration feedback effects can also be customized. The indicator can be an indicator light that can be used to indicate charging status, battery level changes, messages, missed calls, notifications, etc. The SIM card interface is used to connect a SIM card. The SIM card can be inserted into or removed from the SIM card interface to connect to and disconnect from the electronic device. The electronic device can support one or N SIM card interfaces, where N is a positive integer greater than one. The SIM card interface can support Nano SIM cards, Micro SIM cards, and SIM cards. Multiple cards can be inserted into the same SIM card interface simultaneously. The cards can be of the same or different types. The SIM card interface can also be compatible with different types of SIM cards. The SIM card interface can also be compatible with external memory cards. Electronic devices interact with the network through SIM cards to implement functions such as calls and data communications. In some embodiments, electronic devices use eSIMs, or embedded SIM cards. The eSIM card can be embedded in the electronic device and cannot be separated from it.
[0160] It is necessary to add that: the above application is passed Figure 11 The structures of the electronic device shown do not constitute a specific limitation on the electronic device. In other embodiments, the electronic device may include Figure 11More or fewer components may be shown, some components may be combined, some components may be split, or different component arrangements may be used. The components shown may be implemented in hardware, software, or a combination of software and hardware.
[0161] An embodiment of the present application further provides a computer-readable storage medium, which stores a computer program. When the computer program is executed, it can implement the steps in the above-mentioned method embodiments provided in the present application.
[0162] The computer-readable medium may be permanent or non-permanent, removable or non-removable, and may be implemented by any method or technology for information storage. The information may be computer-readable instructions, data structures, program modules, or other data. Examples of computer storage media include, but are not limited to, phase-change memory (PRAM), static random access memory (SRAM), dynamic random access memory (DRAM), other types of random access memory (RAM), read-only memory (ROM), electrically erasable programmable read-only memory (EEPROM), flash memory or other memory technology, compact disc read-only memory (CD-ROM), digital versatile disc (DVD) or other optical storage, magnetic cassettes, magnetic tape, disk storage or other magnetic storage devices, or any other non-transmission media.
[0163] Another embodiment of the present application further provides a computer program product comprising instructions, which, when executed by a computer, can implement one or more steps of the methods provided in the other embodiments of the present application.
[0164] Among them, the electronic device, computer-readable storage medium, and computer program product provided in this embodiment are all used to execute the corresponding methods provided above. Therefore, the beneficial effects that can be achieved can refer to the beneficial effects in the corresponding methods provided above, and will not be repeated here.
[0165] In the several embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely schematic. For example, the division of modules or units is only a logical function division. In actual implementation, there may be other division methods, such as multiple units or components can be combined or integrated into another device, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0166] Units described as separate components may or may not be physically separate, and components shown as units may be one physical unit or multiple physical units, that is, they may be located in one place or distributed in multiple places. Some or all of the units may be selected according to actual needs to achieve the purpose of the present embodiment.
[0167] In addition, the functional units in the various embodiments of the present application may be integrated into a single processing unit, or each unit may exist physically separately, or two or more units may be integrated into a single unit. The aforementioned integrated units may be implemented in the form of hardware or software functional units.
[0168] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a readable storage medium. Based on this understanding, the technical solution of the embodiment of the present application is essentially or the part that contributes to the prior art or all or part of the technical solution can be embodied in the form of a software product, which is stored in a storage medium and includes several instructions for enabling a device (which can be a single-chip microcomputer, chip, etc.) or a processor (processor) to execute all or part of the steps of the various embodiments of the present application. The aforementioned storage medium includes: various media that can store program codes, such as a USB flash drive, a mobile hard disk, a read-only memory (ROM), a random access memory (RAM), a magnetic disk or an optical disk.
[0169] The above content is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by a person skilled in the art within the technical scope disclosed in this application should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.
Claims
1. A display method, characterized in that: Applied to electronic equipment; the method comprises: Displaying at least one floating ball; wherein one of the floating balls is formed by switching a floating window to a contracted state, and one floating window is used to display a page of an application; When an operation on a target floating ball is detected, determining whether a target application corresponding to the target floating ball is in a background running state; the target floating ball is one of the at least one floating ball; When the target application is not in a background running state, creating startup parameter information of the target application, wherein the page display mode included in the startup parameter information is a floating window display mode; Based on the startup parameter information, the target application is started in a cold start mode; wherein, the cold start mode includes: after the target application process is recycled, recreating a process, and forcibly displaying the target application page in a floating window mode through the process according to the startup parameter information.
2. The method according to claim 1, characterized in that Create startup parameter information for the target application, including: Obtaining full-screen startup parameter information of the target application; wherein the full-screen startup parameter information includes: application identification and startup setting parameters; Add the floating window display mode parameter to the startup setting parameter.
3. The method according to claim 2, characterized in that Starting the target application according to the startup parameter information, and displaying the target application page in a floating window during the startup process, including: Call the application startup function; Writing the application identifier corresponding to the target application and the startup setting parameters with floating window display mode parameters added thereto into the application startup function to obtain the assigned application startup function; The target application is started by the assigned application start function, and the page of the target application is displayed in a floating window during the start process.
4. The method according to any one of claims 1 to 3, characterized in that When an operation on a target floating ball is detected, determining whether a target application corresponding to the target floating ball is in a background running state includes: When an operation on the target floating ball is detected, information about application processes running in the background on the electronic device is obtained; Determining whether there is an application process associated with the application identifier of the target application in the application process information; If yes, determine that the target application is in background running state; If not present, it is determined that the target application is not in the background running state.
5. The method according to claim 4, characterized in that When an operation on the target floating ball is detected, the following is also included: Obtain application information of a target application corresponding to a target floating ball, wherein the application information includes operating environment information; When it is determined that the operating environment information of the target application meets the preset requirements, triggering execution to obtain application process information running in the background on the electronic device; The running environment information of the target application meeting the preset requirements includes: the running environment information is not an empty set and reflects that the electronic device is not in a locked screen state.
6. The method according to any one of claims 1 to 3, characterized in that Also includes: When the target application is in the background running state, the target application is switched to the foreground running and the page of the target application displayed through the floating window is restored.
7. The method according to any one of claims 1 to 3, characterized in that Also includes: When a closing operation triggered for an application process running in the background on the electronic device is detected, the at least one floating ball is updated to delete the floating ball corresponding to the same application as the closed application process.
8. An electronic device, characterized in that: include: memory and a processor; wherein, The memory is used to store programs; The processor is coupled to the memory and is configured to execute the program stored in the memory to implement the steps of the display method according to any one of claims 1 to 7.
9. A computer-readable storage medium, characterized in that The computer-readable storage medium stores computer program instructions; when the computer program instructions are executed by a processor, the processor is caused to implement the steps of the display method according to any one of claims 1 to 7. 10 . A computer program product comprising a computer program, wherein when the computer program is executed by a processor, the processor is enabled to implement the steps of the display method according to claim 1 .
Citation Information
Patent Citations
Control method of suspension ball and related device
CN116048358A